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/normal-table/columns/editColumn/index.jsx |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 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 6f51d09..8c88120 100644
--- a/src/menu/components/table/normal-table/columns/editColumn/index.jsx
+++ b/src/menu/components/table/normal-table/columns/editColumn/index.jsx
@@ -17,7 +17,7 @@
   picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'blacklist', 'scale', 'lenWidRadio', 'backgroundSize', 'span'],
   video: ['label', 'field', 'type', 'Align', 'Hide', 'startTime', 'Width', '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']
@@ -93,10 +93,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
@@ -106,6 +106,10 @@
     this.record[key] = value
 
     if (key === 'type') {
+      if (['link', 'textarea', 'picture', 'custom'].includes(value)) {
+        this.record.IsSort = 'false'
+      }
+      
       let _options = this.getOptions()
 
       let _field = ''
@@ -125,7 +129,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: ''})
@@ -174,7 +178,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