From 3c5d5359f791317dd07d67d1d55e5274476885ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E5=84=80=E5=BC=8F?= <854085467@qq.com> Date: Tue, 13 Sep 2022 16:20:47 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(component):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=A9=BF=E6=A2=AD=E6=A1=86=E6=97=A0=E6=B3=95=E6=A3=80=E7=B4=A2?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/component/src/component/rate/index.vue | 11 +++++++---- package/component/src/component/transfer/index.vue | 8 ++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/package/component/src/component/rate/index.vue b/package/component/src/component/rate/index.vue index 339af61b..c3aeca05 100644 --- a/package/component/src/component/rate/index.vue +++ b/package/component/src/component/rate/index.vue @@ -47,10 +47,13 @@ const isHalf = computed( () => props.half && Math.round(currentValue.value) !== currentValue.value ); -watch(() => props.modelValue, () => { - currentValue.value = props.modelValue; - tempValue.value = props.modelValue; -}) +watch( + () => props.modelValue, + () => { + currentValue.value = props.modelValue; + tempValue.value = props.modelValue; + } +); // 计算评分星值 const getValue = function (index: number, event: any): number { if (!props.half) { diff --git a/package/component/src/component/transfer/index.vue b/package/component/src/component/transfer/index.vue index eade1a7b..f390f43e 100644 --- a/package/component/src/component/transfer/index.vue +++ b/package/component/src/component/transfer/index.vue @@ -166,22 +166,22 @@ const remove = () => { }; const searchLeft = (e: any) => { - if (e.target.value === "") { + if (e === "") { leftDataSource.value = _leftDataSource.value; } leftDataSource.value = _leftDataSource.value.filter((item) => { - if (item.title.indexOf(e.target.value) != -1) { + if (item.title.indexOf(e) != -1) { return item; } }); }; const searchRight = (e: any) => { - if (e.target.value === "") { + if (e === "") { rightDataSource.value = _rightDataSource.value; } rightDataSource.value = _rightDataSource.value.filter((item) => { - if (item.title.indexOf(e.target.value) != -1) { + if (item.title.indexOf(e) != -1) { return item; } });