From 41e2d4b6af42302bb37bb54394a489e017c0de4f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 05 七月 2021 09:56:24 +0800
Subject: [PATCH] 2021-07-05

---
 src/mob/components/navbar/normal-navbar/menusetting/menutable/index.jsx |   28 +++++++++++++++++-----------
 1 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/src/mob/components/navbar/normal-navbar/menusetting/menutable/index.jsx b/src/mob/components/navbar/normal-navbar/menusetting/menutable/index.jsx
index 8fc36cf..3379a03 100644
--- a/src/mob/components/navbar/normal-navbar/menusetting/menutable/index.jsx
+++ b/src/mob/components/navbar/normal-navbar/menusetting/menutable/index.jsx
@@ -5,14 +5,15 @@
 
 import MenuForm from '../menuform'
 import Utils from '@/utils/utils.js'
-import MKEmitter from '@/utils/events.js'
+// import MKEmitter from '@/utils/events.js'
 import './index.scss'
 
 const { confirm } = Modal
 
 class MenuTable extends Component {
   static propTpyes = {
-    menus: PropTypes.object,    // 鍗$墖琛屼俊鎭�
+    menus: PropTypes.array,     // 鍗$墖琛屼俊鎭�
+    cols: PropTypes.array,      // 瀛楁闆�
   }
 
   state = {
@@ -25,6 +26,9 @@
         const trans = {menu: '鑿滃崟', link: '閾炬帴', linkmenu: '鍏宠仈鑿滃崟'}
 
         return trans[text]
+      }},
+      { title: '鍥炬爣', dataIndex: 'icon', key: 'icon',  render: (text, record) => {
+        return text ? <Icon type={text} /> : ''
       }},
       { title: '鏄惁闅愯棌', dataIndex: 'hidden', key: 'hidden',  render: (text, record) => {
         const trans = {'true': '鏄�', 'false': '鍚�'}
@@ -85,15 +89,15 @@
       onOk() {
         _this.setState({data: data.filter(item => item.MenuID !== record.MenuID)})
 
-        let uuids = [record.MenuID]
-        record.sublist && record.sublist.forEach(item => {
-          uuids.push(item.MenuID)
+        // let uuids = [record.MenuID]
+        // record.sublist && record.sublist.forEach(item => {
+        //   uuids.push(item.MenuID)
 
-          item.sublist && item.sublist.forEach(cell => {
-            uuids.push(cell.MenuID)
-          })
-        })
-        MKEmitter.emit('delButtons', uuids)
+        //   item.sublist && item.sublist.forEach(cell => {
+        //     uuids.push(cell.MenuID)
+        //   })
+        // })
+        // MKEmitter.emit('delButtons', uuids)
       },
       onCancel() {}
     })
@@ -151,6 +155,7 @@
   }
 
   render() {
+    const { cols } = this.props
     const { columns, data, visible, editMenu } = this.state
 
     return (
@@ -165,7 +170,7 @@
         <Modal
           title="缂栬緫"
           visible={visible}
-          width={600}
+          width={750}
           maskClosable={false}
           onOk={this.menuSubmit}
           onCancel={() => { this.setState({ visible: false }) }}
@@ -173,6 +178,7 @@
         >
           <MenuForm
             menu={editMenu}
+            cols={cols}
             inputSubmit={this.menuSubmit}
             wrappedComponentRef={(inst) => this.menuRef = inst}
           />

--
Gitblit v1.8.0