I am facing an issue with a mobile webview where a global config object is being injected:
Vue.prototype.$configServer = {
MODE: "DEBUG",
isMobile: false,
injected: false,
version: -1,
title:"App",
user: null,
host: "http://127.0.0.1:8080"
}
Subsequently, the WebView injects this updated configuration:
Vue.prototype.$configServer = {
MODE: "DEBUG",
title: "App",
version: "2.0",
isMobile: true,
injected: true,
host: "http://127.0.0.1:8081"
}
As I try to utilize this configuration in my component:
const HomePage = {
key: 'HomePage',
template: '#HomePage',
components: { toolbar },
data() {
return {
items: [
{name:"Login", link:"login"},
]
}
},
computed:{
config() {
return Vue.prototype.$configServer
}
},
};
Despite updating the config object, the page does not reflect these changes. How can I ensure the page reacts to the updated configuration?
P.D: I have confirmed that the object is updated using Safari debug tools and also tested it on a local HTML file.