mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
18 lines
395 B
TypeScript
18 lines
395 B
TypeScript
import type { Ref } from 'vue';
|
|
import { useCreateContext } from '@/hooks';
|
|
import { LoginModuleType } from '@/interface';
|
|
|
|
interface ShareState {
|
|
activeModule: Ref<LoginModuleType>;
|
|
handleLoginModule(module: LoginModuleType): void;
|
|
}
|
|
|
|
const { useContext, useProvider } = useCreateContext<ShareState>();
|
|
|
|
export function useLoginContext() {
|
|
return {
|
|
useContext,
|
|
useProvider
|
|
};
|
|
}
|