fix(amis-editor): MatrixCheckboxes多选属性配置错误问题 (#7551)

This commit is contained in:
RUNZE LU 2023-07-24 11:15:06 +08:00 committed by GitHub
parent d6703cd982
commit fab9383c9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,16 +1,15 @@
import {defaultValue, getSchemaTpl} from 'amis-editor-core';
import {registerEditorPlugin} from 'amis-editor-core';
import {
registerEditorPlugin,
BasePlugin,
BasicSubRenderInfo,
RendererEventContext,
SubRendererInfo,
BaseEventContext,
tipedLabel
RendererPluginAction,
RendererPluginEvent,
tipedLabel,
defaultValue,
getSchemaTpl
} from 'amis-editor-core';
import {ValidatorTag} from '../../validator';
import {getEventControlConfig} from '../../renderer/event-control/helper';
import {RendererPluginAction, RendererPluginEvent} from 'amis-editor-core';
export class MatrixControlPlugin extends BasePlugin {
static id = 'MatrixControlPlugin';
@ -127,8 +126,9 @@ export class MatrixControlPlugin extends BasePlugin {
required: true
}),
getSchemaTpl('label'),
getSchemaTpl('multiple', {
value: true
getSchemaTpl('switch', {
name: 'multiple',
label: '可多选'
}),
{
label: tipedLabel('模式', '行级、列级或者单个单元单选'),
@ -140,7 +140,7 @@ export class MatrixControlPlugin extends BasePlugin {
left: 2,
justify: true
},
visibleOn: '!this.multiple',
visibleOn: '!data.multiple',
options: [
{
label: '行级',
@ -157,37 +157,15 @@ export class MatrixControlPlugin extends BasePlugin {
],
pipeIn: defaultValue('column')
},
getSchemaTpl('autoFillApi'),
{
label: tipedLabel('列全选', '列级全选功能'),
getSchemaTpl('switch', {
name: 'yCheckAll',
type: 'select',
options: [
{
label: '是',
value: true
},
{
label: '否',
value: false
}
]
},
{
label: tipedLabel('行全选', '行级全选功能'),
label: tipedLabel('列全选', '列级全选功能')
}),
getSchemaTpl('switch', {
name: 'xCheckAll',
type: 'select',
options: [
{
label: '是',
value: true
},
{
label: '否',
value: false
}
]
}
label: tipedLabel('行全选', '行级全选功能')
}),
getSchemaTpl('autoFillApi')
]
},
{