From 1da6506bf58270bacc2a4345002c6b082835580e Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 21 十月 2021 23:17:08 +0800
Subject: [PATCH] 2021-10-21

---
 src/pc/components/navbar/normal-navbar/index.jsx |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/src/pc/components/navbar/normal-navbar/index.jsx b/src/pc/components/navbar/normal-navbar/index.jsx
index 11ce5dd..6e1d078 100644
--- a/src/pc/components/navbar/normal-navbar/index.jsx
+++ b/src/pc/components/navbar/normal-navbar/index.jsx
@@ -8,9 +8,10 @@
 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 LinkComponent = asyncIconComponent(() => import('./linksetting'))
 
@@ -38,10 +39,9 @@
         type: card.type,
         floor: card.floor,
         dataName: card.dataName || '',
-        width: card.width || 24,
         name: card.name,
         subtype: card.subtype,
-        wrap: { name: card.name, width: card.width || 1200 },
+        wrap: { name: card.name, width: card.width || 1200, height: 50 },
         logoStyle: { width: '100px' },
         style: { },
         links: [],
@@ -93,7 +93,6 @@
       card: component
     })
 
-    component.width = component.wrap.width
     component.name = component.wrap.name
 
     this.props.updateConfig(component)
@@ -163,6 +162,16 @@
     }
   }
 
+  getWrapForms = () => {
+    const { wrap } = this.state.card
+
+    return getWrapForm(wrap)
+  }
+
+  updateWrap = (res) => {
+    this.updateComponent({...this.state.card, wrap: res})
+  }
+
   render() {
     const { card } = this.state
 
@@ -172,7 +181,9 @@
           <div className="mk-popover-control">
             <MenuComponent config={card} updateConfig={this.updateComponent} />
             <LinkComponent 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)} />
           </div>

--
Gitblit v1.8.0