1 charlie21 2023-10-12 19:00:28 +08:00 via Android 直接在 return 里写东西,这让我想起了 https://www.naiveui.com/zh-CN/os-theme/components/checkbox |
![]() | 3 zhangjiancheng 2023-10-13 09:19:05 +08:00 没有仔细看过 setup 的源码,应该是 setup 在处理 return 的返回值时有做处理,实际在 add()内 console.log(this)也能看到 num 被处理过不需要.value 访问,就像 template 内访问 ref 一样不需要.value |
![]() | 4 CHTuring 2023-10-13 10:08:58 +08:00 因为 setup 中 return 其实就是 render 函数 |