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
Used Package Manager
npm
Validations