import snippets from './snippets'; import baseTableProps from '../_props/table/base-table-props'; import { version } from '../../package.json'; import { isPageDesigner, isDev } from '../_utils/utils'; const tableProps = baseTableProps().filter(({ name }) => name !== 'confirmButton'); export default { snippets, // 列表页显示组件 group: '基础组件', category: isPageDesigner() || isDev ? '基础元素' : '容器元素', componentName: 'RsListTable', title: '查询表格', priority: 32, npm: { package: 'components-page', version, exportName: 'RsListTable', main: 'src\\index.tsx', destructuring: true, subName: '', }, props: tableProps, configure: { supports: { style: true, events: [ { name: 'onCellClick', template: "onCellClick(e,record,dataIndex,rowIndex){\n// 点击单元格时触发\nconsole.log('onCellClick', e, record, dataIndex, rowIndex);\n}\n", }, { name: 'onCellDoubleClick', template: "onCellDoubleClick(e,record,dataIndex,rowIndex){\n// 双击单元格时触发\nconsole.log('onCellDoubleClick', e, record, dataIndex, rowIndex);\n}\n", }, { name: 'onRowClick', template: "onRowClick(record, rowIndex){\n/**\n * 点击行时触发\n * `record` - 当前行数据 \n * `rowIndex` - 当前行索引\n */\n console.log('onRowClick', record, rowIndex);\n}\n", }, { name: 'onTreeMarkChange', template: "onTreeMarkChange(checked){\n// 点击表格中树组件下方标记时触发\nconsole.log('onTreeMarkChange', checked);\n}\n", }, { name: 'onTreeSelect', template: "onTreeSelect(value, node){\n// 选中树节点时触发\nconsole.log('onTreeSelect', value, node);\n}\n", }, { name: 'onTreeNodeDrop', template: 'onTreeNodeDrop(info, position){\n return true; \n}\n', }, { name: 'onExpand', template: "onExpand(expanded, record){\n// 展开/收起行时触发\nconsole.log('onExpand', expanded, record);\n}\n", }, { name: 'onSelectChange', template: "onSelectChange(selected){\n// 选中行时触发\nconsole.log('onSelectChange', selected);\n}\n", }, { name: 'onExpandableSelectChange', template: "onExpandableSelectChange(selected){\n// 展开中表格选中行时触发\nconsole.log('onExpandableSelectChange', selected);\n}\n", }, ], }, }, };