1. reactive 制空数组
数组:
let table= reactive([
{
id: 1,
name: '哪吒'
},
{
id: 2,
name: '郭源潮'
}
])
制空:
goodList.length = 0;
2.ref 制空数组
数组:
let goodList = ref([
{
id: 1,
name: '哪吒'
},
{
id: 2,
name: '郭源潮'
}
])
制空:
goodList.value.length = 0;
goodList.value = [];
所有评论(0)