From 59271e4c863abe2fb4562e30549e1c5e3acdde8f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 21 六月 2023 00:33:36 +0800 Subject: [PATCH] 2023-06-21 --- 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