|
|
@ -8,6 +8,7 @@ const props = defineProps<{ |
|
|
|
filterOption?: (input: string, option: any) => boolean |
|
|
|
filterOption?: (input: string, option: any) => boolean |
|
|
|
dropdownMatchSelectWidth?: boolean |
|
|
|
dropdownMatchSelectWidth?: boolean |
|
|
|
allowClear?: boolean |
|
|
|
allowClear?: boolean |
|
|
|
|
|
|
|
loading?: boolean |
|
|
|
}>() |
|
|
|
}>() |
|
|
|
|
|
|
|
|
|
|
|
const emits = defineEmits(['update:value', 'change']) |
|
|
|
const emits = defineEmits(['update:value', 'change']) |
|
|
@ -22,6 +23,8 @@ const filterOption = computed(() => props.filterOption) |
|
|
|
|
|
|
|
|
|
|
|
const dropdownMatchSelectWidth = computed(() => props.dropdownMatchSelectWidth) |
|
|
|
const dropdownMatchSelectWidth = computed(() => props.dropdownMatchSelectWidth) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const loading = computed(() => props.loading) |
|
|
|
|
|
|
|
|
|
|
|
const vModel = useVModel(props, 'value', emits) |
|
|
|
const vModel = useVModel(props, 'value', emits) |
|
|
|
|
|
|
|
|
|
|
|
const onChange = (value: string) => { |
|
|
|
const onChange = (value: string) => { |
|
|
@ -39,10 +42,13 @@ const onChange = (value: string) => { |
|
|
|
:filter-option="filterOption" |
|
|
|
:filter-option="filterOption" |
|
|
|
:dropdown-match-select-width="dropdownMatchSelectWidth" |
|
|
|
:dropdown-match-select-width="dropdownMatchSelectWidth" |
|
|
|
:allow-clear="allowClear" |
|
|
|
:allow-clear="allowClear" |
|
|
|
|
|
|
|
:loading="true" |
|
|
|
|
|
|
|
:disabled="true" |
|
|
|
@change="onChange" |
|
|
|
@change="onChange" |
|
|
|
> |
|
|
|
> |
|
|
|
<template #suffixIcon> |
|
|
|
<template #suffixIcon> |
|
|
|
<GeneralIcon icon="arrowDown" class="text-gray-800 nc-select-expand-btn" /> |
|
|
|
<GeneralLoader v-if="loading" /> |
|
|
|
|
|
|
|
<GeneralIcon v-else icon="arrowDown" class="text-gray-800 nc-select-expand-btn" /> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<slot /> |
|
|
|
<slot /> |
|
|
|
</a-select> |
|
|
|
</a-select> |
|
|
|