Skip to content
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

keep-alive about dynamic component #6223

Closed
zhoufanglu opened this issue Jul 4, 2022 · 1 comment
Closed

keep-alive about dynamic component #6223

zhoufanglu opened this issue Jul 4, 2022 · 1 comment

Comments

@zhoufanglu
Copy link

Vue version

3.2.25

Link to minimal reproduction

none

Steps to reproduce

1、display
YkddcDI1bi
2、code
include is component name
key bind component id

  <router-view v-slot="{ Component, route }" >
    {{route.query.id}}
    <keep-alive :include="includes">
      <component :is="Component" :key="route.query.id"></component>
    </keep-alive>
  </router-view>

3、add Component

const helloWorlds = ref([
  { name: 'world-1', id: 1},
  { name: 'world-2', id: 2},
])
const addWorld = () => {
  const len = helloWorlds.value.length + 1
  helloWorlds.value.push({
    name: `world${len}`,
    id: len
  })
}

What is expected?

i want cache is empty when adding new component

What is actually happening?

cache is exist when adding new component

System Info

No response

Any additional comments?

No response

@LinusBorg
Copy link
Member

please provide a reproduction link

@github-actions github-actions bot locked and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants