From 8d66ff34fae5b048a6b7923cc75d34f13a08be9d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 02 八月 2022 11:42:43 +0800 Subject: [PATCH] Merge branch 'develop' --- src/menu/components/table/edit-table/columns/editColumn/index.jsx | 21 ++++++++++++++------- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/menu/components/table/edit-table/columns/editColumn/index.jsx b/src/menu/components/table/edit-table/columns/editColumn/index.jsx index 1af68b0..3997baa 100644 --- a/src/menu/components/table/edit-table/columns/editColumn/index.jsx +++ b/src/menu/components/table/edit-table/columns/editColumn/index.jsx @@ -64,9 +64,9 @@ _options.push('editType') if (this.column.editType === 'switch') { - _options.push('enter', 'footEnter', 'openVal', 'closeVal', 'openText', 'closeText') + _options.push('enter', 'openVal', 'closeVal', 'openText', 'closeText', 'editField') } else if (this.column.editType === 'select') { - _options.push('required', 'enter', 'footEnter', 'resourceType', 'linkSubField', 'editField') + _options.push('required', 'enter', 'resourceType', 'linkSubField', 'editField', 'dropdown') if (this.column.resourceType === '0') { _options.push('options') @@ -74,10 +74,10 @@ _options.push('dataSource', 'valueField', 'valueText', 'orderBy', 'orderType', 'disableField', 'database') } } else { - _options.push('required', 'enter', 'footEnter') + _options.push('required', 'enter') } } else if (this.column.type === 'number') { - _options.push('max', 'min', 'enter', 'footEnter') + _options.push('max', 'min', 'enter') } } @@ -85,7 +85,14 @@ } editColumn = (column) => { - let formlist = getColumnForm(column, this.props.fields, this.props.columns) + let fields = fromJS(this.props.fields).toJS().map(item => { + if (item.label.toLowerCase() !== item.field.toLowerCase()) { + item.text = item.label + '锛�' + item.field + '锛�' + } + return item + }) + + let formlist = getColumnForm(column, fields, this.props.columns) this.column = fromJS(column).toJS() this.column.editType = this.column.editType || 'text' @@ -132,7 +139,7 @@ } }) } else if (key === 'field') { - let values = {label: option.props.children} + let values = {label: option.props.label || option.props.children} if (/Decimal|int/ig.test(option.props.datatype)) { let decimal = 0 if (/Decimal/ig.test(option.props.datatype)) { @@ -270,7 +277,7 @@ getPopupContainer={() => document.getElementById('edit-table-column-winter')} > {item.options.map((option, i) => - <Select.Option key={i} datatype={option.datatype || ''} value={(option.value || option.field || option.MenuID)}> + <Select.Option key={i} datatype={option.datatype || ''} label={option.label || ''} value={(option.value || option.field || option.MenuID)}> {(option.text || option.label || option.MenuName)} </Select.Option> )} -- Gitblit v1.8.0