更新 README.md
parent
1651656ab2
commit
b186450587
20
README.md
20
README.md
|
|
@ -79,23 +79,3 @@ const editorConfig: Partial<IEditorConfig> = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### resources\admin-views\src\pages\login\form.tsx
|
|
||||||
|
|
||||||
自定义登录页面, 重复请求接口 `admin-api/captcha` 获取图形验证码
|
|
||||||
|
|
||||||
```tsx
|
|
||||||
// 读取 localStorage, 设置初始值
|
|
||||||
useEffect(() => {
|
|
||||||
const rememberPassword = !!loginParams
|
|
||||||
setRememberPassword(rememberPassword)
|
|
||||||
if (formRef.current && rememberPassword) {
|
|
||||||
const parseParams = JSON.parse(decodeURIComponent(window.atob(loginParams)))
|
|
||||||
formRef.current.setFieldsValue(parseParams)
|
|
||||||
}
|
|
||||||
|
|
||||||
// if (appSettings.login_captcha) {
|
|
||||||
// getCaptcha.run()
|
|
||||||
// }
|
|
||||||
}, [loginParams])
|
|
||||||
```
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue