Initial commit: AI 阅卷助手 Tauri v2 + Vue 3
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
|
||||
export const useAppStore = defineStore('app', () => {
|
||||
const isToolbarVisible = ref(true)
|
||||
const isResultDrawerOpen = ref(false)
|
||||
const isSettingDialogOpen = ref(false)
|
||||
const isHistoryDialogOpen = ref(false)
|
||||
const isTemplateDialogOpen = ref(false)
|
||||
const isRubricEditorOpen = ref(false)
|
||||
const isGrading = ref(false)
|
||||
|
||||
function toggleToolbar() { isToolbarVisible.value = !isToolbarVisible.value }
|
||||
function openResultDrawer() { isResultDrawerOpen.value = true }
|
||||
function closeResultDrawer() { isResultDrawerOpen.value = false }
|
||||
function openSettingDialog() { isSettingDialogOpen.value = true }
|
||||
function closeSettingDialog() { isSettingDialogOpen.value = false }
|
||||
function openHistoryDialog() { isHistoryDialogOpen.value = true }
|
||||
function closeHistoryDialog() { isHistoryDialogOpen.value = false }
|
||||
function openTemplateDialog() { isTemplateDialogOpen.value = true }
|
||||
function closeTemplateDialog() { isTemplateDialogOpen.value = false }
|
||||
function openRubricEditor() { isRubricEditorOpen.value = true }
|
||||
function closeRubricEditor() { isRubricEditorOpen.value = false }
|
||||
|
||||
return {
|
||||
isToolbarVisible, isResultDrawerOpen, isSettingDialogOpen, isHistoryDialogOpen,
|
||||
isTemplateDialogOpen, isRubricEditorOpen, isGrading,
|
||||
toggleToolbar, openResultDrawer, closeResultDrawer, openSettingDialog, closeSettingDialog,
|
||||
openHistoryDialog, closeHistoryDialog, openTemplateDialog, closeTemplateDialog,
|
||||
openRubricEditor, closeRubricEditor
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user