refactor: add props branch virtual
This commit is contained in:
parent
89f67265b6
commit
3679de69f1
2 changed files with 11 additions and 7 deletions
|
|
@ -27,6 +27,7 @@ defineEmits<{
|
|||
|
||||
type ExclusiveProps = {
|
||||
selectFirstValue?: boolean;
|
||||
branchVirtual?: boolean;
|
||||
};
|
||||
|
||||
const props = defineProps<SelectProps<typeof getList> & ExclusiveProps>();
|
||||
|
|
@ -80,12 +81,14 @@ function setDefaultValue() {
|
|||
:option="
|
||||
selectOptions.map((v) => {
|
||||
const ret = {
|
||||
label: (
|
||||
{
|
||||
['eng']: [v.nameEN, `(${v.code})`].join(' '),
|
||||
['tha']: [v.name, `(${v.code})`].join(' '),
|
||||
} as const
|
||||
)[$i18n.locale],
|
||||
label:
|
||||
`${branchVirtual ? $t('branch.card.branchVirtual') : ''}` +
|
||||
(
|
||||
{
|
||||
['eng']: [v.nameEN, `(${v.code})`].join(' '),
|
||||
['tha']: [v.name, `(${v.code})`].join(' '),
|
||||
} as const
|
||||
)[$i18n.locale],
|
||||
value: v.id,
|
||||
};
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue