You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
keep-alive 文档内容:匹配首先检查组件自身的 name 选项,如果 name 选项不可用,则匹配它的局部注册名称 (父组件 components 选项的键值)。匿名组件不能被匹配。
虽然可以再用1个<script></script>标签声明name解决这个问题,但是按照上面的keep-alive文档内容,是否属于有其他方案?
The text was updated successfully, but these errors were encountered:
Version
3.2.13
Reproduction link
sfc.vuejs.org/
Steps to reproduce
点击更改组件按钮。
What is expected?
<script setup>
语法糖,在父组件中能正确推导出子组件name
<script setup>
语法糖,keep-alive
的include
能正确映射到对应的子组件。What is actually happening?
components
选项的键值无法正确缓存子组件,不会触发子组件的onActivated
。<script setup>
语法糖无法像递归组件一样,推导出对应的子组件,不会触发子组件的onActivated
。keep-alive
文档内容:匹配首先检查组件自身的 name 选项,如果 name 选项不可用,则匹配它的局部注册名称 (父组件 components 选项的键值)。匿名组件不能被匹配。虽然可以再用1个
<script></script>
标签声明name
解决这个问题,但是按照上面的keep-alive
文档内容,是否属于有其他方案?The text was updated successfully, but these errors were encountered: