From 0d240ba775efbb3e414ce2d9c30a902c1392bb09 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 20 七月 2021 09:15:18 +0800
Subject: [PATCH] 2021-07-20

---
 src/templates/zshare/editcomponent/index.jsx |   31 +++++++++++--------------------
 1 files changed, 11 insertions(+), 20 deletions(-)

diff --git a/src/templates/zshare/editcomponent/index.jsx b/src/templates/zshare/editcomponent/index.jsx
index 3501574..785ee7b 100644
--- a/src/templates/zshare/editcomponent/index.jsx
+++ b/src/templates/zshare/editcomponent/index.jsx
@@ -1,7 +1,7 @@
 import React, {Component} from 'react'
 import PropTypes from 'prop-types'
 import { fromJS } from 'immutable'
-import { Menu, Dropdown, Icon, Modal, Spin, notification } from 'antd'
+import { Modal, Spin, notification, Button } from 'antd'
 
 import Api from '@/api'
 import Utils from '@/utils/utils.js'
@@ -25,14 +25,6 @@
     thawVisible: false,
     thawbtnlist: null,
     pasteVisible: false,
-  }
-
-  handleMenuClick = e => {
-    if (e.key === 'thaw') {
-      this.handleThaw()
-    } else if (e.key === 'paste') {
-      this.setState({pasteVisible: true})
-    }
   }
 
   /**
@@ -236,23 +228,22 @@
     })
   }
 
+  handleMenuClick = e => {
+    if (e.key === 'thaw') {
+      this.handleThaw()
+    } else if (e.key === 'paste') {
+      this.setState({pasteVisible: true})
+    }
+  }
+
   render() {
     const { MenuID } = this.props
     const { dict } = this.state
-    const menu = (
-      <Menu onClick={this.handleMenuClick}>
-        {MenuID ? <Menu.Item key="thaw"><Icon type="unlock" />{dict['header.form.thawbutton']}</Menu.Item> : null}
-        <Menu.Item key="paste"><Icon type="snippets" />{dict['header.form.paste']}</Menu.Item>
-      </Menu>
-    )
 
     return (
       <div style={{display: 'inline-block'}}>
-        <Dropdown overlay={menu} overlayClassName="edit-component-box">
-          <span style={{color: '#1890ff', display: 'inline-block', height: 25}}>
-            {dict['model.edit']} <Icon type="down" />
-          </span>
-        </Dropdown>
+        {MenuID ? <Button className="mk-border-green" onClick={this.handleThaw} icon="unlock">{dict['header.form.thawbutton']}</Button> : null}
+        <Button style={{borderColor: '#40a9ff', color: '#40a9ff'}} onClick={() => this.setState({pasteVisible: true})} icon="snippets">{dict['header.form.paste']}</Button>
         {/* 瑙e喕鎸夐挳妯℃�佹 */}
         <Modal
           title={dict['header.form.thawbutton']}

--
Gitblit v1.8.0