Closed w582745483 closed 2 years ago
<el-button type="" @click="testData">test
const test = ref([{ name: 'xxx' }]); const testData = () => { test.value.push({ name: '111' }); }; 上面代码完全不能生效,json-viewer没有更新数据
test.value=[...test.value,{ name: '111' }]
试试
<el-button type="" @click="testData">test
const test = ref([{ name: 'xxx' }]); const testData = () => { test.value.push({ name: '111' }); }; 上面代码完全不能生效,json-viewer没有更新数据