feat: 턴 선택기에 복합 커맨드 선택 적용 (#199)

- vue-multiselect 기반
- 초성 검색
- 이득, 불리 표기
- 불가 표기
- 선택후 단축 표기

Reviewed-on: https://storage.hided.net/gitea/devsam/core/pulls/199
Co-authored-by: hide_d <hided62@gmail.com>
Co-committed-by: hide_d <hided62@gmail.com>
This commit is contained in:
2021-12-05 23:02:27 +09:00
parent 3972cf0194
commit d317a84b09
14 changed files with 719 additions and 67 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('');
}