From e3d44b5694b87e8b32d468d8b97fdd409da10b52 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 29 六月 2023 09:23:43 +0800 Subject: [PATCH] Merge branch 'develop' --- src/menu/stylecontroller/styleInput/index.jsx | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/menu/stylecontroller/styleInput/index.jsx b/src/menu/stylecontroller/styleInput/index.jsx index d7661d0..d3a93a0 100644 --- a/src/menu/stylecontroller/styleInput/index.jsx +++ b/src/menu/stylecontroller/styleInput/index.jsx @@ -105,6 +105,7 @@ } changeValue = (e) => { + const { clear } = this.props const { unit } = this.state let val = e.target.value @@ -126,7 +127,7 @@ if (this.props.onChange) { if (!_val) { - this.props.onChange('0px') + this.props.onChange(clear ? '' : '0px') } else { this.props.onChange(`${_val}${unit}`) } -- Gitblit v1.8.0