try computed
This commit is contained in:
parent
cb014d7869
commit
847796c173
Binary file not shown.
|
@ -52,9 +52,20 @@ fetch(jsonurl)
|
|||
|
||||
let vm = new Vue({
|
||||
el: '#root',
|
||||
computed : {
|
||||
db: function () {
|
||||
const jsonurl = "https://ed.brz9.dev/proj/map/asset/json/db.json"
|
||||
let jdb
|
||||
|
||||
fetch(jsonurl)
|
||||
.then(res => res.json())
|
||||
.then(data => jdb = data)
|
||||
|
||||
return jdb
|
||||
},
|
||||
},
|
||||
data: {
|
||||
currentLang: 'fr',
|
||||
db : jdb.db,
|
||||
db2 : {
|
||||
restaurants : {
|
||||
id : "resto",
|
||||
|
|
Loading…
Reference in New Issue