feat(select-branch): add label view code-only

This commit is contained in:
Methapon2001 2024-12-04 15:44:49 +07:00
parent 71ccf65f9d
commit ed13856449

View file

@ -26,6 +26,7 @@ defineEmits<{
}>(); }>();
type ExclusiveProps = { type ExclusiveProps = {
codeOnly?: boolean;
selectFirstValue?: boolean; selectFirstValue?: boolean;
branchVirtual?: boolean; branchVirtual?: boolean;
}; };
@ -81,8 +82,9 @@ 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(' '), ['eng']: [v.nameEN, `(${v.code})`].join(' '),