UNPKG

@ywfe/materials-design

Version:
99 lines (96 loc) 2.35 kB
import { IPublicTypeComponentMetadata } from '@alilc/lowcode-types'; import { IPublicTypeSnippetMore, TableBaseProps } from '../_base'; const YwTableMeta: IPublicTypeComponentMetadata = { componentName: 'YwTable', title: 'YwTable', docUrl: '', screenshot: '', devMode: 'proCode', group: '基础组件', category: '表格', npm: { package: '@ywfe/materials-design', version: '0.1.0', exportName: 'YwTable', main: 'src/index.tsx', destructuring: true, subName: '', }, configure: { component: { isContainer: true, nestingRule: { childWhitelist: new RegExp('Table*', 'i'), }, }, props: TableBaseProps, supports: { style: true, loop: false, }, }, }; const snippets: IPublicTypeSnippetMore[] = [ { title: '通用表格', svgId: 'icon-tongyongbiaoge', screenshot: 'https://yw-fed-static.oss-cn-hangzhou.aliyuncs.com/lowcode/basictable', schema: { componentName: 'YwTable', props: { dataSource: [ { id: 1, itemName: '测试商品1', cate: '服饰箱包/女装', price: '线上佣金:15.00%', tag: '已上架', status: '成功', }, { id: 2, itemName: '测试商品2', cate: '服饰箱包/女装', price: '线上佣金:15.00%', tag: '待上架', status: '失败', }, { id: 3, itemName: '测试商品3', cate: '服饰箱包/女装', price: '15.00%', tag: '待上架', status: '测试1', }, { id: 4, itemName: '测试商品4', cate: '服饰箱包/女装', price: '15.00%', tag: '已上架', status: '测试1', }, ], columns: [ { title: '序号', dataIndex: 'id', component: 'IndexCol', width: 80 }, { title: '姓名', dataIndex: 'name', key: 'name', }, { title: '年龄', dataIndex: 'age', key: 'age', }, ], rowKey: 'id', }, }, }, ]; export default { ...YwTableMeta, snippets, };