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; } });