导入 AKSRT 主题开发源码

This commit is contained in:
Claude Code committed 2026-07-03 22:50:34 +08:00
1 parent 9681dd3d48
commit 1268a55dd0
595 files changed
+127705

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
import { defineStore } from 'pinia'
import { ref, computed } from 'vue'
/**
* useAdminUiStore — global UI state for the admin panel.
*
* Tracks sidebar collapse, search, and breadcrumb state.
*/
export const useAdminUiStore = defineStore('admin-ui', () => {
/** Sidebar collapsed state */
const sidebarCollapsed = ref(false)
/** Current page search query (for inline page search) */
const pageSearch = ref('')
/** Global notification count (for badge display) */
const notificationCount = ref(0)
/** Whether any form on the current page has unsaved changes */
const hasUnsavedChanges = ref(false)
/** Toggle sidebar */
function toggleSidebar() {
sidebarCollapsed.value = !sidebarCollapsed.value
}
/** Clear page search */
function clearSearch() {
pageSearch.value = ''
}
return {
sidebarCollapsed,
pageSearch,
notificationCount,
hasUnsavedChanges,
toggleSidebar,
clearSearch,
}
})