feature: just create badge. Important thing is the await keyword

This commit is contained in:
Cindy Chang
2024-06-26 11:46:53 +08:00
parent 353eecad81
commit 965aaeb097
8 changed files with 79 additions and 28 deletions

View File

@@ -3,7 +3,7 @@
flex justify-center items-center">
<div class="flex">
<ModalAccountEdit v-if="whichModal === MODAL_ACCT_EDIT || whichModal === MODAL_CREATE_NEW "/>
<ModalAccountEditCreate v-if="whichModal === MODAL_ACCT_EDIT || whichModal === MODAL_CREATE_NEW "/>
<ModalAccountInfo v-if="whichModal === MODAL_ACCT_INFO"/>
<ModalDeleteAlert v-if="whichModal === MODAL_DELETE" />
</div>
@@ -11,9 +11,9 @@
</template>
<script>
import { watch, computed, } from 'vue';
import { computed, } from 'vue';
import { useModalStore } from '@/stores/modal.js';
import ModalAccountEdit from './ModalAccountEdit.vue';
import ModalAccountEditCreate from './ModalAccountEditCreate.vue';
import ModalAccountInfo from './ModalAccountInfo.vue';
import ModalDeleteAlert from './ModalDeleteAlert.vue';
import {
@@ -29,10 +29,6 @@
const modalStore = useModalStore();
const whichModal = computed(() => modalStore.whichModal);
watch(() => whichModal, (newVal, oldVal) => {
// (`whichModal changed from ${oldVal} to ${newVal}`);
});
return {
modalStore,
whichModal,
@@ -43,7 +39,7 @@
};
},
components: {
ModalAccountEdit,
ModalAccountEditCreate,
ModalAccountInfo,
ModalDeleteAlert,
}