From fb64bcf1fab18b33d21470c83f28d4cda8d309ce Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 26 十月 2022 12:15:59 +0800
Subject: [PATCH] 2022-10-26

---
 src/views/tabledesign/index.jsx |   22 +++++++++++++++-------
 1 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/src/views/tabledesign/index.jsx b/src/views/tabledesign/index.jsx
index c834d07..ce5a07f 100644
--- a/src/views/tabledesign/index.jsx
+++ b/src/views/tabledesign/index.jsx
@@ -37,6 +37,7 @@
 const UrlFieldComponent = asyncComponent(() => import('@/menu/urlfieldcomponent'))
 const ModalController = asyncComponent(() => import('@/menu/modalconfig/controller'))
 const TableComponent = asyncComponent(() => import('@/templates/sharecomponent/tablecomponent'))
+const PasteBaseTable = asyncComponent(() => import('@/menu/components/share/pastebasetable'))
 
 sessionStorage.setItem('isEditState', 'true')
 sessionStorage.setItem('appType', '')          // 搴旂敤绫诲瀷
@@ -626,16 +627,22 @@
   insert = (item) => {
     let config = fromJS(this.state.config).toJS()
 
-    config.components.push(item)
+    let tabs = {
+      uuid: Utils.getuuid(),
+      type: 'tabs',
+      subtype: 'tabletabs',
+      width: 24,
+      setting: {},
+      style: {},
+      subtabs: [
+        { uuid: Utils.getuuid(), label: item.name || '瀛愯〃1', icon: '', components: [item] },
+      ]
+    }
+
+    config.components.push(tabs)
 
     this.setState({config})
     window.GLOB.customMenu = config
-
-    notification.success({
-      top: 92,
-      message: '绮樿创鎴愬姛锛�',
-      duration: 2
-    })
   }
 
   changeSetting = () => {
@@ -701,6 +708,7 @@
                     <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''}/>
                     <TableNodes config={config} />
                     <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/>
+                    <PasteBaseTable type="page" insert={this.insert}/>
                     <Switch className="big" checkedChildren="鍚�" unCheckedChildren="鍋�" checked={config && config.enabled} onChange={this.onEnabledChange} />
                     <Button type="primary" id="save-config" onClick={this.submitConfig} loading={menuloading}>淇濆瓨</Button>
                     <Button type="default" onClick={this.closeView}>鍏抽棴</Button>

--
Gitblit v1.8.0