From 5046d0d13dc6a8563b8e54e31913bc44cfa1072f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 26 四月 2022 19:23:18 +0800 Subject: [PATCH] 2022-04-26 --- src/templates/zshare/pasteform/index.jsx | 26 ++++++++++++++++---------- 1 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/templates/zshare/pasteform/index.jsx b/src/templates/zshare/pasteform/index.jsx index 08ed804..6b5cd34 100644 --- a/src/templates/zshare/pasteform/index.jsx +++ b/src/templates/zshare/pasteform/index.jsx @@ -27,9 +27,23 @@ this.props.form.validateFieldsAndScroll((err, values) => { if (!err) { let _config = values.config - try { _config = JSON.parse(window.decodeURIComponent(window.atob(_config))) + + if (typeof(_config) === 'object' && _config.$srcId) { + let srcid = localStorage.getItem(window.location.href.split('#')[0] + 'srcId') + if (srcid && _config.$srcId !== srcid) { + notification.warning({ + top: 92, + message: '褰撳墠绯荤粺鏃犳潈闄愪娇鐢ㄦ椤归厤缃紒', + duration: 5 + }) + + _config = '' + } else { + delete _config.$srcId + } + } } catch (e) { notification.warning({ top: 92, @@ -47,14 +61,6 @@ } }) }) - } - - submit = () => { - if (this.props.inputSubmit) { - setTimeout(() => { - this.props.inputSubmit() - }, 10) - } } render() { @@ -82,7 +88,7 @@ message: '璇疯緭鍏ラ厤缃俊鎭�!' } ] - })(<TextArea autoSize={{ minRows: 6, maxRows: 6 }} onPressEnter={this.submit}/>)} + })(<TextArea autoSize={{ minRows: 6, maxRows: 6 }}/>)} </Form.Item> </Col> </Row> -- Gitblit v1.8.0