1.构造函数内部
function Vue() {
this.name="mixins"
this.mixins=function() {
console.log(this.name);
}
}
2.构造函数原型
Vue.prototype.mixins=function(){
console.log(this.name);
}
1.构造函数内部
function Vue() {
this.name="mixins"
this.mixins=function() {
console.log(this.name);
}
}
2.构造函数原型
Vue.prototype.mixins=function(){
console.log(this.name);
}