refactor: replace common confirm dialogs with maintenance CRUD dialogs and streamline form handling in MasterDetailMntC.vue and SingleRecordMnt.vue

This commit is contained in:
skytek_xinliang
2026-03-26 16:01:20 +08:00
parent ec3fbace1a
commit 389ec56480
32 changed files with 2549 additions and 2763 deletions
+28
View File
@@ -0,0 +1,28 @@
import { computed } from 'vue'
import { useTheme } from 'vuetify'
import { getNextThemeName } from '@/utils/theme'
export function useThemeToggle () {
const theme = useTheme()
const availableThemeNames = computed(() =>
Object.keys(theme.themes.value ?? {}).filter((name) => name.startsWith('theme'))
)
function toggleTheme () {
const names = availableThemeNames.value
if (names.length === 0) return null
const current = theme.global.name.value
const next = getNextThemeName(names, current)
if (!next) return null
theme.change(next)
return next
}
return {
availableThemeNames,
toggleTheme,
}
}