Merge pull request #7766 from hsm-lv/fix-event

fix:复选框上下文单选情况
This commit is contained in:
hsm-lv 2023-08-10 09:44:15 +08:00 committed by GitHub
commit 119a3fd615
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -249,33 +249,44 @@ export class CheckboxesControlPlugin extends BasePlugin {
originalValue: node.schema?.value // 记录原始值,循环引用检测需要
};
if (node.schema?.extractValue) {
if (node.schema?.joinValues === false) {
dataSchema = {
type: 'array',
title: node.schema?.label || node.schema?.name
};
} else if (node.schema?.joinValues === false) {
dataSchema = {
type: 'array',
...dataSchema,
type: 'object',
title: node.schema?.label || node.schema?.name,
items: {
type: 'object',
title: '成员',
properties: {
label: {
type: 'string',
title: '文本'
},
value: {
type,
title: '值'
}
properties: {
label: {
type: 'string',
title: '文本'
},
value: {
type,
title: '值'
}
},
originalValue: dataSchema.originalValue
}
};
}
if (node.schema?.multiple) {
if (node.schema?.extractValue) {
dataSchema = {
type: 'array',
title: node.schema?.label || node.schema?.name
};
} else if (node.schema?.joinValues === false) {
dataSchema = {
type: 'array',
title: node.schema?.label || node.schema?.name,
items: {
type: 'object',
title: '成员',
properties: dataSchema.properties
},
originalValue: dataSchema.originalValue
};
}
}
return dataSchema;
}
}