UNPKG

@cainiaofe/cn-ui-lowcode

Version:
143 lines (141 loc) 3.24 kB
import { ActionSetter, BoolSetter, ChoiceSetter, NumberSetter, } from '@ali/visualengine-utils'; export default function () { return { title: '风格和样式', type: 'group', display: 'entry', collapsed: true, items: [ { name: 'size', title: '表格尺寸', display: 'block', initialValue: 'medium', setter: ( <ChoiceSetter options={[ { value: 'small', title: '紧凑' }, { value: 'medium', title: '标准' }, { value: 'large', title: '宽松' }, ]} /> ), // supportVariable: true, }, { name: 'zebra', title: '斑马线', display: 'block', initialValue: false, // supportVariable: true, setter: <BoolSetter />, }, { name: 'hasBorder', title: '边框线', display: 'block', initialValue: false, // supportVariable: true, setter: <BoolSetter />, }, { name: 'showIndex', title: '显示序号', display: 'block', initialValue: false, // supportVariable: true, setter: <BoolSetter />, }, { name: 'crossline', title: '十字参考轴', display: 'block', tip: '是否开启十字参考轴', initialValue: false, // supportVariable: true, setter: <BoolSetter />, }, { name: 'isStickyHeader', title: '表头固定', display: 'block', initialValue: true, // supportVariable: true, setter: <BoolSetter />, }, { name: 'maxHeight', title: '最大高度', display: 'block', tip: '超过这个高度会出现滚动条', // supportVariable: true, setter: <NumberSetter />, }, { name: 'cellProps', title: '单元格分割合并', setter: ( <ActionSetter defaultActionName='cellProps' defaultCode={`/** * tablePc cellProps * @param rowIndex 行索引 * @param colIndex 列索引 * @param dataIndex 字段索引 * @param record 字段记录 */ function cellProps(rowIndex, colIndex, dataIndex, record) { // if (rowIndex === 0 && colIndex === 2) { // return { // // take 2 cols' space // colSpan: 2 // }; // } }`} /> ), }, { name: 'rowProps', title: '行属性配置', setter: ( <ActionSetter defaultActionName='rowProps' defaultCode={`/** * tablePc rowProps * @param record 字段记录 * @param index 行索引 */ function rowProps(record, index) { // if (index === 0) { // return { // className: 'my-test' // }; // } }`} /> ), }, { name: 'emptyContent', title: '空数据渲染', setter: ( <ActionSetter defaultActionName='renderEmptyContent' defaultCode={`/** * tablePc emptyContent */ function renderEmptyContent() { return <div>暂无数据</div>; }`} /> ), }, ], }; }