From 742f7d11557526038d332e60a8c8ca18177bc4e4 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 26 十月 2023 15:51:58 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/menu/components/table/base-table/columns/editColumn/index.jsx | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/menu/components/table/base-table/columns/editColumn/index.jsx b/src/menu/components/table/base-table/columns/editColumn/index.jsx index 7318054..3c5bc6b 100644 --- a/src/menu/components/table/base-table/columns/editColumn/index.jsx +++ b/src/menu/components/table/base-table/columns/editColumn/index.jsx @@ -16,7 +16,7 @@ picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'fieldlength', 'blacklist', 'scale', 'lenWidRadio', 'backgroundSize', 'span'], video: ['label', 'field', 'type', 'Align', 'Hide', 'startTime', 'Width', 'fieldlength', 'blacklist', 'aspectRatio'], colspan: ['label', 'type', 'Align', 'Hide', 'blacklist'], - custom: ['label', 'type', 'Align', 'Width', 'blacklist'], + custom: ['label', 'type', 'Align', 'Width', 'blacklist', 'IsSort'], action: ['label', 'type', 'Align', 'Width'], formula: ['label', 'type', 'Align', 'Hide', 'Width', 'prefix', 'postfix', 'eval', 'formula', 'blacklist'], index: ['label', 'type', 'Align', 'Width'] @@ -95,10 +95,10 @@ } else if (this.record.perspective === 'linkurl') { _options.push('linkurl', 'linkfields', 'open') } - } - - if (this.record.type === 'formula' && this.record.eval === 'true') { + } else if (this.record.type === 'formula' && this.record.eval === 'true') { _options.push('decimal') + } else if (this.record.type === 'custom' && this.record.IsSort === 'true') { + _options.push('sortField') } return _options @@ -109,6 +109,10 @@ this.record[key] = value if (key === 'type') { + if (['link', 'textarea', 'picture', 'custom'].includes(value)) { + this.record.IsSort = 'false' + } + let _options = this.getOptions() this.setState({ @@ -126,7 +130,7 @@ return item }) }, () => { - if (value === 'link' || value === 'textarea' || value === 'picture') { + if (['link', 'textarea', 'picture', 'custom'].includes(value)) { this.props.form.setFieldsValue({IsSort: 'false'}) } else if (value === 'text' || value === 'number') { this.props.form.setFieldsValue({perspective: ''}) @@ -173,7 +177,7 @@ } } else if (key === 'format' && value === 'percent') { this.props.form.setFieldsValue({postfix: '%'}) - } else if (['perspective', 'eval'].includes(key)) { + } else if (['perspective', 'eval', 'IsSort'].includes(key)) { let _options = this.getOptions() this.setState({ -- Gitblit v1.8.0