adds component endpoint variable
This commit is contained in:
parent
3d8d6264db
commit
5cfebf5ef0
|
@ -5,7 +5,8 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div data-vue-component="archive-list">
|
<div data-vue-component="archive-list"
|
||||||
|
data-endpoint="https://dev-archive.hangar.org/api">
|
||||||
</div>
|
</div>
|
||||||
<script src="/dist/archive-list.js"></script>
|
<script src="/dist/archive-list.js"></script>
|
||||||
|
|
||||||
|
|
|
@ -43,12 +43,11 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
var self = this;
|
var self = this;
|
||||||
axios.get('https://dev-archive.hangar.org/api/sites', {
|
axios.get(this.endpoint +'/sites', {
|
||||||
})
|
})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
console.log(response.data)
|
console.log(response.data)
|
||||||
self.sites = response.data
|
self.sites = response.data
|
||||||
//self.$forceUpdate();
|
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|
|
@ -29,9 +29,9 @@ document.querySelectorAll("[data-vue-component=archive-list]")
|
||||||
.forEach((element) => {
|
.forEach((element) => {
|
||||||
new ComponentClass({
|
new ComponentClass({
|
||||||
components: {'ArchiveList': ArchiveList},
|
components: {'ArchiveList': ArchiveList},
|
||||||
/*
|
|
||||||
propsData: { ...element.dataset },
|
propsData: { ...element.dataset },
|
||||||
props: ["endpoint", "language", "csrf_token"],
|
props: ["endpoint"],
|
||||||
|
/*
|
||||||
store: store,
|
store: store,
|
||||||
i18n: i18n,
|
i18n: i18n,
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue