Skip to content

Commit

Permalink
[all]: Do not drop the splitter between pinyin of individual
Browse files Browse the repository at this point in the history
... characters, as the previous behavior has some minor
errors
  • Loading branch information
ThrRip committed Dec 24, 2024
1 parent d3bf224 commit f6bc3ff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions packages/admin/app/pages/playlist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions packages/home/app/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f6bc3ff

Please sign in to comment.