From 80c58567325458f2098de7bf492d302b2678f3aa Mon Sep 17 00:00:00 2001 From: mtruning <1262327911@qq.com> Date: Sat, 19 Mar 2022 21:42:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E9=87=8D=E5=91=BD?= =?UTF-8?q?=E5=90=8D=E5=8F=AF=E4=BB=A5=E6=97=A0=E6=95=B0=E6=8D=AE=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ChartItemSetting/NameSetting.vue | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/components/ChartItemSetting/NameSetting.vue b/src/components/ChartItemSetting/NameSetting.vue index 6194728e..b05cf929 100644 --- a/src/components/ChartItemSetting/NameSetting.vue +++ b/src/components/ChartItemSetting/NameSetting.vue @@ -2,11 +2,15 @@ @@ -23,4 +27,16 @@ const props = defineProps({ }, }) +let valueCatch = '' + +const handleFocus = () => { + valueCatch = props.chartConfig.title +} + +const handleBlur = () => { + if(!props.chartConfig.title.length) { + window['$message'].warning('请输入至少一个字符!') + props.chartConfig.title = valueCatch + } +}