尝试让 ref_computed 能同时作用到普通函数和类定义的对象方法上 #89
Closed
CrystalWindSnake
started this conversation in
Ideas
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.
Uh oh!
There was an error while loading. Please reload this page.
-
下面代码示例的所有需要导入的模块:
当前实现,已经做到
ref_computed作用到普通函数上但是不能作用到类中定义的对象方法上
下面是实现能作用到类定义对象方法上:
但如果把两者融合,无法做到很好的 typing hit,如下是简单融合两者的实现:
Beta Was this translation helpful? Give feedback.
All reactions