feat: sort agencies
This commit is contained in:
parent
d333b6fc37
commit
39fa0ffdcb
1 changed files with 7 additions and 1 deletions
|
|
@ -14,6 +14,8 @@ defineProps<{
|
|||
const group = defineModel('group', { default: '' });
|
||||
const name = defineModel('name', { default: '' });
|
||||
const nameEn = defineModel('nameEn', { default: '' });
|
||||
|
||||
type Options = { label: string; value: string };
|
||||
</script>
|
||||
<template>
|
||||
<div class="row col-12">
|
||||
|
|
@ -38,7 +40,11 @@ const nameEn = defineModel('nameEn', { default: '' });
|
|||
for="input-agencies-code"
|
||||
:label="$t('agencies.group')"
|
||||
option-label="value"
|
||||
:option="optionStore.globalOption?.agenciesType"
|
||||
:option="
|
||||
optionStore.globalOption?.agenciesType.sort(
|
||||
(lhs: Options, rhs: Options) => lhs.value.localeCompare(rhs.value),
|
||||
)
|
||||
"
|
||||
v-model="group"
|
||||
>
|
||||
<template v-slot:option="{ scope, opt }">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue