🐛(component): 修复穿梭框无法检索的问题
This commit is contained in:
parent
800aa23eff
commit
3c5d5359f7
@ -47,10 +47,13 @@ const isHalf = computed(
|
|||||||
() => props.half && Math.round(currentValue.value) !== currentValue.value
|
() => props.half && Math.round(currentValue.value) !== currentValue.value
|
||||||
);
|
);
|
||||||
|
|
||||||
watch(() => props.modelValue, () => {
|
watch(
|
||||||
currentValue.value = props.modelValue;
|
() => props.modelValue,
|
||||||
tempValue.value = props.modelValue;
|
() => {
|
||||||
})
|
currentValue.value = props.modelValue;
|
||||||
|
tempValue.value = props.modelValue;
|
||||||
|
}
|
||||||
|
);
|
||||||
// 计算评分星值
|
// 计算评分星值
|
||||||
const getValue = function (index: number, event: any): number {
|
const getValue = function (index: number, event: any): number {
|
||||||
if (!props.half) {
|
if (!props.half) {
|
||||||
|
@ -166,22 +166,22 @@ const remove = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const searchLeft = (e: any) => {
|
const searchLeft = (e: any) => {
|
||||||
if (e.target.value === "") {
|
if (e === "") {
|
||||||
leftDataSource.value = _leftDataSource.value;
|
leftDataSource.value = _leftDataSource.value;
|
||||||
}
|
}
|
||||||
leftDataSource.value = _leftDataSource.value.filter((item) => {
|
leftDataSource.value = _leftDataSource.value.filter((item) => {
|
||||||
if (item.title.indexOf(e.target.value) != -1) {
|
if (item.title.indexOf(e) != -1) {
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const searchRight = (e: any) => {
|
const searchRight = (e: any) => {
|
||||||
if (e.target.value === "") {
|
if (e === "") {
|
||||||
rightDataSource.value = _rightDataSource.value;
|
rightDataSource.value = _rightDataSource.value;
|
||||||
}
|
}
|
||||||
rightDataSource.value = _rightDataSource.value.filter((item) => {
|
rightDataSource.value = _rightDataSource.value.filter((item) => {
|
||||||
if (item.title.indexOf(e.target.value) != -1) {
|
if (item.title.indexOf(e) != -1) {
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user