- {{ message }}
+
+
+
+ {{ toast.message }}
+
+
-
\ No newline at end of file
diff --git a/src/composables/toast.js b/src/composables/toast.js
index 415a000..46433f1 100644
--- a/src/composables/toast.js
+++ b/src/composables/toast.js
@@ -3,18 +3,17 @@ import { useStore } from 'vuex';
export const useToast = () => {
const store = useStore();
- const toastMessage = computed(() => store.getters['toast/toastMessageWithSmile']);
- const toastAlertType = computed(() => store.state.toast.toastAlertType);
- const showToast = computed(() => store.state.toast.showToast);
+ const toasts = computed(() => store.state.toast.toasts);
+ // const toastMessage = computed(() => store.getters['toast/toastMessageWithSmile']);
+ // const toastAlertType = computed(() => store.state.toast.toastAlertType);
+ // const showToast = computed(() => store.state.toast.showToast);
const triggerToast = (message, type = 'success') => {
store.dispatch('toast/triggerToast', message, type);
}
return {
- toastMessage,
- toastAlertType,
- showToast,
+ toasts,
triggerToast
}
}
\ No newline at end of file
diff --git a/src/pages/index.vue b/src/pages/index.vue
index 504f464..6b8da35 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -1,7 +1,5 @@
- Home Page
- {{ count }}
-
+ Vue3 기초 익히기 - Composition Api