From 6f2b0cab4c9a4dacfebb2d6fbd4ec2fdc14e22ba Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 29 四月 2024 15:29:58 +0800 Subject: [PATCH] 2024-04-29 --- src/menu/components/table/normal-table/columns/editColumn/index.jsx | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/menu/components/table/normal-table/columns/editColumn/index.jsx b/src/menu/components/table/normal-table/columns/editColumn/index.jsx index 7104329..afa1f03 100644 --- a/src/menu/components/table/normal-table/columns/editColumn/index.jsx +++ b/src/menu/components/table/normal-table/columns/editColumn/index.jsx @@ -20,6 +20,7 @@ custom: ['label', 'type', 'Align', 'Width', 'blacklist', 'IsSort'], action: ['label', 'type', 'Align', 'Width'], formula: ['label', 'type', 'Align', 'Hide', 'Width', 'prefix', 'postfix', 'eval', 'formula', 'blacklist'], + extend: ['label', 'field', 'type', 'Align', 'Width', 'colUnit', 'shift', 'quota', 'supField'], index: ['label', 'type', 'Align', 'Width'] } @@ -97,6 +98,12 @@ _options.push('decimal') } else if (this.record.type === 'custom' && this.record.IsSort === 'true') { _options.push('sortField') + } else if (this.record.type === 'extend') { + if (this.record.colUnit === 'day') { + _options.push('dayFormat') + } else { + _options.push('hourFormat') + } } if (this.record.Hide !== 'true') { @@ -186,7 +193,7 @@ } } else if (key === 'format' && value === 'percent') { this.props.form.setFieldsValue({postfix: '%'}) - } else if (['perspective', 'eval', 'IsSort', 'textFormat'].includes(key)) { + } else if (['perspective', 'eval', 'IsSort', 'textFormat', 'colUnit'].includes(key)) { let _options = this.getOptions() this.setState({ @@ -211,12 +218,12 @@ if (item.hidden || item.forbid) return if (item.type === 'text') { - let rules = [] + let rules = item.rules || [] if (item.key !== 'linkurl') { - rules = [{ + rules.push({ max: formRule.input.max, message: formRule.input.message - }] + }) } fields.push( <Col span={12} key={index}> @@ -356,7 +363,7 @@ </Form.Item> </Col> ) - } else if (item.type === 'cascader') { // 澶氶�� + } else if (item.type === 'cascader') { fields.push( <Col span={12} key={index}> <Form.Item label={item.label}> -- Gitblit v1.8.0