From fc8c8d714687a22f711d642d192bd4149f3b7e88 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 22 四月 2024 11:15:14 +0800 Subject: [PATCH] 2024-04-22 --- src/tabviews/zshare/settingcomponent/index.jsx | 29 ++++++++++++++++------------- 1 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/tabviews/zshare/settingcomponent/index.jsx b/src/tabviews/zshare/settingcomponent/index.jsx index 76f94ae..77e2230 100644 --- a/src/tabviews/zshare/settingcomponent/index.jsx +++ b/src/tabviews/zshare/settingcomponent/index.jsx @@ -1,7 +1,7 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' import { is, fromJS } from 'immutable' -import { Button, Modal, notification, Spin, Empty } from 'antd' +import { Button, Modal, notification, Spin, Empty, Tooltip } from 'antd' import Api from '@/api' import MKEmitter from '@/utils/events.js' @@ -410,7 +410,9 @@ return } - Api.deleteMenuStorage(config.MenuID).then(() => { + Api.deleteMenuStorage(config.MenuID) + + setTimeout(() => { this.setState({ visible: false, revertLoading: false @@ -418,7 +420,7 @@ window.GLOB.CacheMap = new Map() MKEmitter.emit('reloadMenuView', config.MenuID) }) - }) + }, 100) }) } @@ -486,7 +488,9 @@ return } - Api.deleteMenuStorage(config.MenuID).then(() => { + Api.deleteMenuStorage(config.MenuID) + + setTimeout(() => { this.setState({ visible: false, confirmLoading: false @@ -494,7 +498,7 @@ window.GLOB.CacheMap = new Map() MKEmitter.emit('reloadMenuView', config.MenuID) }) - }) + }, 100) }) } @@ -514,17 +518,16 @@ render() { const { components, visible } = this.state + if (window.GLOB.mkHS || window.GLOB.sysType !== 'local') return null + return ( - <div className="page-setting-wrap"> - {window.GLOB.sysType === 'local' ? <Button - icon="setting" - shape="circle" - className="page-setting" - onClick={this.trigger} - /> : null} + <div className="tool-wrap"> + <Tooltip placement="left" title="鑷畾涔夎缃�"> + <Button icon="setting" shape="circle" onClick={this.trigger}/> + </Tooltip> <Modal wrapClassName="custom-setting-modal" - title={'鑷畾涔夎缃�'} + title="鑷畾涔夎缃�" maskClosable={false} width={950} visible={visible} -- Gitblit v1.8.0