Open
Description
Version: 6.4.1
Desc:
When the list changes, the data will not be updated
Code:
<div @click="changeTab(2)">test change tab</div>
<div
class="item"
v-for="(item, index) in currentList"
:key="index">
<Tippy
contentClass="tippy-point"
placement="bottom"
:interactive="true"
ref="tippy"
:key="'tippy-point' + index"
@show="show"
@hide="hide"
>
<template #content>
<List :list="item.rewards" />
</template>
</Tippy>
</div>
...
const list = ref([
{
rewards: [1,2,3]
},
{
rewards: [10,20,30]
},
{
rewards: [100,200,300]
}
]);
const tab = ref(1);
const changeTab = (val) => {
tab.value = val;
};
const currentList = computed(() => list.value?.[tab.value - 1]);
List Component:
<div class="list">
<div
class="list-item"
v-for="(item, index) in list"
:key="index"
>
{{item}}
</div>
</div>
But the problem disappears after rolling back to 6.3.1
Metadata
Assignees
Labels
No labels