-
-
Notifications
You must be signed in to change notification settings - Fork 963
Open
Description
Describe the bug
vue3中,setup声明响应式变量(如:const list =ref([]) ),传入组件recycleScroller的响应式数据已变化,但页面不响应更新
Reproduction
{{ props.item.name }}
<script lang="ts" setup>
import { watch, ref } from 'vue'
const props = defineProps<{
tasks: Task[]
}>()
// 当前实际展示在页面上的任务列表
const displayTasks = ref([])
watch(
() => props.tasks,
(newTasks) => {
displayTasks.value = newTasks
},
{ deep: true }
)
</script>
System Info
version: 2.0.0-beta.8
Used Package Manager
npm
Validations
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
No labels