组合式语法应当还可以更好 #11981
15953835029
started this conversation in
Ideas
组合式语法应当还可以更好
#11981
Replies: 1 comment
-
|
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
Uh oh!
There was an error while loading. Please reload this page.
-
1:const variable =ref({number:1,string:"test"}) 改为 ref variable = {number:1,string:"test"}
2:组合式API中的 watch(variable ,(newval,oldval)=>{代码片段}) 改为 variable.watch((new,old,deep,immediate)=>{代码片段}) 或者watch.variable(代码片段);对于只监听单个属性的 可以 variable.number.watch(代码片段)
Beta Was this translation helpful? Give feedback.
All reactions