init
This commit is contained in:
2025-06-27 17:42:38 +08:00
commit bd6402478b
5317 changed files with 785994 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
import { ref } from 'vue';
interface TabHooks {
activeTab: number;
setActiveTab: (index: number) => void;
}
// 1.切换tab
export const useTabHooks = (initialTab: number): TabHooks => {
const activeTab = ref(initialTab);
const setActiveTab = (index: number) => {
activeTab.value = index;
};
return {
activeTab,
setActiveTab,
};
};