refactor: show namePrefix
This commit is contained in:
parent
d072ed015a
commit
0672b67cbf
1 changed files with 9 additions and 4 deletions
|
|
@ -10,9 +10,11 @@ import {
|
|||
UndoButton,
|
||||
} from 'components/button';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import useOptionStore from 'stores/options';
|
||||
|
||||
const { locale } = useI18n();
|
||||
|
||||
const optionStore = useOptionStore();
|
||||
const optionsBranch = defineModel<{ id: string; name: string }[]>(
|
||||
'optionsBranch',
|
||||
{ default: [] },
|
||||
|
|
@ -166,9 +168,10 @@ defineEmits<{
|
|||
? scope.opt.registerNameEN
|
||||
: scope.opt.registerName
|
||||
: $i18n.locale === 'eng'
|
||||
? `${scope.opt.firstNameEN} ${scope.opt.lastNameEN}` ||
|
||||
? `${optionStore.mapOption(scope.opt.namePrefix)} ${scope.opt.firstNameEN} ${scope.opt.lastNameEN}` ||
|
||||
'-'
|
||||
: `${optionStore.mapOption(scope.opt.namePrefix)} ${scope.opt.firstName} ${scope.opt.lastName}` ||
|
||||
'-'
|
||||
: `${scope.opt.firstName} ${scope.opt.lastName}` || '-'
|
||||
}}
|
||||
({{ scope.opt.code }})
|
||||
</span>
|
||||
|
|
@ -223,8 +226,10 @@ defineEmits<{
|
|||
? scope.opt.registerNameEN
|
||||
: scope.opt.registerName
|
||||
: $i18n.locale === 'eng'
|
||||
? `${scope.opt.firstNameEN} ${scope.opt.lastNameEN}` || '-'
|
||||
: `${scope.opt.firstName} ${scope.opt.lastName}` || '-'
|
||||
? `${optionStore.mapOption(scope.opt.namePrefix)} ${scope.opt.firstNameEN} ${scope.opt.lastNameEN}` ||
|
||||
'-'
|
||||
: `${optionStore.mapOption(scope.opt.namePrefix)} ${scope.opt.firstName} ${scope.opt.lastName}` ||
|
||||
'-'
|
||||
}}
|
||||
({{ scope.opt.code }})
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue