vue中methods函数调用methods函数写法

 1 export default { 2   data() {
 3     return {
 4       hello:"你好"
 5     }
 6   },
 7   methods:{
 8     open(that) {
 9       that.hello = "hello world!"
10     },
11     close() {
12       this.$options.methods.open(this)
13     }
14   }
15 }
close函数调用open函数,close函数里调用的open函数的参数this赋值给that,这样可以通过that调用到data中的hello。
以上是 vue中methods函数调用methods函数写法 的全部内容, 来源链接: utcz.com/z/379563.html
