import { ref } from 'vue'; import { currentThemeList, currentThemeOption, setThemeClassByIndex } from '@itshixun/qst-ui-system'; export const useToggleTheme = () => { const themeIndex = ref(currentThemeOption.currentThemeIndex || 0); const changeThemeByIndex = (index: number) => { setThemeClassByIndex(index); themeIndex.value = currentThemeOption.currentThemeIndex || 0; }; return { themeIndex, changeThemeByIndex, currentThemeList, }; };