How to update the external modification data built in vue in real time?

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?

Jul.07,2022

can't you app.text='xxx' directly?
or there is something wrong with my understanding.

Menu