ITADN

Bug: VbenFormFieldArray 中的问题

#8090ClosedLayHuts 创建于 2026-06-25
bug: pending triage
L
LayHutscommented
### Version Vben Admin V5 ### Describe the bug? 1. VbenFormFieldArray在antdv-next中初始化值无法进行编辑提示[Vue warn] Set operation on key "label" failed: target is readonly. 2. dependencies 对应功能使用无效无法触发事件 ### Reproduction { component: 'VbenFormFieldArray', fieldName: 'attrs', hideLabel: true, formItemClass: 'col-span-2 md:col-span-2', defaultValue: [{ label: '名称', displayType: 'text', isRequired: false, optionTypeCode: '0001', }], componentProps: { min: 0, max: 5, showIndex: true, addButtonText: '添加属性', emptyText: '暂无属性', createRow: () => ({ label: '', displayType: '', isRequired: false, optionTypeCode: '', }), schema: [ { component: 'Input', fieldName: 'label', label: '名称', rules: 'required', }, { component: 'Select', fieldName: 'displayType', label: '类型', componentProps: { class: 'w-full', options: [ { label: '文本', value: 'text' }, { label: '数字', value: 'number' }, { label: '选择', value: 'select' }, ], }, }, { component: 'Switch', fieldName: 'isRequired', label: '必填', }, { component: 'Input', fieldName: 'optionTypeCode', label: '选择方式', }, ], }, } ### System Info ```shell System: OS: macOS 13.7.8 CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz Memory: 16.95 MB / 16.00 GB Shell: 5.9 - /bin/zsh Browsers: Chrome: 149.0.7827.158 Safari: 18.6 ``` ### Relevant log output ```shell form-field.vue:272 [Vue warn] Set operation on key "label" failed: target is readonly. Proxy(Object) {label: '名称', displayType: 'text', isRequired: true, optionTypeCode: '0001'} ``` ### Validations - [x] Read the [docs](https://doc.vben.pro/) - [x] Ensure the code is up to date. (Some issues have been fixed in the latest version) - [x] I have searched the [existing issues](https://github.com/vbenjs/vue-vben-admin/issues) and checked that my issue does not duplicate any existing issues. - [x] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vbenjs/vue-vben-admin/discussions) or join our [Discord Chat Server](https://discord.gg/8GuAdwDhj6). - [x] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
关闭于 2026-07-21 1 条评论