diff --git a/src/components/select/SelectArtifactMainStat.vue b/src/components/select/SelectArtifactMainStat.vue index 4fef08b4..17bbfb9b 100644 --- a/src/components/select/SelectArtifactMainStat.vue +++ b/src/components/select/SelectArtifactMainStat.vue @@ -4,6 +4,7 @@ @update:modelValue="emits('update:modelValue', $event)" :multiple="props.multiple" :placeholder="props.placeholder" + :multiple-limit="props.limitNum" > () type ModelValue = "any" | ArtifactMainStatName | ArtifactMainStatName[] | null @@ -39,6 +38,7 @@ interface Props { multiple?: boolean, position?: ArtifactPosition | null, placeholder?: string + limitNum?: number } const props = withDefaults(defineProps(), { @@ -46,7 +46,8 @@ const props = withDefaults(defineProps(), { includeAny: true, multiple: false, position: null, - placeholder: "Select" + placeholder: "Select", + limitNum: 1000 }) const tagList = computed(() => { diff --git a/src/pages/ArtifactsPage/ArtifactsPage.vue b/src/pages/ArtifactsPage/ArtifactsPage.vue index 81943fae..3edbb872 100644 --- a/src/pages/ArtifactsPage/ArtifactsPage.vue +++ b/src/pages/ArtifactsPage/ArtifactsPage.vue @@ -161,6 +161,15 @@ :placeholder="t('misc.mainStat')" > +
+ +
{{ t("artPage.show16") }} @@ -283,6 +292,7 @@ function deleteArtifact(id: number) { // artifacts filters and display const filterSet: Ref = ref([]) const filterMainStat: Ref = ref([]) +const filterSubStat: Ref> = ref([]) const filterGe16 = ref(true) const artifactsCurrentSlot = computed(() => { @@ -291,12 +301,11 @@ const artifactsCurrentSlot = computed(() => { const filteredArtifacts = computed(() => { let results = []; - for (let artifact of artifactsCurrentSlot.value) { const setName = artifact.setName; const mainStatName = artifact.mainTag.name; const level = artifact.level; - + const subStatName = [...artifact.normalTags.flatMap(item => item.name), mainStatName] if (filterSet.value.length > 0 && filterSet.value.indexOf(setName) === -1) { continue; } @@ -306,6 +315,9 @@ const filteredArtifacts = computed(() => { if (filterGe16.value && level < 16) { continue; } + if (filterSubStat.value.length > 0 && !filterSubStat.value.every(item => subStatName.includes(item))) { + continue + } results.push(artifact); } @@ -639,4 +651,7 @@ function handleOutputCommand(command: string) { .tool-bar .tool-right { float: right; } +.el-select{ + margin-right: 10px +}