fix: solve cancelledSignal
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
e621810f62
commit
82da5c2228
|
@ -127,7 +127,7 @@ const arrayData = useArrayData(arrayDataKey, { url: $props.url });
|
|||
onMounted(async () => {
|
||||
if ($props.focusOnMount) setTimeout(() => vnSelectRef.value.showPopup(), 300);
|
||||
setOptions(options.value);
|
||||
if (useURL.value) await fetchFilter($props.modelValue);
|
||||
if (useURL.value && $props.modelValue) await fetchFilter($props.modelValue);
|
||||
});
|
||||
watch(options, (newValue) => {
|
||||
setOptions(newValue);
|
||||
|
@ -140,18 +140,6 @@ watch(modelValue, async (newValue) => {
|
|||
if ($props.noOne) myOptions.value.unshift(noOneOpt.value);
|
||||
});
|
||||
|
||||
onMounted(async () => {
|
||||
setOptions(options.value);
|
||||
if ($props.url && $props.modelValue && !findKeyInOptions())
|
||||
await fetchFilter($props.modelValue);
|
||||
if ($props.focusOnMount) setTimeout(() => vnSelectRef.value.showPopup(), 300);
|
||||
});
|
||||
|
||||
function findKeyInOptions() {
|
||||
if (!$props.options) return;
|
||||
return filter($props.modelValue, $props.options)?.length;
|
||||
}
|
||||
|
||||
function setOptions(data, append = true) {
|
||||
myOptions.value = JSON.parse(JSON.stringify(data));
|
||||
if (append) myOptionsOriginal.value = JSON.parse(JSON.stringify(data));
|
||||
|
@ -209,7 +197,7 @@ async function fetchFilter(val) {
|
|||
arrayData.store.filter.skip = 0;
|
||||
const { data } = await arrayData.fetch({ append: true, updateRouter: false });
|
||||
setOptions(data);
|
||||
// return data;
|
||||
return data;
|
||||
}
|
||||
|
||||
async function filterHandler(val, update) {
|
||||
|
|
Loading…
Reference in New Issue