From 71d4765ba3cdc4a004687cd37a529b565e9ea9fd Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 06 七月 2021 16:26:29 +0800 Subject: [PATCH] 2021-07-06 --- src/mob/searchconfig/pastecomponent/index.jsx | 23 ++--------------------- 1 files changed, 2 insertions(+), 21 deletions(-) diff --git a/src/mob/searchconfig/pastecomponent/index.jsx b/src/mob/searchconfig/pastecomponent/index.jsx index 71df022..ed81117 100644 --- a/src/mob/searchconfig/pastecomponent/index.jsx +++ b/src/mob/searchconfig/pastecomponent/index.jsx @@ -9,7 +9,6 @@ class PasteController extends Component { static propTpyes = { - config: PropTypes.object, // 缁勪欢閰嶇疆 updateConfig: PropTypes.func } @@ -18,36 +17,18 @@ } pasteSubmit = () => { - const { config } = this.props this.pasteFormRef.handleConfirm().then(res => { - if (res.copyType !== 'form') { + if (res.copyType !== 'search') { notification.warning({ top: 92, message: '閰嶇疆淇℃伅鏍煎紡閿欒锛�', duration: 5 }) return } - - let keys = config.fields.map(item => item.field ? item.field.toLowerCase() : '$emp_ty$') if (['multiselect', 'color', 'brafteditor'].includes(res.type)) { res.type = 'text' } - if (res.field && keys.includes(res.field.toLowerCase())) { - notification.warning({ - top: 92, - message: '鎼滅储瀛楁宸插瓨鍦紒', - duration: 5 - }) - return - } - - this.props.updateConfig(config) + this.props.updateConfig(res) this.setState({visible: false}) - - notification.success({ - top: 92, - message: '绮樿创鎴愬姛锛�', - duration: 2 - }) }) } -- Gitblit v1.8.0