Update list.ts

This commit is contained in:
brstlig 2023-06-23 09:31:04 +08:00 committed by GitHub
parent 82b657506c
commit ef1da5a9bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,10 +79,10 @@ const getIntv = (musicInfo: LX.Music.MusicInfo) => {
* @param localeId * @param localeId
* @returns * @returns
*/ */
export const sortListMusicInfo = async(list: LX.Music.MusicInfo[], sortType: 'up' | 'down', fieldName: 'name' | 'singer' | 'albumName' | 'interval' | 'source', localeId: string) => { export const sortListMusicInfo = async(list: LX.Music.MusicInfo[], sortType: 'up' | 'down' | 'disorder', fieldName: 'name' | 'singer' | 'albumName' | 'interval' | 'source', localeId: string) => {
// console.log(sortType, fieldName, localeId) // console.log(sortType, fieldName, localeId)
// const locale = new Intl.Locale(localeId) // const locale = new Intl.Locale(localeId)
if (sortType == 'unorder' && (fieldName =='name' || fieldName == 'singer' || fieldName =='albumName' || fieldName =='interval' || fieldName =='source')){ if (sortType ==disorder' && (fieldName =='name' || fieldName == 'singer' || fieldName =='albumName' || fieldName =='interval' || fieldName =='source')){
let change_num:number[]=[] let change_num:number[]=[]