From 79006d19801eb10e7532eaf8478d1dd2c239954b Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 07 三月 2023 01:41:28 +0800 Subject: [PATCH] 2023-03-07 --- src/menu/components/share/pastecomponent/index.jsx | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/menu/components/share/pastecomponent/index.jsx b/src/menu/components/share/pastecomponent/index.jsx index f8c1f6a..477e3e0 100644 --- a/src/menu/components/share/pastecomponent/index.jsx +++ b/src/menu/components/share/pastecomponent/index.jsx @@ -21,10 +21,6 @@ visible: false } - handleMenuClick = () => { - this.setState({visible: true}) - } - resetconfig = (item, config) => { let _uuid = Utils.getuuid() @@ -116,12 +112,17 @@ pasteSubmit = () => { const { options } = this.props this.pasteFormRef.handleConfirm().then(res => { - if (!options.includes(res.copyType)) { notification.warning({ top: 92, message: '閰嶇疆淇℃伅鏍煎紡閿欒锛�', duration: 5 }) return } + if (!this.props.config) { + this.props.updateConfig(res) + this.setState({visible: false}) + return + } + let type = res.copyType let config = fromJS(this.props.config).toJS() -- Gitblit v1.8.0