Skip to content

Commit 5e6886a

Browse files
authored
fix: 修复重置数组类型的值不正确问题 (#98)
1 parent c0c4cc1 commit 5e6886a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/devui-vue/devui/form/src/form-item/form-item.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ export default defineComponent({
1818
const rules = reactive(dForm.rules);
1919

2020
const resetField = () => {
21-
formData[props.prop] = initFormItemData;
21+
if(Array.isArray(initFormItemData)) {
22+
formData[props.prop] = [...initFormItemData];
23+
}else {
24+
formData[props.prop] = initFormItemData;
25+
}
2226
}
2327

2428
const formItem = reactive({

0 commit comments

Comments
 (0)