message-verify 1.0.1-beta.34 → 1.0.1-beta.35
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/main.js +2 -0
- package/dist/utils/type.d.ts +1 -0
- package/dist/verify-modal.js +2 -2
- package/package.json +1 -1
- package/src/main.tsx +2 -0
- package/src/utils/type.ts +1 -0
- package/src/verify-modal.tsx +2 -2
package/dist/main.js
CHANGED
@@ -44,6 +44,8 @@ createRoot(document.getElementById('root')).render(_jsxs(_Fragment, { children:
|
|
44
44
|
apiReject: () => {
|
45
45
|
},
|
46
46
|
apiResolve: () => {
|
47
|
+
},
|
48
|
+
apiPromiseToEmpty: () => {
|
47
49
|
}
|
48
50
|
}), children: "Show verify Modal" }), _jsx("button", { onClick: () => createReLoginModal({
|
49
51
|
goLogin: () => {
|
package/dist/utils/type.d.ts
CHANGED
package/dist/verify-modal.js
CHANGED
@@ -11,7 +11,7 @@ const CreateMessageVerifyModal = ({ props }) => {
|
|
11
11
|
const [captchaImage, setCaptchaImage] = useState('');
|
12
12
|
const [captchCode, setCaptchCode] = useState('');
|
13
13
|
const [captchaKey, setCaptchaKey] = useState('');
|
14
|
-
const { data, http, lang, api = '/admin/sms/send', config, apiResolve,
|
14
|
+
const { data, http, lang, api = '/admin/sms/send', config, apiResolve, apiPromiseToEmpty } = props || {};
|
15
15
|
const dataObj = JSON.parse(data || '{}');
|
16
16
|
const { mobile, verifyCodeKey } = dataObj || {};
|
17
17
|
const getKey = async () => {
|
@@ -64,7 +64,7 @@ const CreateMessageVerifyModal = ({ props }) => {
|
|
64
64
|
};
|
65
65
|
return (_jsxs(Modal, { width: 420, visible: visible, onClose: () => {
|
66
66
|
setVisible(false);
|
67
|
-
|
67
|
+
apiPromiseToEmpty();
|
68
68
|
props.onClose?.();
|
69
69
|
}, children: [_jsx("div", { style: { fontSize: 14, color: '#666' }, children: t('alreadySend', lang, { phone: mobile }) }), _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 8, marginTop: 12 }, children: [_jsx(Input.OTP, { length: 6, value: otp, onChange: async (val) => {
|
70
70
|
setOtp(val);
|
package/package.json
CHANGED
package/src/main.tsx
CHANGED
package/src/utils/type.ts
CHANGED
package/src/verify-modal.tsx
CHANGED
@@ -12,7 +12,7 @@ const CreateMessageVerifyModal = ({ props }: { props: ModalConfig }) => {
|
|
12
12
|
const [captchaImage, setCaptchaImage] = useState<string>('');
|
13
13
|
const [captchCode, setCaptchCode] = useState<string>('');
|
14
14
|
const [captchaKey, setCaptchaKey] = useState<string>('');
|
15
|
-
const { data, http, lang, api = '/admin/sms/send', config, apiResolve,
|
15
|
+
const { data, http, lang, api = '/admin/sms/send', config, apiResolve, apiPromiseToEmpty } = props || {};
|
16
16
|
const dataObj = JSON.parse(data || '{}');
|
17
17
|
const { mobile, verifyCodeKey } = dataObj || {};
|
18
18
|
|
@@ -72,7 +72,7 @@ const CreateMessageVerifyModal = ({ props }: { props: ModalConfig }) => {
|
|
72
72
|
visible={visible}
|
73
73
|
onClose={() => {
|
74
74
|
setVisible(false);
|
75
|
-
|
75
|
+
apiPromiseToEmpty();
|
76
76
|
props.onClose?.();
|
77
77
|
}}
|
78
78
|
>
|