Vue2学习Vue3问个逻辑问题 #11777
Vue2学习Vue3问个逻辑问题
#11777
Replies: 1 comment
-
Closing as a duplicate of https://github.com/orgs/vuejs/discussions/11776 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
想问个问题,按照vue3的设计方法,先定义参数,再定义方法,那么我定义了个a参数,底下是a参数对应的1方法,那么我如果在2方法里要改变a参数,我是再调用a参数还是新建个b参数,因为vue2是直接都定义在data里面的,所以不管在哪个方法里都可以修改,那么现在我是修改a参数还是新建b参数呢,这不是背离了组合式api的初衷吗,就是一块一块的,那比如我方法2要用a参数,我不是还得往上翻这个参数叫什么嘛,那不还是跟vue2的data一样,然后vue3好像还有一个就是定义在后面的东西前面的方法不能调用
Beta Was this translation helpful? Give feedback.
All reactions