From 84a746468a3f7e5b39a3ed53090a19a8dec8cb10 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 06 九月 2021 11:48:25 +0800
Subject: [PATCH] 2021-09-06

---
 src/menu/components/search/main-search/index.jsx |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/menu/components/search/main-search/index.jsx b/src/menu/components/search/main-search/index.jsx
index 91421d3..92fce35 100644
--- a/src/menu/components/search/main-search/index.jsx
+++ b/src/menu/components/search/main-search/index.jsx
@@ -12,12 +12,13 @@
 import { resetStyle } from '@/utils/utils-custom.js'
 import asyncIconComponent from '@/utils/asyncIconComponent'
 import DragElement from './dragsearch'
+import getWrapForm from './options'
 import MKEmitter from '@/utils/events.js'
 import './index.scss'
 
 const { confirm } = Modal
 
-const WrapComponent = asyncIconComponent(() => import('./wrapsetting'))
+const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
 const FieldsComponent = asyncIconComponent(() => import('@/templates/sharecomponent/fieldscomponent'))
 const SearchForm = asyncIconComponent(() => import('@/templates/sharecomponent/searchcomponent/searchform'))
 const CopyComponent = asyncIconComponent(() => import('@/menu/components/share/copycomponent'))
@@ -370,6 +371,16 @@
     })
   }
 
+  getWrapForms = () => {
+    const { wrap, action } = this.state.card
+
+    return getWrapForm(wrap, action)
+  }
+
+  updateWrap = (res) => {
+    this.updateComponent({...this.state.card, wrap: res})
+  }
+
   clickComponent = (e) => {
     if (sessionStorage.getItem('style-control') === 'true' || sessionStorage.getItem('style-control') === 'component') {
       e.stopPropagation()
@@ -396,7 +407,9 @@
         <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
           <div className="mk-popover-control">
             <Icon className="plus" title="娣诲姞" onClick={this.addSearch} type="plus" />
-            <WrapComponent config={card} updateConfig={this.updateComponent}/>
+            <NormalForm title="鎼滅储璁剧疆" width={800} update={this.updateWrap} getForms={this.getWrapForms}>
+              <Icon type="edit" style={{color: '#1890ff'}} title="缂栬緫"/>
+            </NormalForm>
             <CopyComponent type="mainsearch" card={card}/>
             <PasteComponent config={card} options={['search', 'form']} updateConfig={this.checkComponent} />
             <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" />

--
Gitblit v1.8.0