mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
fix(form): 初始化values时,数组中的对象出现key丢失
This commit is contained in:
parent
fd1fea2519
commit
32e86d8167
@ -71,7 +71,7 @@ const initItemsValue = (
|
||||
{ items, name, extensible }: any,
|
||||
) => {
|
||||
if (Array.isArray(initValue[name])) {
|
||||
value[name] = initValue[name].map((v: any) => init(mForm, items, v));
|
||||
value[name] = initValue[name].map((v: any, index: number) => init(mForm, items, v, value[name]?.[index]));
|
||||
} else {
|
||||
value[name] = init(mForm, items, initValue[name], value[name]);
|
||||
if (extensible) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user