riku
2024-05-09 75aeb4e63339b60f9559af984c7d9f87a7cba24a
src/components/search/OptionMission.vue
@@ -18,8 +18,10 @@
</template>
<script>
import { mapStores } from 'pinia';
import missionApi from '@/api/missionApi';
import { useFetchData } from '@/composables/fetchData';
import { useMissionStore } from '@/stores/mission';
export default {
  setup() {
@@ -37,6 +39,9 @@
      index: undefined
    };
  },
  computed: {
    ...mapStores(useMissionStore)
  },
  methods: {
    fetchMission() {
      this.fetchData((page, pageSize) => {
@@ -44,6 +49,7 @@
          .fethchMission({ type: this.type, page, pageSize })
          .then((res) => {
            this.missionList = res.data;
            this.missionStore.missionList = res.data;
            // if (this.missionList.length > 0) {
            //   this.handleChange(0);
            // }