mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-17 09:34:31 +08:00
增加 demo 环境变量
This commit is contained in:
@@ -18,6 +18,7 @@ import { SharedContext } from '@/layouts';
|
||||
|
||||
const FormItem = Form.Item;
|
||||
const { Countdown } = Statistic;
|
||||
const isDemoEnv = window.__ENV__DeployEnv === 'demo';
|
||||
|
||||
const Login = () => {
|
||||
const { reloadUser } = useOutletContext<SharedContext>();
|
||||
@@ -169,10 +170,16 @@ const Login = () => {
|
||||
) : (
|
||||
<Form layout="vertical" onFinish={handleOk}>
|
||||
<FormItem name="username" label="用户名" hasFeedback>
|
||||
<Input placeholder="用户名" autoFocus />
|
||||
<Input
|
||||
placeholder={`用户名${isDemoEnv ? ': admin' : ''}`}
|
||||
autoFocus
|
||||
/>
|
||||
</FormItem>
|
||||
<FormItem name="password" label="密码" hasFeedback>
|
||||
<Input type="password" placeholder="密码" />
|
||||
<Input
|
||||
type="password"
|
||||
placeholder={`密码${isDemoEnv ? ': 123' : ''}`}
|
||||
/>
|
||||
</FormItem>
|
||||
<Row>
|
||||
{waitTime ? (
|
||||
|
||||
Reference in New Issue
Block a user