feat(WIP): 장비매매
- 초성 검색을 일원화
This commit is contained in:
@@ -40,8 +40,7 @@
|
||||
</v-multiselect>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { automata초성All } from "@/util/automata초성";
|
||||
import { filter초성withAlphabet } from "@/util/filter초성withAlphabet";
|
||||
import { convertSearch초성 } from "@/util/convertSearch초성";
|
||||
import { defineComponent, PropType } from "vue";
|
||||
import { procNationItem } from "./processingRes";
|
||||
|
||||
@@ -80,17 +79,13 @@ export default defineComponent({
|
||||
const targets = new Map<number, SelectedNation>();
|
||||
let selectedNation;
|
||||
for (const nationItem of this.nations.values()) {
|
||||
const [filteredTextH, filteredTextA] = filter초성withAlphabet(
|
||||
nationItem.name
|
||||
);
|
||||
const [filteredTextHL1, filteredTextHL2] = automata초성All(filteredTextH);
|
||||
const obj: SelectedNation = {
|
||||
value: nationItem.id,
|
||||
title: nationItem.name,
|
||||
info: nationItem.info,
|
||||
simpleName: nationItem.name,
|
||||
notAvailable: nationItem.notAvailable,
|
||||
searchText: `${nationItem.name} ${filteredTextH} ${filteredTextA} ${filteredTextHL1} ${filteredTextHL2}`,
|
||||
searchText: convertSearch초성(nationItem.name).join('|'),
|
||||
};
|
||||
if (nationItem.id == this.modelValue) {
|
||||
selectedNation = obj;
|
||||
|
||||
Reference in New Issue
Block a user