add label prop
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<q-select
|
<q-select
|
||||||
ref="selectRef"
|
ref="selectRef"
|
||||||
|
:label="props.label || ''"
|
||||||
v-model="modelValueLocal"
|
v-model="modelValueLocal"
|
||||||
:options="filteredOptions"
|
:options="filteredOptions"
|
||||||
:option-label="optionLabel"
|
:option-label="optionLabel"
|
||||||
@@ -43,6 +44,9 @@ const props = defineProps({
|
|||||||
type: Array as PropType<T[]>,
|
type: Array as PropType<T[]>,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
label: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
optionLabel: {
|
optionLabel: {
|
||||||
type: [Function, String] as PropType<((option: T) => string) | string | undefined>,
|
type: [Function, String] as PropType<((option: T) => string) | string | undefined>,
|
||||||
required: true,
|
required: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user