Merge branch 'feat-4-toolbar-subform' into feat-optimize-5

This commit is contained in:
jiatianqi 2022-08-11 19:31:42 +08:00
commit ecc7d58eed

View File

@ -59,42 +59,45 @@ export class ButtonToolbarControlPlugin extends BasePlugin {
panelTitle = '工具栏';
panelJustify = true;
panelBodyCreator = (context: BaseEventContext) => {
return formItemControl(
return getSchemaTpl('tabs', [
{
common: {
replace: true,
title: '属性',
body: [
getSchemaTpl('collapseGroup', [
{
title: '基本',
body: [
getSchemaTpl('formItemName', {
required: true
}),
getSchemaTpl('label'),
getSchemaTpl('remark'),
getSchemaTpl('valueFormula', {
rendererSchema: {
type: 'input-text'
}
}),
getSchemaTpl('labelRemark'),
getSchemaTpl('description')
]
},
option: {
title: '按钮管理',
replace: true,
body: [
{
name: 'buttons',
getSchemaTpl('remark'),
getSchemaTpl('description'),
getSchemaTpl('combo-container', {
type: 'combo',
label: '',
label: '按钮管理',
name: 'buttons',
mode: 'normal',
multiple: true,
addable: true,
minLength: 1,
draggable: true,
draggableTip: '',
editable: false,
visibleOn: 'this.buttons && this.buttons.length',
items: [
{
type: 'tpl',
inline: false,
tpl:
'<span class="label label-default"><% if (data.type === "button-group") { %> 按钮组 <% } else { %><%= data.label %><% if (data.icon) { %><i class="<%= data.icon %>"/><% }%><% } %></span>'
className: 'p-t-xs',
tpl: '<span class="label label-default"><% if (data.type === "button-group") { %> 按钮组 <% } else { %><%= data.label %><% if (data.icon) { %><i class="<%= data.icon %>"/><% }%><% } %></span>'
}
],
addButtonText: '新增按钮',
@ -102,15 +105,44 @@ export class ButtonToolbarControlPlugin extends BasePlugin {
type: 'button',
label: '按钮'
}
}
}),
]
},
event: {
hidden: false
}
getSchemaTpl('status', {
isFormItem: true,
})
]),
]
},
context
);
{
title: '外观',
body: [
getSchemaTpl('collapseGroup', [
{
title: '基本',
body: [
getSchemaTpl('formItemMode'),
getSchemaTpl('horizontal', {
label: '',
visibleOn:
'data.mode == "horizontal" && data.label !== false && data.horizontal'
}),
]
},
getSchemaTpl('style:classNames', {
isFormItem: true,
schema: [
getSchemaTpl('className', {
label: '描述',
name: 'descriptionClassName',
visibleOn: "this.description"
})
]
}),
])
]
}
]);
};
}