feat(stores): add Pinia domain stores and update docs

Implement concrete Pinia stores for app UI and domain data instead of
placeholder re-exports, including seeded student records and snackbar state.

Refresh README guidance for components, plugins, and services to document the
current project structure, data flow, and usage conventions.feat(stores): add Pinia domain stores and update docs

Implement concrete Pinia stores for app UI and domain data instead of
placeholder re-exports, including seeded student records and snackbar state.

Refresh README guidance for components, plugins, and services to document the
current project structure, data flow, and usage conventions.
This commit is contained in:
skytek_xinliang
2026-05-05 11:54:19 +08:00
parent 6eab4d9744
commit b37f4363eb
23 changed files with 1531 additions and 1588 deletions
+30 -1
View File
@@ -1 +1,30 @@
export * from './stores/messages'
import { defineStore } from 'pinia'
import { computed, ref } from 'vue'
export const useMessageStore = defineStore('messages', () => {
const openState = ref(false)
// 開啟訊息中心 Dialog
const open = () => {
openState.value = true
}
// 關閉訊息中心 Dialog
const close = () => {
openState.value = false
}
// 提供 v-model 綁定用的 computed
const isOpen = computed({
get: () => openState.value,
set: (value) => {
openState.value = value
},
})
return {
isOpen,
open,
close,
}
})