feat: #7136 clean code
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
2361042fac
commit
2485ab755d
|
@ -165,10 +165,7 @@ async function fetchFilter(val) {
|
|||
|
||||
async function filterHandler(val, update) {
|
||||
if (!$props.defaultFilter) return update();
|
||||
let newOptions;
|
||||
if ($props.url && !isLoading.value) {
|
||||
return;
|
||||
} else newOptions = filter(val, myOptionsOriginal.value);
|
||||
const newOptions = filter(val, myOptionsOriginal.value);
|
||||
update(
|
||||
() => {
|
||||
myOptions.value = newOptions;
|
||||
|
@ -191,11 +188,9 @@ async function onScroll(scrollEv) {
|
|||
if (direction === 'decrease') return;
|
||||
if (to === lastIndex && arrayData.store.hasMoreData && !isLoading.value) {
|
||||
isLoading.value = true;
|
||||
!$props.url && (await $props.fetchRef.paginate());
|
||||
$props.url && (await arrayData.loadMore());
|
||||
await arrayData.loadMore();
|
||||
setOptions(arrayData.store.data);
|
||||
vnSelectRef.value.scrollTo(lastIndex);
|
||||
|
||||
isLoading.value = false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue