allow full-width character

This commit is contained in:
2024-02-25 17:46:39 +08:00
parent 61ccbc2147
commit db114bec67

View File

@@ -481,10 +481,12 @@ function parseExcelFile() {
case 'singer': case 'singer':
case '作者': case '作者':
case '歌手': case '歌手':
song.author = new List(value?.includes('/') ? value.split('/') : value.split(',')) song.author = value
.Select((a) => a.trim()) ?.replace('', '/')
.Distinct() .replace('', ',')
.ToArray() .split(/\/|,/)
.map((a: string) => a.trim())
.filter((value: string, index: number, self: string[]) => self.indexOf(value) === index)
break break
case 'description': case 'description':
case 'desc': case 'desc':
@@ -524,10 +526,12 @@ function parseExcelFile() {
case 'tags': case 'tags':
case 'tag': case 'tag':
case '标签': case '标签':
song.tags = new List(value?.split(',')) song.tags = value
.Select((t) => t.trim()) ?.replace('', '/')
.Distinct() .replace('', ',')
.ToArray() .split(/\/|,/)
.map((t: string) => t.trim())
.filter((value: string, index: number, self: string[]) => self.indexOf(value) === index)
break break
} }
} }
@@ -878,9 +882,7 @@ onMounted(async () => {
/> />
</template> </template>
</NTabPane> </NTabPane>
<NTabPane name="directory" tab="从文件夹读取"> <NTabPane name="directory" tab="从文件夹读取"> 开发中... </NTabPane>
开发中...
</NTabPane>
</NTabs> </NTabs>
</NSpin> </NSpin>
</NScrollbar> </NScrollbar>