完成活动时间正则匹配

close #94
This commit is contained in:
目棃
2024-02-25 15:40:10 +08:00
parent 553c1e1bba
commit d56a438662
7 changed files with 102 additions and 74 deletions

View File

@@ -66,7 +66,9 @@ function handleSelectW(val: SelectedWValue) {
const reg = /\/icon\/weapon\/(.+?)\.webp/;
const filterW = AppWeaponData.filter((item) => {
if (!val.star.includes(item.star)) return false;
return val.weapon.includes(item.weaponIcon.match(reg)![1]);
const match = item.weaponIcon.match(reg);
if (match === null) return false;
return val.weapon.includes(match[1]);
});
if (filterW.length === 0) {
showSnackbar({