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,
|
UndoButton,
|
||||||
} from 'components/button';
|
} from 'components/button';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import useOptionStore from 'stores/options';
|
||||||
|
|
||||||
const { locale } = useI18n();
|
const { locale } = useI18n();
|
||||||
|
|
||||||
|
const optionStore = useOptionStore();
|
||||||
const optionsBranch = defineModel<{ id: string; name: string }[]>(
|
const optionsBranch = defineModel<{ id: string; name: string }[]>(
|
||||||
'optionsBranch',
|
'optionsBranch',
|
||||||
{ default: [] },
|
{ default: [] },
|
||||||
|
|
@ -166,9 +168,10 @@ defineEmits<{
|
||||||
? scope.opt.registerNameEN
|
? scope.opt.registerNameEN
|
||||||
: scope.opt.registerName
|
: scope.opt.registerName
|
||||||
: $i18n.locale === 'eng'
|
: $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 }})
|
({{ scope.opt.code }})
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -223,8 +226,10 @@ defineEmits<{
|
||||||
? scope.opt.registerNameEN
|
? scope.opt.registerNameEN
|
||||||
: scope.opt.registerName
|
: scope.opt.registerName
|
||||||
: $i18n.locale === 'eng'
|
: $i18n.locale === 'eng'
|
||||||
? `${scope.opt.firstNameEN} ${scope.opt.lastNameEN}` || '-'
|
? `${optionStore.mapOption(scope.opt.namePrefix)} ${scope.opt.firstNameEN} ${scope.opt.lastNameEN}` ||
|
||||||
: `${scope.opt.firstName} ${scope.opt.lastName}` || '-'
|
'-'
|
||||||
|
: `${optionStore.mapOption(scope.opt.namePrefix)} ${scope.opt.firstName} ${scope.opt.lastName}` ||
|
||||||
|
'-'
|
||||||
}}
|
}}
|
||||||
({{ scope.opt.code }})
|
({{ scope.opt.code }})
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue