feat: change prefix change gender
This commit is contained in:
parent
a28ca8beef
commit
52ad2cbcf2
2 changed files with 16 additions and 0 deletions
|
|
@ -87,6 +87,14 @@ watch(
|
|||
);
|
||||
},
|
||||
);
|
||||
|
||||
watch(
|
||||
() => prefixName.value,
|
||||
(v) => {
|
||||
if (v === 'mr') gender.value = 'male';
|
||||
else gender.value = 'female';
|
||||
},
|
||||
);
|
||||
</script>
|
||||
<template>
|
||||
<div class="row col-12">
|
||||
|
|
|
|||
|
|
@ -128,6 +128,14 @@ watch(
|
|||
},
|
||||
);
|
||||
|
||||
watch(
|
||||
() => namePrefix.value,
|
||||
(v) => {
|
||||
if (v === 'mr') gender.value = 'male';
|
||||
else gender.value = 'female';
|
||||
},
|
||||
);
|
||||
|
||||
function formatCode(input: string | undefined, type: 'code' | 'number') {
|
||||
if (!input) return;
|
||||
return input.slice(...(type === 'code' ? [0, -6] : [-6]));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue