feat(select-branch): add label view code-only
This commit is contained in:
parent
71ccf65f9d
commit
ed13856449
1 changed files with 10 additions and 8 deletions
|
|
@ -26,6 +26,7 @@ defineEmits<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
type ExclusiveProps = {
|
type ExclusiveProps = {
|
||||||
|
codeOnly?: boolean;
|
||||||
selectFirstValue?: boolean;
|
selectFirstValue?: boolean;
|
||||||
branchVirtual?: boolean;
|
branchVirtual?: boolean;
|
||||||
};
|
};
|
||||||
|
|
@ -81,14 +82,15 @@ function setDefaultValue() {
|
||||||
:option="
|
:option="
|
||||||
selectOptions.map((v) => {
|
selectOptions.map((v) => {
|
||||||
const ret = {
|
const ret = {
|
||||||
label:
|
label: codeOnly
|
||||||
`${branchVirtual ? $t('branch.card.branchVirtual') : ''}` +
|
? v.code
|
||||||
(
|
: `${branchVirtual ? $t('branch.card.branchVirtual') : ''}` +
|
||||||
{
|
(
|
||||||
['eng']: [v.nameEN, `(${v.code})`].join(' '),
|
{
|
||||||
['tha']: [v.name, `(${v.code})`].join(' '),
|
['eng']: [v.nameEN, `(${v.code})`].join(' '),
|
||||||
} as const
|
['tha']: [v.name, `(${v.code})`].join(' '),
|
||||||
)[$i18n.locale],
|
} as const
|
||||||
|
)[$i18n.locale],
|
||||||
value: v.id,
|
value: v.id,
|
||||||
};
|
};
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue