mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
fix:复选框上下文单选情况
This commit is contained in:
parent
caae2e9271
commit
3c8a4e5181
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user