首先可以在data中先声明一个变量 比如 sureDelBox : ' ' mounted 中 ---> methods 中 ---> this.sureDelBox(item) 直接this调用 这时候要传的参数别忘记带上 如果你要问在mounted中调用 ...
a:function goods this.aa this.bb this.cc , b:function if this.bbb this.aa this.bb this.cc this. message message: 结账成功 , type: success 上面代码块里a方法里的代码和b方法里面的代码一模一样,可以使用 this. options.methods.a.bind this ...
2018-11-06 14:32 0 1464 推荐指数:
首先可以在data中先声明一个变量 比如 sureDelBox : ' ' mounted 中 ---> methods 中 ---> this.sureDelBox(item) 直接this调用 这时候要传的参数别忘记带上 如果你要问在mounted中调用 ...
vue在同一个组件内; methods中的一个方法调用methods中的另外一个方法。 可以在调用的时候 this.$options.methods.test(); this.$options.methods.test2();一个方法调用另外一个方法; ...
转自http://blog.csdn.net/zhangjing1019/article/details/77942923 vue在同一个组件内; methods中的一个方法调用methods中的另外一个方法 可以在调用的时候 this.$options.methods ...
<!DOCTYPE html> <html lang="en"> <head> <meta ch ...
close函数调用open函数,close函数里调用的open函数的参数this赋值给that,这样可以通过that调用到data中的hello。 ...
close函数调用open函数,close函数里调用的open函数的参数this赋值给that,这样可以通过that调用到data中的hello。 ...
vue在同一个组件内;方法之间经常需要互相调用。 methods中的一个方法如何调用methods中的另外一个方法呢? 可以在调用的时候使用 this.$options.methods.test2(); new Vue({ el: '#app', data ...
方法1: methods1(){ console.log(' 方法1 ') } 方法2: methods2(){ console.log(' 方法2 ') this.$options.methods.methods1() } ...