From f6bc3ff19ef8dd5ff4d54a4981ac21dd0b6274a2 Mon Sep 17 00:00:00 2001 From: ThrRip Date: Tue, 24 Dec 2024 13:01:48 +0800 Subject: [PATCH] [all]: Do not drop the splitter between pinyin of individual ... characters, as the previous behavior has some minor errors --- packages/admin/app/pages/playlist.vue | 5 +---- packages/home/app/app.vue | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/admin/app/pages/playlist.vue b/packages/admin/app/pages/playlist.vue index 8f91cda..e4d2ce0 100644 --- a/packages/admin/app/pages/playlist.vue +++ b/packages/admin/app/pages/playlist.vue @@ -252,10 +252,7 @@ async function viewPlaylistDataSort (data: Playlist, column: PlaylistColumn, ord const { pinyin } = await import('pinyin-pro') playlist.forEach((song, index) => { // @ts-expect-error - playlist[index][`${column}Pinyin`] = - // @ts-expect-error - pinyin(song[column], { toneType: 'none', nonZh: 'consecutive' }) - .replaceAll(' ', '') + playlist[index][`${column}Pinyin`] = pinyin(song[column], { toneType: 'none', nonZh: 'consecutive' }) }) playlist.sort((a, b) => { // @ts-expect-error diff --git a/packages/home/app/app.vue b/packages/home/app/app.vue index 08316c1..2f7e9a4 100644 --- a/packages/home/app/app.vue +++ b/packages/home/app/app.vue @@ -373,10 +373,7 @@ async function viewPlaylistDataSort (data: Playlist, column: PlaylistColumn, ord const { pinyin } = await import('pinyin-pro') playlist.forEach((song, index) => { // @ts-expect-error - playlist[index][`${column}Pinyin`] = - // @ts-expect-error - pinyin(song[column], { toneType: 'none', nonZh: 'consecutive' }) - .replaceAll(' ', '') + playlist[index][`${column}Pinyin`] = pinyin(song[column], { toneType: 'none', nonZh: 'consecutive' }) }) playlist.sort((a, b) => { // @ts-expect-error