projects built with vue cli are mounted in < div id="app" > div >
in template, and in the entry file of webpack:
const app = new Vue({
el: "-sharpapp",
data: {
text: ""
},
});
want to use a method in template to change the value of data and update the view. Used
document.getElementById ("change"). Onclick = function () {
Vue.set(app.$data,"text","")
The }
value can be changed, but the view has not been updated. Is there any way to update the view?