@jctrans-materials/comps-vue2 1.0.41-beta.0 → 1.0.41-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/JcCarrierSearch/JcCarrierSearch.test.d.ts +1 -0
- package/dist/components/JcCarrierSearch/index.d.ts +10 -0
- package/dist/components/JcLoginDialog/cmps/ForgetPassword.d.ts +80 -0
- package/dist/components/JcLoginDialog/cmps/ThirdBindLogin.d.ts +89 -0
- package/dist/components/JcLoginDialog/cmps/WechatBindLogin.d.ts +68 -0
- package/dist/components/JcLoginDialog/cmps/WechatLogin.d.ts +37 -0
- package/dist/components/JcLoginDialog/composables/useAuthLogin.d.ts +36 -0
- package/dist/components/JcLoginDialog/composables/useForgetPassword.d.ts +35 -0
- package/dist/components/JcLoginDialog/composables/useThirdPartyLogin.d.ts +81 -0
- package/dist/components/JcLoginDialog/constant.d.ts +77 -0
- package/dist/components/JcMSearch/common.d.ts +6 -0
- package/dist/components/JcMSearch/hooks/useSearchHistory.d.ts +19 -0
- package/dist/components/JcMSearch/hooks/useSearchLogic.d.ts +19 -0
- package/dist/components/JcMSearch/index.d.ts +107 -0
- package/dist/components/JcSearch/common.d.ts +4 -14
- package/dist/components/JcSearch/index.d.ts +1 -1
- package/dist/components/LineCascader/data.d.ts +129 -0
- package/dist/components/LineCascader/index.d.ts +81 -0
- package/dist/components/hooks/useModelValueHydration.d.ts +18 -0
- package/dist/gio.d.ts +8 -1
- package/dist/index.cjs.js +37 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +10383 -6971
- package/package.json +11 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -21,6 +21,10 @@ declare const _default: import('../../../vue-demi').DefineComponent<{
|
|
|
21
21
|
type: () => "air" | "shipping";
|
|
22
22
|
default: string;
|
|
23
23
|
};
|
|
24
|
+
reportType: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
24
28
|
placeholder: {
|
|
25
29
|
type: StringConstructor;
|
|
26
30
|
default: string;
|
|
@@ -42,6 +46,7 @@ declare const _default: import('../../../vue-demi').DefineComponent<{
|
|
|
42
46
|
innerValue: import('../../../vue-demi').WritableComputedRef<string | number | unknown[]>;
|
|
43
47
|
loading: import('../../../vue-demi').Ref<boolean>;
|
|
44
48
|
options: import('../../../vue-demi').Ref<{
|
|
49
|
+
[x: string]: unknown;
|
|
45
50
|
id: number | string;
|
|
46
51
|
type: LocationType;
|
|
47
52
|
nameCn?: string | undefined;
|
|
@@ -93,6 +98,10 @@ declare const _default: import('../../../vue-demi').DefineComponent<{
|
|
|
93
98
|
type: () => "air" | "shipping";
|
|
94
99
|
default: string;
|
|
95
100
|
};
|
|
101
|
+
reportType: {
|
|
102
|
+
type: StringConstructor;
|
|
103
|
+
default: string;
|
|
104
|
+
};
|
|
96
105
|
placeholder: {
|
|
97
106
|
type: StringConstructor;
|
|
98
107
|
default: string;
|
|
@@ -114,6 +123,7 @@ declare const _default: import('../../../vue-demi').DefineComponent<{
|
|
|
114
123
|
modelValue: string | number | unknown[];
|
|
115
124
|
lang: string;
|
|
116
125
|
lineType: "air" | "shipping";
|
|
126
|
+
reportType: string;
|
|
117
127
|
placeholder: string;
|
|
118
128
|
multiple: boolean;
|
|
119
129
|
showApplyData: boolean;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
declare const _default: import('../../../../vue-demi').DefineComponent<{
|
|
2
|
+
isEn: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
default: boolean;
|
|
5
|
+
};
|
|
6
|
+
}, {
|
|
7
|
+
activeStep: import('../../../../vue-demi').Ref<number>;
|
|
8
|
+
activeTab: import('../../../../vue-demi').Ref<"email" | "mobile">;
|
|
9
|
+
loading: import('../../../../vue-demi').Ref<boolean>;
|
|
10
|
+
verifyVisible: import('../../../../vue-demi').Ref<boolean>;
|
|
11
|
+
formA: {
|
|
12
|
+
userName: string;
|
|
13
|
+
};
|
|
14
|
+
formB: {
|
|
15
|
+
code: string;
|
|
16
|
+
password: string;
|
|
17
|
+
confirmPassword: string;
|
|
18
|
+
};
|
|
19
|
+
userData: any;
|
|
20
|
+
disabledTabs: {
|
|
21
|
+
email: boolean;
|
|
22
|
+
mobile: boolean;
|
|
23
|
+
};
|
|
24
|
+
showCustomerService: import('../../../../vue-demi').Ref<boolean>;
|
|
25
|
+
codeCountdown: {
|
|
26
|
+
mobile: boolean;
|
|
27
|
+
email: boolean;
|
|
28
|
+
};
|
|
29
|
+
formARef: import('../../../../vue-demi').Ref<any>;
|
|
30
|
+
formBRef: import('../../../../vue-demi').Ref<any>;
|
|
31
|
+
rulesA: {
|
|
32
|
+
userName: {
|
|
33
|
+
required: boolean;
|
|
34
|
+
message: string;
|
|
35
|
+
trigger: string;
|
|
36
|
+
}[];
|
|
37
|
+
};
|
|
38
|
+
rulesB: {
|
|
39
|
+
code: {
|
|
40
|
+
required: boolean;
|
|
41
|
+
validator: (rule: any, value: any, cb: any) => any;
|
|
42
|
+
trigger: string;
|
|
43
|
+
}[];
|
|
44
|
+
password: ({
|
|
45
|
+
required: boolean;
|
|
46
|
+
validator: (rule: any, val: any, cb: any) => any;
|
|
47
|
+
trigger: string;
|
|
48
|
+
} | {
|
|
49
|
+
validator: (rule: any, value: string, callback: any) => void;
|
|
50
|
+
trigger: string;
|
|
51
|
+
required?: undefined;
|
|
52
|
+
})[];
|
|
53
|
+
confirmPassword: ({
|
|
54
|
+
required: boolean;
|
|
55
|
+
validator: (rule: any, val: any, cb: any) => any;
|
|
56
|
+
trigger: string;
|
|
57
|
+
} | {
|
|
58
|
+
validator: (rule: any, value: string, callback: any) => void;
|
|
59
|
+
trigger: string;
|
|
60
|
+
required?: undefined;
|
|
61
|
+
})[];
|
|
62
|
+
};
|
|
63
|
+
handleStep1Next: () => void;
|
|
64
|
+
handleStep2Submit: () => Promise<void>;
|
|
65
|
+
handleChangeTab: (type?: "email" | "mobile") => void;
|
|
66
|
+
handleTriggerVerify: () => void;
|
|
67
|
+
handleVerifySuccess: (captchaData: any) => void;
|
|
68
|
+
handleSendCodeVerifySuccess: ({ captchaData, startTimer }: {
|
|
69
|
+
captchaData: any;
|
|
70
|
+
startTimer: any;
|
|
71
|
+
}) => void;
|
|
72
|
+
}, {}, {}, {}, import('../../../../vue-demi').ComponentOptionsMixin, import('../../../../vue-demi').ComponentOptionsMixin, "to-login"[], string, Readonly<import('../../../../vue-demi').ExtractPropTypes<{
|
|
73
|
+
isEn: {
|
|
74
|
+
type: BooleanConstructor;
|
|
75
|
+
default: boolean;
|
|
76
|
+
};
|
|
77
|
+
}>>, {
|
|
78
|
+
isEn: boolean;
|
|
79
|
+
}>;
|
|
80
|
+
export default _default;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { PropType } from 'vue-demi';
|
|
2
|
+
|
|
3
|
+
interface BindUser {
|
|
4
|
+
userId?: string | number;
|
|
5
|
+
account?: string;
|
|
6
|
+
email?: string;
|
|
7
|
+
mobile?: string;
|
|
8
|
+
userNameEn?: string;
|
|
9
|
+
userNameCn?: string;
|
|
10
|
+
compNameEn?: string;
|
|
11
|
+
compNameCn?: string;
|
|
12
|
+
emailValidFlag?: string;
|
|
13
|
+
mobileValidFlag?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const _default: import('../../../../vue-demi').DefineComponent<{
|
|
16
|
+
isEn: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
default: boolean;
|
|
19
|
+
};
|
|
20
|
+
bindList: {
|
|
21
|
+
type: PropType<BindUser[]>;
|
|
22
|
+
default: () => never[];
|
|
23
|
+
};
|
|
24
|
+
}, {
|
|
25
|
+
submitting: import('../../../../vue-demi').Ref<boolean>;
|
|
26
|
+
selectedUser: import('../../../../vue-demi').Ref<{
|
|
27
|
+
userId?: string | number | undefined;
|
|
28
|
+
account?: string | undefined;
|
|
29
|
+
email?: string | undefined;
|
|
30
|
+
mobile?: string | undefined;
|
|
31
|
+
userNameEn?: string | undefined;
|
|
32
|
+
userNameCn?: string | undefined;
|
|
33
|
+
compNameEn?: string | undefined;
|
|
34
|
+
compNameCn?: string | undefined;
|
|
35
|
+
emailValidFlag?: string | undefined;
|
|
36
|
+
mobileValidFlag?: string | undefined;
|
|
37
|
+
} | null>;
|
|
38
|
+
currentUser: import('../../../../vue-demi').ComputedRef<BindUser | null>;
|
|
39
|
+
bindLoginFormRef: import('../../../../vue-demi').Ref<any>;
|
|
40
|
+
loginForm: import('../../../../vue-demi').Ref<{
|
|
41
|
+
type: string;
|
|
42
|
+
username: string;
|
|
43
|
+
password: string;
|
|
44
|
+
email: string;
|
|
45
|
+
phone: string;
|
|
46
|
+
areaCode: string;
|
|
47
|
+
code: string;
|
|
48
|
+
}>;
|
|
49
|
+
areaCodeData: import('../../../../vue-demi').Ref<any[]>;
|
|
50
|
+
codeReady: import('../../../../vue-demi').Ref<boolean>;
|
|
51
|
+
captchaVisible: import('../../../../vue-demi').Ref<boolean>;
|
|
52
|
+
computedRules: import('../../../../vue-demi').ComputedRef<{
|
|
53
|
+
username: any;
|
|
54
|
+
password: any;
|
|
55
|
+
} | {
|
|
56
|
+
email: any;
|
|
57
|
+
code: any;
|
|
58
|
+
username?: undefined;
|
|
59
|
+
password?: undefined;
|
|
60
|
+
} | {
|
|
61
|
+
phone: any;
|
|
62
|
+
code: any;
|
|
63
|
+
username?: undefined;
|
|
64
|
+
password?: undefined;
|
|
65
|
+
}>;
|
|
66
|
+
handleSelectUser: (item: any) => void;
|
|
67
|
+
handleTypeInput: (val: string) => void;
|
|
68
|
+
handleChangeSubType: (type: string) => Promise<void>;
|
|
69
|
+
validateField: (field: string) => void;
|
|
70
|
+
handleGetCode: ({ captchaData, startTimer }: any) => void;
|
|
71
|
+
handleSubmit: () => void;
|
|
72
|
+
handleCaptchaSuccess: (captcha: {
|
|
73
|
+
uuid: string;
|
|
74
|
+
code: string;
|
|
75
|
+
}) => void;
|
|
76
|
+
}, {}, {}, {}, import('../../../../vue-demi').ComponentOptionsMixin, import('../../../../vue-demi').ComponentOptionsMixin, {}, string, Readonly<import('../../../../vue-demi').ExtractPropTypes<{
|
|
77
|
+
isEn: {
|
|
78
|
+
type: BooleanConstructor;
|
|
79
|
+
default: boolean;
|
|
80
|
+
};
|
|
81
|
+
bindList: {
|
|
82
|
+
type: PropType<BindUser[]>;
|
|
83
|
+
default: () => never[];
|
|
84
|
+
};
|
|
85
|
+
}>>, {
|
|
86
|
+
isEn: boolean;
|
|
87
|
+
bindList: BindUser[];
|
|
88
|
+
}>;
|
|
89
|
+
export default _default;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
declare const _default: import('../../../../vue-demi').DefineComponent<{
|
|
2
|
+
isEn: {
|
|
3
|
+
type: BooleanConstructor;
|
|
4
|
+
default: boolean;
|
|
5
|
+
};
|
|
6
|
+
}, {
|
|
7
|
+
loginForm: import('../../../../vue-demi').Ref<{
|
|
8
|
+
type: string;
|
|
9
|
+
username: string;
|
|
10
|
+
password: string;
|
|
11
|
+
remember: boolean;
|
|
12
|
+
email: string;
|
|
13
|
+
phone: string;
|
|
14
|
+
areaCode: string;
|
|
15
|
+
code: string;
|
|
16
|
+
}>;
|
|
17
|
+
areaCodeData: import('../../../../vue-demi').Ref<{
|
|
18
|
+
id: string;
|
|
19
|
+
nameCn: string;
|
|
20
|
+
nameEn: string;
|
|
21
|
+
shortCode: string;
|
|
22
|
+
telCode: string;
|
|
23
|
+
}[]>;
|
|
24
|
+
bindLoginFormRef: import('../../../../vue-demi').Ref<any>;
|
|
25
|
+
codeReady: import('../../../../vue-demi').Ref<boolean>;
|
|
26
|
+
isCounting: import('../../../../vue-demi').Ref<boolean>;
|
|
27
|
+
loadingBtn: import('../../../../vue-demi').Ref<boolean>;
|
|
28
|
+
captchaVisible: import('../../../../vue-demi').Ref<boolean>;
|
|
29
|
+
LoginType: import('../../../../vue-demi').ComputedRef<string>;
|
|
30
|
+
computedRules: import('../../../../vue-demi').ComputedRef<{
|
|
31
|
+
username: any;
|
|
32
|
+
password: any;
|
|
33
|
+
} | {
|
|
34
|
+
email: any;
|
|
35
|
+
code: any;
|
|
36
|
+
username?: undefined;
|
|
37
|
+
password?: undefined;
|
|
38
|
+
} | {
|
|
39
|
+
phone: any;
|
|
40
|
+
code: any;
|
|
41
|
+
username?: undefined;
|
|
42
|
+
password?: undefined;
|
|
43
|
+
} | {
|
|
44
|
+
username?: undefined;
|
|
45
|
+
password?: undefined;
|
|
46
|
+
}>;
|
|
47
|
+
handleTypeInput: (val: string) => void;
|
|
48
|
+
handleChangeSubType: (type: string) => Promise<void>;
|
|
49
|
+
handleAreaCodeChange: (val: string) => void;
|
|
50
|
+
validateField: (field: any) => void;
|
|
51
|
+
handleSubmit: () => void;
|
|
52
|
+
handleCaptchaSuccess: (captcha: {
|
|
53
|
+
uuid: string;
|
|
54
|
+
code: string;
|
|
55
|
+
}) => void;
|
|
56
|
+
handleGetCode: ({ captchaData, startTimer }: {
|
|
57
|
+
captchaData: any;
|
|
58
|
+
startTimer: any;
|
|
59
|
+
}) => void;
|
|
60
|
+
}, {}, {}, {}, import('../../../../vue-demi').ComponentOptionsMixin, import('../../../../vue-demi').ComponentOptionsMixin, "needComplete"[], string, Readonly<import('../../../../vue-demi').ExtractPropTypes<{
|
|
61
|
+
isEn: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
default: boolean;
|
|
64
|
+
};
|
|
65
|
+
}>>, {
|
|
66
|
+
isEn: boolean;
|
|
67
|
+
}>;
|
|
68
|
+
export default _default;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
declare const _default: import('../../../../vue-demi').DefineComponent<{
|
|
2
|
+
appId: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
path: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
isEn: {
|
|
11
|
+
type: BooleanConstructor;
|
|
12
|
+
default: boolean;
|
|
13
|
+
};
|
|
14
|
+
}, {
|
|
15
|
+
qrCanvasRef: import('../../../../vue-demi').Ref<HTMLCanvasElement | null>;
|
|
16
|
+
loadingCode: import('../../../../vue-demi').Ref<boolean>;
|
|
17
|
+
isShowMask: import('../../../../vue-demi').Ref<boolean>;
|
|
18
|
+
handleRefresh: () => void;
|
|
19
|
+
}, {}, {}, {}, import('../../../../vue-demi').ComponentOptionsMixin, import('../../../../vue-demi').ComponentOptionsMixin, ("success" | "need-register" | "need-complete")[], string, Readonly<import('../../../../vue-demi').ExtractPropTypes<{
|
|
20
|
+
appId: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
path: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
isEn: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
}>>, {
|
|
33
|
+
isEn: boolean;
|
|
34
|
+
path: string;
|
|
35
|
+
appId: string;
|
|
36
|
+
}>;
|
|
37
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { AreaCodeData, CaptchaData, LoginFormData } from '../loginDialog';
|
|
2
|
+
|
|
3
|
+
interface AuthOptions {
|
|
4
|
+
appId?: string;
|
|
5
|
+
isEn?: boolean;
|
|
6
|
+
onSuccess?: (data: any) => void;
|
|
7
|
+
onNeedComplete?: (data: any) => void;
|
|
8
|
+
}
|
|
9
|
+
type LoginType = "account" | "code" | "wechat";
|
|
10
|
+
export declare function useAuthLogin(options?: AuthOptions): {
|
|
11
|
+
loading: import('../../../../vue-demi').Ref<boolean>;
|
|
12
|
+
captchaVisible: import('../../../../vue-demi').Ref<boolean>;
|
|
13
|
+
handleAuthSubmit: (params: {
|
|
14
|
+
loginType: LoginType;
|
|
15
|
+
loginForm: LoginFormData;
|
|
16
|
+
captchaData: CaptchaData;
|
|
17
|
+
isKick?: boolean;
|
|
18
|
+
mobileUid?: string;
|
|
19
|
+
emailUid?: string;
|
|
20
|
+
areaCodeData?: AreaCodeData[];
|
|
21
|
+
remember?: boolean;
|
|
22
|
+
}) => Promise<void>;
|
|
23
|
+
executeRedirect: (loginData: any) => void;
|
|
24
|
+
loginNeedComplete: import('../../../../vue-demi').Ref<boolean>;
|
|
25
|
+
handleBindSubmit: (params: {
|
|
26
|
+
loginType: "account" | "code";
|
|
27
|
+
loginForm: LoginFormData;
|
|
28
|
+
captchaData: CaptchaData;
|
|
29
|
+
uniqueCode: string;
|
|
30
|
+
isKick?: boolean;
|
|
31
|
+
mobileUid?: string;
|
|
32
|
+
emailUid?: string;
|
|
33
|
+
areaCodeData?: AreaCodeData[];
|
|
34
|
+
}) => Promise<void>;
|
|
35
|
+
};
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare function useForgetPassword(props: {
|
|
2
|
+
isEn: boolean;
|
|
3
|
+
}): {
|
|
4
|
+
activeStep: import('../../../../vue-demi').Ref<number>;
|
|
5
|
+
activeTab: import('../../../../vue-demi').Ref<"email" | "mobile">;
|
|
6
|
+
loading: import('../../../../vue-demi').Ref<boolean>;
|
|
7
|
+
verifyVisible: import('../../../../vue-demi').Ref<boolean>;
|
|
8
|
+
formA: {
|
|
9
|
+
userName: string;
|
|
10
|
+
};
|
|
11
|
+
formB: {
|
|
12
|
+
code: string;
|
|
13
|
+
password: string;
|
|
14
|
+
confirmPassword: string;
|
|
15
|
+
};
|
|
16
|
+
userData: any;
|
|
17
|
+
disabledTabs: {
|
|
18
|
+
email: boolean;
|
|
19
|
+
mobile: boolean;
|
|
20
|
+
};
|
|
21
|
+
showCustomerService: import('../../../../vue-demi').Ref<boolean>;
|
|
22
|
+
codeCountdown: {
|
|
23
|
+
mobile: boolean;
|
|
24
|
+
email: boolean;
|
|
25
|
+
};
|
|
26
|
+
codeReady: import('../../../../vue-demi').Ref<boolean>;
|
|
27
|
+
handleTriggerVerify: () => void;
|
|
28
|
+
handleVerifySuccess: (captchaData: any) => void;
|
|
29
|
+
handleSendCodeVerifySuccess: ({ captchaData, startTimer }: {
|
|
30
|
+
captchaData: any;
|
|
31
|
+
startTimer: any;
|
|
32
|
+
}) => void;
|
|
33
|
+
handleSubmitReset: () => Promise<boolean | undefined>;
|
|
34
|
+
restFormB: () => void;
|
|
35
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
interface ThirdPartyConfig {
|
|
2
|
+
appId: string;
|
|
3
|
+
baseUrl?: string;
|
|
4
|
+
redirectPath?: string;
|
|
5
|
+
isEn?: boolean;
|
|
6
|
+
onSuccess?: (data: any) => void;
|
|
7
|
+
onError?: (error: any) => void;
|
|
8
|
+
onNeedBind?: (list: any[]) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const getThirdPartySessions: () => {
|
|
11
|
+
thirdPartyId: string;
|
|
12
|
+
thirdPartyEmail: string;
|
|
13
|
+
thirdPartyType: string;
|
|
14
|
+
thirdPartyUserName: string;
|
|
15
|
+
mobileEmailList: any;
|
|
16
|
+
};
|
|
17
|
+
export declare const setThirdPartyEmailVerifyList: (data: any[]) => void;
|
|
18
|
+
export declare const getThirdPartyEmailVerifyList: () => any;
|
|
19
|
+
export declare const setThirdPartyMobileVerifyList: (data: any[]) => void;
|
|
20
|
+
export declare const getThirdPartyMobileVerifyList: () => any;
|
|
21
|
+
/**
|
|
22
|
+
* 第三方 OAuth 登录组合式函数(Facebook、LinkedIn)
|
|
23
|
+
*
|
|
24
|
+
* 管理完整的 OAuth 流程,包括:
|
|
25
|
+
* - 打开认证弹窗
|
|
26
|
+
* - 通过 postMessage 接收并验证授权码
|
|
27
|
+
* - 处理登录成功/失败状态
|
|
28
|
+
* - 管理绑定和注册对话框
|
|
29
|
+
* - 防止弹窗检测和消息处理之间的竞态条件
|
|
30
|
+
*
|
|
31
|
+
* @param {ThirdPartyConfig} 配置 - 包含以下属性的配置对象:
|
|
32
|
+
* - appId: 应用标识符(例如:"CPA")
|
|
33
|
+
* - redirectPath: 登录后的重定向目标
|
|
34
|
+
* - isEn: 语言标志,用于错误消息
|
|
35
|
+
* - onSuccess: 登录成功时的回调函数
|
|
36
|
+
* - onNeedBind: 需要账号绑定时的回调函数
|
|
37
|
+
* - onError: 登录失败时的回调函数
|
|
38
|
+
*
|
|
39
|
+
* @returns {Object} 登录组合式接口,包含:
|
|
40
|
+
* - isLoading: 布尔响应式引用,表示登录操作是否进行中
|
|
41
|
+
* - isBindDialogVisible: 布尔响应式引用,控制绑定对话框的可见性
|
|
42
|
+
* - isRegisterVisible: 布尔响应式引用,控制注册对话框的可见性
|
|
43
|
+
* - isUserClosed: 布尔响应式引用,表示用户是否手动关闭了弹窗
|
|
44
|
+
* - bindList: 数组响应式引用,存储需要绑定的账号列表
|
|
45
|
+
* - loginResult: 对象响应式引用,存储登录响应数据
|
|
46
|
+
* - startLogin: 函数,用于启动 OAuth 登录流程,参数为 ("FACEBOOK" | "LINKEDIN" | "TEST")
|
|
47
|
+
* - resetState: 函数,完全重置所有登录状态并清理监听器
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* - 使用实例锁(hookInstanceId)处理多个同时进行的登录尝试
|
|
51
|
+
* - 通过 isHandlingMessage 标志实现竞态条件防止
|
|
52
|
+
* - 根据允许列表验证 postMessage 来源,保证安全性
|
|
53
|
+
* - 支持生产和预发布环境,使用不同的 OAuth 端点
|
|
54
|
+
* - 组件卸载时自动清理事件监听器和定时器
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* const { startLogin, isLoading, isBindDialogVisible } = useThirdPartyLogin({
|
|
59
|
+
* appId: "CPA",
|
|
60
|
+
* redirectPath: "/dashboard",
|
|
61
|
+
* onSuccess: (data) => console.log("登录成功", data),
|
|
62
|
+
* onNeedBind: (list) => console.log("需要绑定", list)
|
|
63
|
+
* });
|
|
64
|
+
*
|
|
65
|
+
* // 触发登录
|
|
66
|
+
* startLogin("FACEBOOK");
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
export declare function useThirdPartyLogin(config: ThirdPartyConfig): {
|
|
70
|
+
isLoading: import('../../../../vue-demi').Ref<boolean>;
|
|
71
|
+
isBindDialogVisible: import('../../../../vue-demi').Ref<boolean>;
|
|
72
|
+
isRegisterVisible: import('../../../../vue-demi').Ref<boolean>;
|
|
73
|
+
isUserClosed: import('../../../../vue-demi').Ref<boolean>;
|
|
74
|
+
bindList: import('../../../../vue-demi').Ref<any[]>;
|
|
75
|
+
loginResult: any;
|
|
76
|
+
startLogin: (type: "FACEBOOK" | "LINKEDIN" | "TEST") => void;
|
|
77
|
+
resetState: () => void;
|
|
78
|
+
handleBindThirdParty: (list: any[]) => void;
|
|
79
|
+
resetBindRegisterState: () => void;
|
|
80
|
+
};
|
|
81
|
+
export {};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export declare function validateQQEmail(rule: any, value: any, callback: any): void;
|
|
2
|
+
interface ValidationRule {
|
|
3
|
+
field?: string;
|
|
4
|
+
fullField?: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
msg?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function validateUserEmail(rule: ValidationRule, value: string | null | undefined, callback: (error?: Error) => void, isEn?: boolean, // 注入文案
|
|
9
|
+
checkExist?: boolean): Promise<void>;
|
|
10
|
+
export declare function validateThirdPartyEmail(rule: ValidationRule, value: string | null | undefined, callback: (error?: Error) => void, isEn?: boolean, // 注入文案
|
|
11
|
+
context?: any): Promise<void>;
|
|
12
|
+
export declare function validateThirdPartyMobile(rule: ValidationRule, value: string | null | undefined, callback: (error?: Error) => void, isEn?: boolean, // 注入文案
|
|
13
|
+
context?: any): void;
|
|
14
|
+
/**
|
|
15
|
+
* 整合后的用户姓名校验
|
|
16
|
+
* @param {Object} rule 校验规则
|
|
17
|
+
* @param {String} value 输入值
|
|
18
|
+
* @param {Function} callback 回调函数
|
|
19
|
+
* @param {Boolean} isEn 语种环境 (默认 true)
|
|
20
|
+
* @param {Boolean} isChina 是否为中国区 (通过 context 传入,决定校验规则)
|
|
21
|
+
*/
|
|
22
|
+
export declare function validateName(rule: any, value: any, callback: any, isEn?: boolean, isChina?: boolean): any;
|
|
23
|
+
/**
|
|
24
|
+
* 用户名校验函数
|
|
25
|
+
* @param {Object} rule 校验规则
|
|
26
|
+
* @param {String} value 输入值
|
|
27
|
+
* @param {Function} callback 回调函数
|
|
28
|
+
* @param {Boolean} isEn 是否为英文环境 (默认为 true)
|
|
29
|
+
*/
|
|
30
|
+
export declare function validateUserName(rule: any, value: any, callback: any, isEn?: boolean): any;
|
|
31
|
+
/**
|
|
32
|
+
* 密码校验函数
|
|
33
|
+
* @param {Object} rule 校验规则
|
|
34
|
+
* @param {String} value 输入值
|
|
35
|
+
* @param {Function} callback 回调函数
|
|
36
|
+
* @param {Boolean} isEn 是否为英文环境
|
|
37
|
+
*/
|
|
38
|
+
export declare function validateUserPass(rule: any, value: any, callback: any, isEn?: boolean): any;
|
|
39
|
+
/**
|
|
40
|
+
* 手机号校验函数(带接口查重)
|
|
41
|
+
* @param {Object} rule 校验规则
|
|
42
|
+
* @param {String} value 输入值
|
|
43
|
+
* @param {Function} callback 回调函数
|
|
44
|
+
* @param {Boolean} isEn 是否为英文环境
|
|
45
|
+
*/
|
|
46
|
+
export declare function validateUserMobilefive(rule: any, value: any, callback: any, isEn?: boolean, checkExist?: boolean): Promise<any>;
|
|
47
|
+
/**
|
|
48
|
+
* 空格处理工具函数
|
|
49
|
+
*/
|
|
50
|
+
export declare function replaceWSpace(value: any): any;
|
|
51
|
+
/**
|
|
52
|
+
* 公司名称校验函数 (支持中英文切换)
|
|
53
|
+
* @param {Object} rule 校验规则
|
|
54
|
+
* @param {String} value 输入值
|
|
55
|
+
* @param {Function} callback 回调函数
|
|
56
|
+
* @param {Boolean} isEn 是否为英文环境
|
|
57
|
+
* @param {Object} context 传入 this 上下文(用于访问 countryId, appId 等)
|
|
58
|
+
*/
|
|
59
|
+
/**
|
|
60
|
+
* 整合后的公司名称校验(根据国家 ID 自动切换逻辑)
|
|
61
|
+
* @param {Object} rule 校验规则
|
|
62
|
+
* @param {String} value 输入值
|
|
63
|
+
* @param {Function} callback 回调函数
|
|
64
|
+
* @param {Boolean} isEn 语种环境
|
|
65
|
+
* @param {Object} context 组件实例 (this)
|
|
66
|
+
*/
|
|
67
|
+
export declare function validateCompanyName(rule: any, value: any, callback: any, isEn: boolean | undefined, context: any): Promise<any>;
|
|
68
|
+
export declare function validateVerifyCode(rule: any, value: any, callback: any, isEn?: boolean): any;
|
|
69
|
+
export declare function go2Agreement(target?: string): void;
|
|
70
|
+
export declare function go2Policy(target?: string): void;
|
|
71
|
+
/**
|
|
72
|
+
* 统一路由/URL跳转处理
|
|
73
|
+
* @param {string} path - 跳转路径或全路径URL
|
|
74
|
+
* @param {number} delay - 延迟时间(ms),默认100ms
|
|
75
|
+
*/
|
|
76
|
+
export declare const handleRedirect: (path: any, delay?: number) => void;
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { LocationType } from '@jctrans-materials/shared';
|
|
2
|
+
|
|
3
|
+
export declare function getCountryApi(key: string): Promise<import('@jctrans-materials/shared').BaseResponse<import('@jctrans-materials/shared').LocationUnifiedItem>>;
|
|
4
|
+
export declare function searchAllApi(key: string, types: LocationType[]): Promise<import('@jctrans-materials/shared').BaseResponse<import('@jctrans-materials/shared').LocationUnifiedItem>>;
|
|
5
|
+
export declare function searchByNameApi(key: string, types?: LocationType[], other?: {}): Promise<import('@jctrans-materials/shared').BaseResponse<import('@jctrans-materials/shared').LocationUnifiedItem>>;
|
|
6
|
+
export declare const searchByIdWithTypeApi: (id: string | number | Array<number | string>, type: LocationType) => any;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Ref } from 'vue-demi';
|
|
2
|
+
import { SearchItem } from '../type';
|
|
3
|
+
|
|
4
|
+
export declare function useSearchHistory(historyKey: Ref<string | undefined>): {
|
|
5
|
+
searchHistory: Ref<{
|
|
6
|
+
[x: string]: any;
|
|
7
|
+
id?: string | number | undefined;
|
|
8
|
+
type: string;
|
|
9
|
+
display?: string | undefined;
|
|
10
|
+
displayEn?: string | undefined;
|
|
11
|
+
displayCn?: string | undefined;
|
|
12
|
+
name?: string | undefined;
|
|
13
|
+
nameEn?: string | undefined;
|
|
14
|
+
nameCn?: string | undefined;
|
|
15
|
+
}[]>;
|
|
16
|
+
saveToHistory: (item: SearchItem) => void;
|
|
17
|
+
clearHistory: () => void;
|
|
18
|
+
HasHistory: import('../../../../vue-demi').ComputedRef<boolean>;
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Ref } from 'vue-demi';
|
|
2
|
+
|
|
3
|
+
export declare function useSearchLogic(query: Ref<string>, searchTypeList: Ref<string[]>): {
|
|
4
|
+
searchResults: Ref<{
|
|
5
|
+
[x: string]: any;
|
|
6
|
+
id?: string | number | undefined;
|
|
7
|
+
type: string;
|
|
8
|
+
display?: string | undefined;
|
|
9
|
+
displayEn?: string | undefined;
|
|
10
|
+
displayCn?: string | undefined;
|
|
11
|
+
name?: string | undefined;
|
|
12
|
+
nameEn?: string | undefined;
|
|
13
|
+
nameCn?: string | undefined;
|
|
14
|
+
}[]>;
|
|
15
|
+
loading: Ref<boolean>;
|
|
16
|
+
isFetchingMore: Ref<boolean>;
|
|
17
|
+
isFinished: Ref<boolean>;
|
|
18
|
+
fetchData: (append?: boolean) => Promise<void>;
|
|
19
|
+
};
|