御魂选择器修改

This commit is contained in:
2024-02-29 00:24:20 +08:00
parent f8b4ce3d92
commit e005e2d7fd
7 changed files with 208 additions and 24 deletions

View File

@@ -41,7 +41,7 @@ import { ref } from "vue";
import type { TabsPaneContext } from 'element-plus'
const activeName = ref('SP')
const activeName = ref('ALL')
const handleClick = (tab: TabsPaneContext, event: Event) => {
console.log(tab, event)
@@ -65,6 +65,10 @@ export default {
current: {},
show: false,
rarityLevels: [
{
"label":"全部",
"name":"ALL"
},
{
"label":"SP",
"name":"SP"
@@ -121,6 +125,8 @@ export default {
// this.current = {};
},
filterShikigamiByRarity(rarity) {
if(rarity.toLowerCase() == "all")
return this.shikigamiData
// 将传入的rarity参数转换为小写
const lowerCaseRarity = rarity.toLowerCase();
return this.shikigamiData.filter(shikigami =>