From d52169be5ed98d6846bb07f75e5a305271e374d4 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 27 四月 2023 18:07:05 +0800
Subject: [PATCH] 2023-04-27

---
 src/menu/components/table/edit-table/columns/editColumn/index.jsx |    7 +++++++
 1 files changed, 7 insertions(+), 0 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 ba7f32b..ed167a3 100644
--- a/src/menu/components/table/edit-table/columns/editColumn/index.jsx
+++ b/src/menu/components/table/edit-table/columns/editColumn/index.jsx
@@ -128,6 +128,11 @@
     if (key === 'type') {
       let _options = this.getOptions()
 
+      let _field = ''
+      if (value === 'formula') {
+        _field = this.props.form.getFieldValue('field') || ''
+      }
+
       this.setState({
         formlist: this.state.formlist.map(item => {
           item.initVal = this.column[item.key] || item.initVal
@@ -138,6 +143,8 @@
       }, () => {
         if (value === 'action' || value === 'colspan') {
           this.props.form.setFieldsValue({Align: 'center'})
+        } else if (value === 'formula' && _field) {
+          this.props.form.setFieldsValue({formula: '@' + _field + '@'})
         }
       })
     } else if (key === 'field') {

--
Gitblit v1.8.0