feat: 턴 선택기에 복합 커맨드 선택 적용

- vue-multiselect 기반
- 초성 검색
- 이득, 불리 표기
- 불가 표기
- 선택후 단축 표기
This commit is contained in:
2021-12-05 23:00:46 +09:00
parent db07fb35e0
commit f98db556c5
8 changed files with 98 additions and 40 deletions
+17
View File
@@ -0,0 +1,17 @@
export function filter초성(text: string): string {
const = [
"ㄱ", "ㄲ", "ㄴ", "ㄷ", "ㄸ", "ㄹ", "ㅁ", "ㅂ", "ㅃ",
"ㅅ", "ㅆ", "ㅇ", "ㅈ", "ㅉ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"
];
const result: string[] = [];
for (const char of text) {
const code = (char.codePointAt(0) ?? 0) - 44032;
if (0 <= code && code < 11172) {
result.push([~~(code / 588)]);
}
else {
result.push(char);
}
}
return result.join('');
}