From 9ee3d1f9a09a865188baffdffb85f6ad329c7b09 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 19 十二月 2021 01:09:20 +0800
Subject: [PATCH] 2021-12-19

---
 src/mob/components/navbar/normal-navbar/index.jsx |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/src/mob/components/navbar/normal-navbar/index.jsx b/src/mob/components/navbar/normal-navbar/index.jsx
index 0d38e64..d80c2fc 100644
--- a/src/mob/components/navbar/normal-navbar/index.jsx
+++ b/src/mob/components/navbar/normal-navbar/index.jsx
@@ -6,11 +6,10 @@
 import asyncIconComponent from '@/utils/asyncIconComponent'
 
 import MKEmitter from '@/utils/events.js'
-import zhCN from '@/locales/zh-CN/model.js'
-import enUS from '@/locales/en-US/model.js'
+import getWrapForm from './options'
 import './index.scss'
 
-const WrapComponent = asyncIconComponent(() => import('./wrapsetting'))
+const NormalForm = asyncIconComponent(() => import('@/components/normalform'))
 const MenuComponent = asyncIconComponent(() => import('./menusetting'))
 const SettingComponent = asyncIconComponent(() => import('@/menu/datasource'))
 
@@ -22,7 +21,6 @@
   }
 
   state = {
-    dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS,
     card: null,
     back: false
   }
@@ -39,12 +37,11 @@
         pageable: false,    // 缁勪欢灞炴�� - 鏄惁鍙垎椤�
         switchable: false,  // 缁勪欢灞炴�� - 鏁版嵁鏄惁鍙垏鎹�
         dataName: card.dataName || '',
-        width: card.width || 24,
         name: card.name,
         subtype: card.subtype,
         setting: { interType: 'system' },
         wrap: { name: card.name, datatype: 'static', height: 50 },
-        style: {borderTopColor: '#bcbcbc', borderTopWidth: '1px', paddingTop: '5px', fontSize: '13px' },
+        style: {boxShadow: '0 0 3px #D9D9D9', shadowColor: '#D9D9D9', shadowBlur: '3px', paddingTop: '5px', fontSize: '13px' },
         menus: [],
         columns: [],
         scripts: [],
@@ -95,7 +92,6 @@
       card: component
     })
 
-    component.width = component.wrap.width
     component.name = component.wrap.name
 
     this.props.updateConfig(component)
@@ -141,6 +137,16 @@
     }
   }
 
+  getWrapForms = () => {
+    const { wrap } = this.state.card
+
+    return getWrapForm(wrap)
+  }
+
+  updateWrap = (res) => {
+    this.updateComponent({...this.state.card, wrap: res})
+  }
+
   render() {
     const { card } = this.state
 
@@ -152,7 +158,9 @@
         <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={
           <div className="mk-popover-control">
             <MenuComponent config={card} updateConfig={this.updateComponent} />
-            <WrapComponent config={card} updateConfig={this.updateComponent} />
+            <NormalForm title="鑿滃崟鏍忚缃�" width={800} update={this.updateWrap} getForms={this.getWrapForms}>
+              <Icon type="edit" style={{color: '#1890ff'}} title="缂栬緫"/>
+            </NormalForm>
             <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} type="font-colors" />
             <Icon className="close" title="鍒犻櫎缁勪欢" type="delete" onClick={() => this.props.deletecomponent(card.uuid)} />
             {card.wrap.datatype !== 'static' ? <SettingComponent config={card} updateConfig={this.updateComponent} /> : null}

--
Gitblit v1.8.0