1. First you have some mosaic html code
let conten=`<button οnclick="come()">点我</button>`;
2. Then you need to have a function in the methods of
methods:{
come:function(){
alert('你好,再见!')
},
}
3. The next step is to serve as a bridge connecting the key points
created(){
let _this=this;
window.come=_this.come;
},