| 123456789101112131415161718192021222324252627282930313233 |
- import { FormInstance } from 'antd';
- import { LoginApiParams } from '@/apis';
- interface CaptchaData{
- uuid: string,
- img: string,
- };
- // 定义状态
- export type State = {
- buttonLoading: boolean,
- captchaData:CaptchaData
- tenantEnabled?: boolean,
- tenantEnabledList?: any[],
- };
- // 只读状态
- export type ReadonlyState = Readonly<State>;
- // 修改状态
- export type StateAction = {
- setButtonLoading: (loading: State['buttonLoading']) => void,
- setCaptchaData: (data: any) => void,
- setTenantEnabled: (data: any) => void,
- };
- // 仓库类型
- export type LoginStore = {
- state: ReadonlyState,
- onClickLogin: (data: LoginApiParams, remember: boolean) => Promise<any>,
- onCaptchaImage: () => Promise<any>,
- init: (form: FormInstance) => void,
- reset: () => void,
- };
|