ref-multiple-table 表格参照
表格参照
代码演示
$ npm install ref-multiple-table-ui --save
/** * * @title ref-multiple-table-base 复杂查询表格参照的ui * @description 复杂查询表格参照 * */ ;;; /** 请求接口获取数据*/ { const getFieldErrorgetFieldProps = thispropsform; let showLoadingshowModal = thisstate; let columnsData tableData pageCount pageSize currPageIndex fliterFormInputs filterInfo checkedArray checkedMap = this; let dataNumSelecthandlePaginationsearchFilterInfo = this; let childrenProps = Object; return <div className="demoPadding"> <RefMultipleTableBaseUI placeholder="placehholder" title='复杂表格参照' backdrop=true disabled=false multiple=true strictMode=true miniSearch=false emptyBut=true ...childrenProps ... /> <span className='error'> </span> <Button colors="primary" onClick= { this }>打开参照</Button> <Button colors="primary" onClick= { thispropsform; }>submit</Button> </div> }
表格参照对外提供的组件有
RefTreeTableBaseUI
表格参照的纯ui,需要正确的参数传入
SearchPanelItem
表格参照搜索面板处的搜索条件
RefTreeTableBaseUI API
注意:以下参数为 <RefTreeTableBaseUI/>
需要使用的,为了保证功能的正常使用请传入。
参数 | 类型 | 默认值 | 说明 | 必选 |
---|---|---|---|---|
className | string |
空 | 参照class样式,作用于弹出层的样式,默认为空。 | 否 |
title | string |
空 | 打开上传的模态框显示的标题文字 | 否 |
backdrop | bool |
true | 弹出层是否有模态层,true 显示,false 不显示 | 否 |
showModal | bool |
false | 是否展示参照 ,true显示,false不显示(refcorewithinput可以提供) | 否 |
onSave | function(value) |
-- | 参照确定的回调(refcorewithinput可以提供) | 否 |
onCancel | function(value) |
-- | 参照取消的回调(refcorewithinput可以提供) | 否 |
lang | string |
zh_TW |
多语配置,详情查看参数详解 | 否 |
buttons | object |
- | {buttons:{cancelText:'',confirmText:'',okText:''}} 按钮文字展示 | 否 |
emptyBut | bool |
false | 清空按钮是否展示 | 否 |
miniSearch | Boolean |
true | 默认是简单搜索 | 否 |
size | String |
'lg' | modal的size | 否 |
valueField | string |
'refcode' | 待提交的 value 的键。 | 否 |
searchFilterInfo | function(value) |
复杂搜索的查询回调,将搜索条件带回 | 否 | |
showLoading | bool |
false | 是否展示loading,多用于请求中 | 否 |
*fliterFormInputs | Array |
-- | 查询条件 | 否 |
*tableData | Array |
— | 表体数据 | 否 |
*columsData | Array |
— | 表头数据 | 否 |
pageCount | number |
— | 总页数 | 否 |
currPageIndex | number |
— | 当前页数 | 否 |
totalElements | number |
— | 一共多少条 | 否 |
dataNumSelect | function() |
— | 选择每页多少条的回调函数 | 否 |
handlePagination | function() |
— | 切换页的方法 | 否 |
注意:modalShow在refcorewithinput中有提供。因为若是refcorewithinput和refmultipletablebaseui配合使用,则不需要额外提供modalShow的,onSave和onCancel
SearchPanelItem API
注意:以下参数为 <SearchPanelItem/>
需要使用的,为了保证功能的正常使用请传入。
参数 | 类型 | 默认值 | 说明 | 必选 |
---|---|---|---|---|
key | String |
--- | key值 | 否 |
name | String |
--- | getFieldProps(name, option)的name字段,设置表单元素name,不可以重复 | 否 |
text | String |
--- | 搜索框的标题 | 否 |
参数详解
eg: lang: "zh_CN" // 中文 "en_US" // 英文 "zh_TW" // 繁体中文 "fr_FR" // 法文 "de_DE" // 德文 "ja_JP" // 日文
示例
开发调试
$ npm install $ npm run dev