-
Notifications
You must be signed in to change notification settings - Fork 7.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
项目开启页面缓存,但是相同页面的同组件内容会被覆盖 #3247
Comments
看不明白你想表达什么,录制个视频吧 |
就是a页面有上传组件,b页面也有上传组件, |
你的组件是用<script setup>写的么?不是的话 KeepAlive 会根据组件的 name 选项进行匹配,所以组件如果想要条件性地被 KeepAlive 缓存,就必须显式声明一个 name 选项。 |
嗯,使用的不是<script setup>写法,我也是接手的项目,他大概是这样写的
他把Upload上传组件又套在了BasicForm组件里面,所以我想问问能不能给这个Upload上传组件单独声明一个唯一的key,这样打开相同得页面每个上传控件就不重复了。 |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days |
已有数据页面的Upload组件,已有文件数量为1
打开相同页面,但Upload组件已有文件数量为0
此时再切换回Uploa组件有数据的页面。Upload组件变为最近打开时组件的状态
也没有在文档上找到如何设置组件的key来区分组件缓存
The text was updated successfully, but these errors were encountered: