@cainiaofe/cn-ui-m-lowcode
Version:
79 lines (76 loc) • 2.31 kB
JavaScript
import { createButtonListSetters } from '@/common/manager/button';
import { ButtonPosition } from '@/type/button-position';
const { ChoiceSetter } = window.VisualEngineUtils || {};
export default function (env) {
return {
title: '底部工具栏',
type: 'group',
display: 'entry',
collapsed: true,
items: [
{
name: 'showToolbar',
title: '是否开启',
initialValue: false,
display: 'inline',
setter: 'BoolSetter',
// supportVariable: true,
mutator(value) {
if (!value) {
this.getNode().setPropValue('toolbar', {});
} else {
// this.getNode().setPropValue('toolbar', {
// });
}
},
},
{
type: 'composite',
name: 'toolbar',
title: '底部工具栏',
display: 'plain',
disabled() {
return !this.getProps().getPropValue('showToolbar');
},
items: [
{
name: 'batchArea',
title: '表格选中项相关操作按钮',
display: 'accordion',
setter: createButtonListSetters({
position: ButtonPosition.tableBatchArea,
childrenTitle: '按钮文案',
}),
},
{
name: 'toolArea',
title: '表格全局工具按钮',
display: 'accordion',
setter: createButtonListSetters({
position: ButtonPosition.tableToolArea,
childrenTitle: '按钮文案',
}),
},
// {
// name: 'settings',
// title: '内置工具按钮',
// display: 'block',
// // supportVariable: true,
// initialValue: ['size', 'fullscreen', 'columnSet', 'zebra'],
// setter: (
// <ChoiceSetter
// multiple
// options={[
// { title: '尺寸大小', value: 'size' },
// { title: '是否满屏', value: 'fullscreen' },
// { title: '列设置', value: 'columnSet' },
// { title: '斑马线', value: 'zebra' },
// ]}
// />
// ),
// },
],
},
],
};
}