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