feat(WIP): process 국가선택 추가

This commit is contained in:
2021-12-18 23:14:04 +09:00
parent e2ed918437
commit 9bd151cdc2
9 changed files with 307 additions and 110 deletions
+14 -7
View File
@@ -16,9 +16,15 @@
:maxHeight="400"
:searchable="searchMode"
>
<template v-slot:option="props">
{{ props.option.title }}
<span v-if="props.option.info">({{ props.option.info }})</span>
<template v-slot:option="props"
><span
:style="{
color: props.option.notAvailable ? 'red' : undefined,
}"
>
{{ props.option.title }}
<span v-if="props.option.info">({{ props.option.info }})</span></span
>
</template>
<template v-slot:singleLabel="props">
{{ props.option.simpleName }}
@@ -35,6 +41,7 @@ type SelectedCity = {
title: string;
simpleName: string;
info?: string;
notAvailable?: boolean;
};
export default defineComponent({
@@ -54,9 +61,9 @@ export default defineComponent({
const target = this.targets.get(val);
this.selectedCity = target;
},
selectedCity(val: SelectedCity){
this.$emit('update:modelValue', val.value);
}
selectedCity(val: SelectedCity) {
this.$emit("update:modelValue", val.value);
},
},
data() {
const citiesForFind = [];
@@ -69,7 +76,7 @@ export default defineComponent({
title: name,
info: info,
simpleName: name,
searchText: `${name} ${filteredTextH} ${filteredTextA}`
searchText: `${name} ${filteredTextH} ${filteredTextA}`,
};
if (value == this.modelValue) {
selectedCity = obj;