Skip to content

Commit

Permalink
fix: 修复在执行其他筛选操作时,性别筛选没有重置
Browse files Browse the repository at this point in the history
  • Loading branch information
lengyibai committed Jul 2, 2024
1 parent 05c2a56 commit e1f5d5f
Show file tree
Hide file tree
Showing 13 changed files with 287 additions and 300 deletions.
9 changes: 1 addition & 8 deletions src/components/business/Tool/FilterGender/index.vue
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
<script setup lang="ts">
import { ref } from "vue";
import { vMouseTip } from "@/directives";
import { $mouseTipText, MOUSE_TIP } from "@/config";
import { usePlayAudio } from "@/hooks";
const $emit = defineEmits<{
change: [v: Game.GenderId];
}>();
const gender = defineModel<Game.GenderId>({ required: true });
const { playAudio } = usePlayAudio();
const gender = ref<Game.GenderId>(0);
/** @description 选择触发
* @param v 性别值
*/
const handleSetGender = (v: Game.GenderId) => {
gender.value = v;
$emit("change", v);
playAudio();
};
</script>
Expand Down
1 change: 0 additions & 1 deletion src/store/modules/atlas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ const AtlasStore = defineStore("atlas", () => {
* @param name 性别标识符
*/
filterGender(name: Game.GenderId) {
if (gender_type.value === name) return;
gender_type.value = name;
sortAll();
},
Expand Down
1 change: 0 additions & 1 deletion src/store/modules/hero.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ const HeroStore = defineStore("hero", () => {
* @param name 性别标识符
*/
filterGender(name: Game.GenderId) {
if (gender_type.value === name) return;
gender_type.value = name;
sortAll();
},
Expand Down
1 change: 0 additions & 1 deletion src/store/modules/heroDebris.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ const HeroDebrisStore = defineStore("heroDebris", () => {
* @param name 性别标识符
*/
filterGender(name: Game.GenderId) {
if (gender_type.value === name) return;
gender_type.value = name;
sortAll();
},
Expand Down
1 change: 0 additions & 1 deletion src/store/modules/kingCrystal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ const KingCrystalStore = defineStore("kingCrystal", () => {
* @param type 性别标识符
*/
filterGender(type: Game.GenderId) {
if (gender_type.value === type) return;
gender_type.value = type;
sortAll();
},
Expand Down
1 change: 0 additions & 1 deletion src/store/modules/skin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ const SkinStore = defineStore("skin", () => {
* @param type 性别标识符
*/
filterGender(type: Game.GenderId) {
if (gender_type.value === type) return;
gender_type.value = type;
sortAll();
},
Expand Down
1 change: 0 additions & 1 deletion src/store/modules/skinDebris.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ const SkinDebrisStore = defineStore("skinDebris", () => {
* @param type 性别标识符
*/
filterGender(type: Game.GenderId) {
if (gender_type.value === type) return;
gender_type.value = type;
sortAll();
},
Expand Down
Loading

0 comments on commit e1f5d5f

Please sign in to comment.