provide 无法使用异步数据有优化的可能吗? #6423
Unanswered
ZeronoFreya
asked this question in
Help/Questions
Replies: 1 comment 7 replies
-
let list = $ref([])
provide("list", list) 会被编译成 let list = _ref([])
provide("list", list.value) provide出去的并不是响应式数据。 应该这样写 demo |
Beta Was this translation helpful? Give feedback.
7 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.
-
此处代码手打的,可能会出现错误,但意思没问题
这里参考网上的做法:
只有这样才能正确得到list的值,这应该不是故意设计得吧?这么写是必须的吗?
watch这么写才能监听到变化,为什么无法监听list?
不太明白为何会这样,感觉和看到的不一样,很是困惑。
Beta Was this translation helpful? Give feedback.
All reactions