- fix QSelect
- permessi none/friends/all
This commit is contained in:
@@ -115,6 +115,11 @@ export default defineComponent({
|
||||
withToggle: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
icon_alternative: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: '',
|
||||
}
|
||||
},
|
||||
components: {},
|
||||
@@ -317,6 +322,9 @@ export default defineComponent({
|
||||
|
||||
if (props.col.jointable) {
|
||||
optionsreal.value = globalStore.getTableJoinByName(props.col.jointable, props.col.addall, props.col.filter)
|
||||
// console.log('optionsreal.value', optionsreal.value)
|
||||
} else {
|
||||
optionsreal.value = props.options
|
||||
}
|
||||
|
||||
myarr = optionsreal.value
|
||||
@@ -326,7 +334,7 @@ export default defineComponent({
|
||||
|
||||
// console.log('needle', needle, 'props.multiple', props.multiple)
|
||||
if (props.filter_table) {
|
||||
// console.log(' FILTERTABLE', props.filter_field, myarr)
|
||||
console.log(' FILTERTABLE', props.filter_field, myarr)
|
||||
if (props.multiple) {
|
||||
myarr = myarr.filter((rec: any) => rec[props.filter_field] === needle)
|
||||
} else {
|
||||
@@ -348,6 +356,7 @@ export default defineComponent({
|
||||
// console.log(' myarr: ', myarr)
|
||||
}
|
||||
|
||||
// console.log(' myarr: ', myarr)
|
||||
return myarr
|
||||
}
|
||||
|
||||
@@ -494,6 +503,15 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function getIcon() {
|
||||
if (props.icon_alternative)
|
||||
return props.icon_alternative
|
||||
if (props.col && props.col['icon']) {
|
||||
return props.col['icon']
|
||||
}
|
||||
return ''
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
|
||||
@@ -507,6 +525,7 @@ export default defineComponent({
|
||||
checkIfShowRec,
|
||||
abortFilterFn,
|
||||
newvaluefuncfirst,
|
||||
getIcon,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -25,6 +25,9 @@
|
||||
:option-value="optval"
|
||||
class="combowidth"
|
||||
>
|
||||
<template v-if="getIcon() && !sola_lettura" v-slot:prepend>
|
||||
<q-icon :name="getIcon()" />
|
||||
</template>
|
||||
|
||||
<template v-slot:no-option>
|
||||
<q-item>
|
||||
@@ -89,6 +92,9 @@
|
||||
v-bind="$attrs"
|
||||
style="width: 250px"
|
||||
>
|
||||
<template v-if="getIcon()" v-slot:prepend>
|
||||
<q-icon :name="getIcon()" />
|
||||
</template>
|
||||
<template v-slot:no-option>
|
||||
<q-item>
|
||||
<q-item-section class="text-grey">
|
||||
@@ -128,6 +134,9 @@
|
||||
:option-label="optlab"
|
||||
:dense="dense">
|
||||
|
||||
<template v-if="getIcon()" v-slot:prepend>
|
||||
<q-icon :name="getIcon()" />
|
||||
</template>
|
||||
<template
|
||||
v-slot:selected-item="scope">
|
||||
<div v-if="scope.opt[optlab]">
|
||||
@@ -137,7 +146,6 @@
|
||||
@remove="scope.removeAtIndex(scope.index)"
|
||||
v-if="checkIfShowRec(scope.opt)"
|
||||
color="white"
|
||||
text-color="mycol"
|
||||
class="q-my-none q-ml-xs q-mr-none"
|
||||
>
|
||||
<q-avatar color="primary" text-color="white" :icon="scope.opt.icon ? scope.opt.icon : ''" size="12px"/>
|
||||
@@ -182,6 +190,9 @@
|
||||
map-options
|
||||
v-bind="$attrs"
|
||||
class="combowidth">
|
||||
<template v-if="getIcon()" v-slot:prepend>
|
||||
<q-icon :name="getIcon()" />
|
||||
</template>
|
||||
<template v-slot:option="scope">
|
||||
<q-item v-bind="scope.itemProps">
|
||||
<q-item-section avatar>
|
||||
|
||||
Reference in New Issue
Block a user