UNPKG

@aliretail/react-materials-components

Version:
63 lines (58 loc) 1.37 kB
--- title: TableX - 无分页器 order: 151 --- ```jsx import React from 'react'; import ReactDOM from 'react-dom'; import { FormComponents } from '@aliretail/react-materials-components'; const { setup, SchemaForm, SchemaMarkupField: Field, FormEffectHooks, createFormActions, } = FormComponents; setup(); const { onFieldMount$ } = FormEffectHooks; const App = () => { return ( <SchemaForm onChange={console.log} defaultValue={{ table: [ { code: '130100', // 叶子节点编号 name: '河北省/石家庄市', // 当前地址名称 children: [{ name: '子表格名称1' }, { name: '子表格名称2' }], }, ], }} schema={{ type: 'object', properties: { table: { type: 'object', 'x-component': 'TableX', 'x-component-props': { // 显示cell显示控制器 showTableSetting: true, columns: [ { dataIndex: 'code', title: '叶子节点编号', }, { dataIndex: 'name', title: '当前地址名称', }, ], }, }, }, }} /> ); }; ReactDOM.render(<App />, mountNode); ```