25 lines
455 B
JavaScript
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()
|
|
}
|
|
});
|