Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

不能动态添加数据 #12

Closed
w582745483 opened this issue Aug 31, 2022 · 1 comment
Closed

不能动态添加数据 #12

w582745483 opened this issue Aug 31, 2022 · 1 comment

Comments

@w582745483
Copy link

<el-button type="" @click="testData">test

const test = ref([{ name: 'xxx' }]);
const testData = () => {
test.value.push({ name: '111' });
};
上面代码完全不能生效,json-viewer没有更新数据

@qiuquanwu
Copy link
Owner

test.value=[...test.value,{ name: '111' }]

试试

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants