I see that someone on github also mentioned a similar issue on this question, but he didn"t seem to give a specific reason. https://github.com/vuejs/vue/...
specific scenario
I defined a method such as
var ms = {
open:function(url){
//
}
}
on the specific page, I introduce this file into the header
this is the business code
< div id="app" >
<button @click="ms.open("./home/)">1</button>
<button onclick="ms.open("./home/)">2</button>
< / div >
< script >
var app = new Vue({
el:-sharpapp,
data:{
}
})
< / script >
here comes the problem. Whether I click button 1 or button 2, it shows that ms is not defined? Excuse me, bosses, what is the reason for this? Is there a good solution to such a scenario?