1
0
Fork 0

更新 README.md

panliang 2023-09-25 16:53:47 +08:00
parent eb34f5270c
commit c03b273813
1 changed files with 24 additions and 0 deletions

View File

@ -8,6 +8,8 @@
### resources\admin-views\src\pages\amis\index.tsx ### resources\admin-views\src\pages\amis\index.tsx
自定义登录页面, 删除高度 `20px``div`
```tsx ```tsx
return ( return (
<> <>
@ -25,6 +27,8 @@ return (
### resources\admin-views\src\components\AmisRender\CustomComponents\components\WangEditor\index.tsx ### resources\admin-views\src\components\AmisRender\CustomComponents\components\WangEditor\index.tsx
WangEditor 编辑器上传图片时, 把登录授权的 `token` 带上
```tsx ```tsx
// 编辑器配置 // 编辑器配置
const editorConfig: Partial<IEditorConfig> = { const editorConfig: Partial<IEditorConfig> = {
@ -49,3 +53,23 @@ 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])
```