From 432b788acf901b0720184b8ee8bc81a2e6fa47e0 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 28 九月 2021 18:22:02 +0800 Subject: [PATCH] 2021-09-28 --- src/tabviews/zshare/mutilform/mkTextArea/index.jsx | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tabviews/zshare/mutilform/mkTextArea/index.jsx b/src/tabviews/zshare/mutilform/mkTextArea/index.jsx index 531aa49..444d185 100644 --- a/src/tabviews/zshare/mutilform/mkTextArea/index.jsx +++ b/src/tabviews/zshare/mutilform/mkTextArea/index.jsx @@ -3,7 +3,6 @@ import { Input } from 'antd' import MKEmitter from '@/utils/events.js' -import './index.scss' const { TextArea } = Input @@ -30,7 +29,7 @@ if (_value) { try { _value = window.decodeURIComponent(window.atob(_value)) - } catch { + } catch (e) { _value = config.initval } } @@ -59,6 +58,7 @@ this.inputRef.current.focus() } else if (type === 'input') { this.setState({value}) + this.props.onChange(value, true) } } @@ -72,7 +72,7 @@ if (encryption === 'true') { try { _val = window.btoa(window.encodeURIComponent(_val)) - } catch { + } catch (e) { _val = val } } @@ -84,7 +84,7 @@ const { value } = this.state return ( - <TextArea ref={this.inputRef} value={value} autoSize={{ minRows: 2, maxRows: config.maxRows || 6 }} onChange={this.onChange} disabled={config.readonly} /> + <TextArea ref={this.inputRef} placeholder={config.placeholder || ''} value={value} autoSize={{ minRows: 2, maxRows: config.maxRows || 6 }} onChange={this.onChange} disabled={config.readonly} /> ) } } -- Gitblit v1.8.0