From c519b4e51fe07bf13a2a7e44abd648b8dc0c083d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 23 六月 2020 12:12:12 +0800
Subject: [PATCH] 2020-06-23

---
 src/views/mobdesign/index.jsx |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx
index d7bc86b..bcdf9b7 100644
--- a/src/views/mobdesign/index.jsx
+++ b/src/views/mobdesign/index.jsx
@@ -3,7 +3,7 @@
 import { DndProvider } from 'react-dnd'
 import { fromJS } from 'immutable'
 import HTML5Backend from 'react-dnd-html5-backend'
-import { SketchPicker } from 'react-color'
+// import { SketchPicker } from 'react-color'
 import { Icon, Tabs, notification, Modal } from 'antd'
 
 import Api from '@/api'
@@ -17,6 +17,7 @@
 const { confirm } = Modal
 
 const Header = asyncComponent(() => import('@/mob/header'))
+const Controller = asyncComponent(() => import('@/mob/controller'))
 const MobShell = asyncComponent(() => import('@/mob/mobshell'))
 const SourceWrap = asyncComponent(() => import('@/mob/modelsource'))
 const DataSource = asyncComponent(() => import('@/mob/datasource'))
@@ -29,7 +30,8 @@
     appConfig: null,
     saveIng: false,
     config: null,
-    pageIndex: 0
+    pageIndex: 0,
+    editElem: null
   }
 
   UNSAFE_componentWillMount() {
@@ -120,6 +122,9 @@
 
   editCard = (element) => {
     console.log(element)
+    this.setState({
+      editElem: element
+    })
   }
 
   updateConfig = (config) => {
@@ -129,7 +134,7 @@
   }
 
   render () {
-    const { saveIng, appType, config } = this.state
+    const { saveIng, appType, config, editElem } = this.state
 
     return (
       <div className="mobile-view">
@@ -149,13 +154,14 @@
             </div>
             {appType === 'mob' && config ?
               <div className="mob-shell">
-                <MobShell config={config} deleteCard={this.deleteCard} editCard={this.editCard} handleList={this.updateConfig} />
+                <MobShell config={config} deleteCard={this.deleteCard} editCard={this.editCard} editId={editElem ? editElem.uuid : ''} handleList={this.updateConfig} />
               </div> : null
             }
             <div className="mob-setting">
               {config ? <Tabs defaultActiveKey="2" animated={false} size="small">
                 <TabPane tab="閰嶇疆" key="1">
-                  <SketchPicker />
+                  {/* <SketchPicker /> */}
+                  <Controller />
                 </TabPane>
                 <TabPane tab="鏁版嵁婧�" key="2">
                   <DataSource config={config} updateConfig={this.updateConfig} />

--
Gitblit v1.8.0