PASSAGGIO A VITE !

AGG. 1.1.23
This commit is contained in:
Surya Paolo
2025-03-01 14:14:43 +01:00
parent f0098e57b2
commit bc960d38a1
1044 changed files with 5323 additions and 10823777 deletions

View File

@@ -1,13 +1,13 @@
import { CMyFieldDb } from '@/components/CMyFieldDb'
import { CTitleBanner } from '@/components/CTitleBanner'
import { CProfile } from '@/components/CProfile'
import { CSkill } from '@/components/CSkill'
import { tools } from '@store/Modules/tools'
import { CMyFieldDb } from '@src/components/CMyFieldDb'
import { CTitleBanner } from '@src/components/CTitleBanner'
import { CProfile } from '@src/components/CProfile'
import { CSkill } from '@src/components/CSkill'
import { tools } from '@tools'
import { defineComponent, onMounted, ref } from 'vue'
import { useUserStore } from '@store/UserStore'
import { useRouter } from 'vue-router'
import { useGlobalStore } from '@store/globalStore'
import { useI18n } from '@/boot/i18n'
import { useI18n } from 'vue-i18n'
import { toolsext } from '@store/Modules/toolsext'
import { useQuasar } from 'quasar'
import { costanti } from '@costanti'
@@ -75,7 +75,7 @@ export default defineComponent({
function mounted() {
filtroutente.value = [
{ userId: userStore.my._id}
{ userId: userStore.my._id }
]
}

View File

@@ -17,9 +17,7 @@
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
No results
</q-item-section>
<q-item-section class="text-grey"> No results </q-item-section>
</q-item>
</template>
</q-select>
@@ -40,9 +38,7 @@
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
No results
</q-item-section>
<q-item-section class="text-grey"> No results </q-item-section>
</q-item>
</template>
</q-select>
@@ -50,82 +46,92 @@
</div>
</template>
<script>
import { ref } from 'vue'
<script lang="ts">
import { ref } from "vue";
const stringOptions = [
'Google', 'Facebook', 'Twitter', 'Apple', 'Oracle'
"Google",
"Facebook",
"Twitter",
"Apple",
"Oracle",
].reduce((acc, opt) => {
for (let i = 1; i <= 5; i++) {
acc.push(opt + ' ' + i)
acc.push(opt + " " + i);
}
return acc
}, [])
return acc;
}, []);
export default {
setup () {
const options = ref(stringOptions)
setup() {
const options = ref(stringOptions);
return {
model: ref(null),
options,
filterFn (val, update, abort) {
filterFn(val, update, abort) {
// call abort() at any time if you can't retrieve data somehow
setTimeout(() => {
update(
() => {
if (val === '') {
options.value = stringOptions
}
else {
const needle = val.toLowerCase()
options.value = stringOptions.filter(v => v.toLowerCase().indexOf(needle) > -1)
if (val === "") {
options.value = stringOptions;
} else {
const needle = val.toLowerCase();
options.value = stringOptions.filter(
(v) => v.toLowerCase().indexOf(needle) > -1
);
}
},
// "ref" is the Vue reference to the QSelect
ref => {
if (val !== '' && ref.options.length > 0) {
ref.setOptionIndex(-1) // reset optionIndex in case there is something selected
ref.moveOptionSelection(1, true) // focus the first selectable option and do not update the input-value
(ref) => {
if (val !== "" && ref.options.length > 0) {
ref.setOptionIndex(-1); // reset optionIndex in case there is something selected
ref.moveOptionSelection(1, true); // focus the first selectable option and do not update the input-value
}
}
)
}, 300)
);
}, 300);
},
filterFnAutoselect (val, update, abort) {
filterFnAutoselect(val, update, abort) {
// call abort() at any time if you can't retrieve data somehow
setTimeout(() => {
update(
() => {
if (val === '') {
options.value = stringOptions
}
else {
const needle = val.toLowerCase()
options.value = stringOptions.filter(v => v.toLowerCase().indexOf(needle) > -1)
if (val === "") {
options.value = stringOptions;
} else {
const needle = val.toLowerCase();
options.value = stringOptions.filter(
(v) => v.toLowerCase().indexOf(needle) > -1
);
}
},
// "ref" is the Vue reference to the QSelect
ref => {
if (val !== '' && ref.options.length > 0 && ref.getOptionIndex() === -1) {
ref.moveOptionSelection(1, true) // focus the first selectable option and do not update the input-value
ref.toggleOption(ref.options[ ref.optionIndex ], true) // toggle the focused option
(ref) => {
if (
val !== "" &&
ref.options.length > 0 &&
ref.getOptionIndex() === -1
) {
ref.moveOptionSelection(1, true); // focus the first selectable option and do not update the input-value
ref.toggleOption(ref.options[ref.optionIndex], true); // toggle the focused option
}
}
)
}, 300)
);
}, 300);
},
abortFilterFn () {
abortFilterFn() {
// console.log('delayed filter aborted')
}
}
}
}
},
};
},
};
</script>