thedocks/caddy/site/links/index.js
2022-01-07 21:59:21 +00:00

25 lines
455 B
JavaScript

// app
Vue.use(Vuetify);
var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue!',
json: links,
hits:0,
loaded: null
},
methods:{
load() {
this.loaded = new Date()
this.hits += 1
fetch("links.json")
.then(response => response.json())
.then(data => (this.links = data));
}
},
mounted () {
this.load()
}
});