input 都增加清空按钮

This commit is contained in:
禺狨 2023-04-25 10:15:07 +08:00
parent 391af1a488
commit 86a16c9722
21 changed files with 99 additions and 18 deletions

View File

@ -54,6 +54,7 @@ export const CreateResourceCategory = (props: PropInterface) => {
onChange={(e) => {
setName(e.target.value);
}}
allowClear
/>
</Modal>
</>

View File

@ -45,14 +45,14 @@ const ChangePasswordPage = () => {
name="old_password"
rules={[{ required: true, message: "请输入原密码!" }]}
>
<Input.Password placeholder="请输入原密码" />
<Input.Password placeholder="请输入原密码" allowClear />
</Form.Item>
<Form.Item
label="新密码"
name="new_password"
rules={[{ required: true, message: "请输入新密码!" }]}
>
<Input.Password placeholder="请输入新密码" />
<Input.Password placeholder="请输入新密码" allowClear />
</Form.Item>
<Form.Item wrapperCol={{ offset: 8, span: 16 }}>
<Button type="primary" htmlType="submit">

View File

@ -470,6 +470,7 @@ export const CourseCreate: React.FC<PropInterface> = ({
<Input
style={{ width: 424 }}
placeholder="请在此处输入课程名称"
allowClear
/>
</Form.Item>
<Form.Item
@ -683,6 +684,7 @@ export const CourseCreate: React.FC<PropInterface> = ({
onChange={(e) => {
setChapterName(index, e.target.value);
}}
allowClear
placeholder="请在此处输入章节名称"
/>
<Button

View File

@ -451,6 +451,7 @@ export const CourseHourUpdate: React.FC<PropInterface> = ({
saveChapterName(index, e.target.value);
}}
placeholder="请在此处输入章节名称"
allowClear
/>
<Button
className="mr-16"

View File

@ -224,6 +224,7 @@ export const CourseUpdate: React.FC<PropInterface> = ({
rules={[{ required: true, message: "请在此处输入课程名称!" }]}
>
<Input
allowClear
style={{ width: 424 }}
placeholder="请在此处输入课程名称"
/>

View File

@ -376,6 +376,7 @@ const CoursePage = () => {
onChange={(e) => {
setTitle(e.target.value);
}}
allowClear
style={{ width: 160 }}
placeholder="请输入名称关键字"
/>

View File

@ -206,6 +206,7 @@ const CourseUserPage = () => {
onChange={(e) => {
setName(e.target.value);
}}
allowClear
style={{ width: 160 }}
placeholder="请输入姓名关键字"
/>
@ -217,6 +218,7 @@ const CourseUserPage = () => {
onChange={(e) => {
setEmail(e.target.value);
}}
allowClear
style={{ width: 160 }}
placeholder="请输入学员邮箱"
/>

View File

@ -147,7 +147,11 @@ export const DepartmentCreate: React.FC<PropInterface> = ({
name="name"
rules={[{ required: true, message: "请输入部门名称!" }]}
>
<Input style={{ width: 200 }} placeholder="请输入部门名称" />
<Input
style={{ width: 200 }}
allowClear
placeholder="请输入部门名称"
/>
</Form.Item>
</Form>
</div>

View File

@ -129,6 +129,7 @@ const LoginPage = () => {
style={{ width: 400, height: 54 }}
placeholder="请输入管理员邮箱账号"
onKeyUp={(e) => keyUp(e)}
allowClear
/>
</div>
<div className="login-box d-flex mt-50">
@ -137,6 +138,7 @@ const LoginPage = () => {
onChange={(e) => {
setPassword(e.target.value);
}}
allowClear
style={{ width: 400, height: 54 }}
placeholder="请输入密码"
/>
@ -149,6 +151,7 @@ const LoginPage = () => {
onChange={(e) => {
setCaptchaVal(e.target.value);
}}
allowClear
onKeyUp={(e) => keyUp(e)}
/>
<div className={styles["captcha-box"]}>

View File

@ -154,7 +154,11 @@ export const MemberCreate: React.FC<PropInterface> = ({ open, onCancel }) => {
name="email"
rules={[{ required: true, message: "请输入登录邮箱!" }]}
>
<Input style={{ width: 274 }} placeholder="请输入学员登录邮箱" />
<Input
allowClear
style={{ width: 274 }}
placeholder="请输入学员登录邮箱"
/>
</Form.Item>
<Form.Item
label="登录密码"
@ -162,6 +166,7 @@ export const MemberCreate: React.FC<PropInterface> = ({ open, onCancel }) => {
rules={[{ required: true, message: "请输入登录密码!" }]}
>
<Input.Password
allowClear
style={{ width: 274 }}
placeholder="请输入登录密码"
/>
@ -182,7 +187,11 @@ export const MemberCreate: React.FC<PropInterface> = ({ open, onCancel }) => {
/>
</Form.Item>
<Form.Item label="身份证号" name="idCard">
<Input style={{ width: 274 }} placeholder="请填写学员身份证号" />
<Input
style={{ width: 274 }}
allowClear
placeholder="请填写学员身份证号"
/>
</Form.Item>
</Form>
</div>

View File

@ -181,18 +181,27 @@ export const MemberUpdate: React.FC<PropInterface> = ({
name="name"
rules={[{ required: true, message: "请输入学员姓名!" }]}
>
<Input style={{ width: 274 }} placeholder="请填写学员姓名" />
<Input
allowClear
style={{ width: 274 }}
placeholder="请填写学员姓名"
/>
</Form.Item>
<Form.Item
label="登录邮箱"
name="email"
rules={[{ required: true, message: "请输入登录邮箱!" }]}
>
<Input style={{ width: 274 }} placeholder="请输入学员登录邮箱" />
<Input
style={{ width: 274 }}
allowClear
placeholder="请输入学员登录邮箱"
/>
</Form.Item>
<Form.Item label="登录密码" name="password">
<Input.Password
style={{ width: 274 }}
allowClear
placeholder="请输入登录密码"
/>
</Form.Item>
@ -212,7 +221,11 @@ export const MemberUpdate: React.FC<PropInterface> = ({
/>
</Form.Item>
<Form.Item label="身份证号" name="idCard">
<Input style={{ width: 274 }} placeholder="请填写学员身份证号" />
<Input
allowClear
style={{ width: 274 }}
placeholder="请填写学员身份证号"
/>
</Form.Item>
</Form>
</div>

View File

@ -223,6 +223,7 @@ const MemberDepartmentProgressPage = () => {
onChange={(e) => {
setName(e.target.value);
}}
allowClear
style={{ width: 160 }}
placeholder="请输入姓名关键字"
/>
@ -234,6 +235,7 @@ const MemberDepartmentProgressPage = () => {
onChange={(e) => {
setEmail(e.target.value);
}}
allowClear
style={{ width: 160 }}
placeholder="请输入邮箱"
/>

View File

@ -320,6 +320,7 @@ const MemberPage = () => {
}}
style={{ width: 160 }}
placeholder="请输入姓名关键字"
allowClear
/>
</div>
<div className="d-flex mr-24">
@ -331,6 +332,7 @@ const MemberPage = () => {
}}
style={{ width: 160 }}
placeholder="请输入邮箱账号"
allowClear
/>
</div>
<div className="d-flex">

View File

@ -147,7 +147,11 @@ export const ResourceCategoryCreate: React.FC<PropInterface> = ({
name="name"
rules={[{ required: true, message: "请输入分类名称!" }]}
>
<Input style={{ width: 200 }} placeholder="请输入分类名称" />
<Input
style={{ width: 200 }}
allowClear
placeholder="请输入分类名称"
/>
</Form.Item>
</Form>
</div>

View File

@ -169,7 +169,11 @@ export const ResourceCategoryUpdate: React.FC<PropInterface> = ({
name="name"
rules={[{ required: true, message: "请输入分类名称!" }]}
>
<Input style={{ width: 200 }} placeholder="请输入分类名称" />
<Input
style={{ width: 200 }}
allowClear
placeholder="请输入分类名称"
/>
</Form.Item>
</Form>
</div>

View File

@ -125,14 +125,22 @@ export const SystemAdministratorCreate: React.FC<PropInterface> = ({
name="name"
rules={[{ required: true, message: "请输入管理员姓名!" }]}
>
<Input style={{ width: 200 }} placeholder="请输入管理员姓名" />
<Input
allowClear
style={{ width: 200 }}
placeholder="请输入管理员姓名"
/>
</Form.Item>
<Form.Item
label="邮箱"
name="email"
rules={[{ required: true, message: "请输入学员邮箱!" }]}
>
<Input style={{ width: 200 }} placeholder="请输入学员邮箱" />
<Input
allowClear
style={{ width: 200 }}
placeholder="请输入学员邮箱"
/>
</Form.Item>
<Form.Item
label="密码"
@ -140,6 +148,7 @@ export const SystemAdministratorCreate: React.FC<PropInterface> = ({
rules={[{ required: true, message: "请输入登录密码!" }]}
>
<Input.Password
allowClear
style={{ width: 200 }}
placeholder="请输入登录密码"
/>

View File

@ -133,18 +133,27 @@ export const SystemAdministratorUpdate: React.FC<PropInterface> = ({
name="name"
rules={[{ required: true, message: "请输入管理员姓名!" }]}
>
<Input style={{ width: 200 }} placeholder="请输入管理员姓名" />
<Input
allowClear
style={{ width: 200 }}
placeholder="请输入管理员姓名"
/>
</Form.Item>
<Form.Item
label="邮箱"
name="email"
rules={[{ required: true, message: "请输入学员邮箱!" }]}
>
<Input style={{ width: 200 }} placeholder="请输入学员邮箱" />
<Input
allowClear
style={{ width: 200 }}
placeholder="请输入学员邮箱"
/>
</Form.Item>
<Form.Item label="密码" name="password">
<Input.Password
style={{ width: 200 }}
allowClear
placeholder="请输入登录密码"
/>
</Form.Item>

View File

@ -283,6 +283,7 @@ const SystemAdministratorPage = () => {
onChange={(e) => {
setName(e.target.value);
}}
allowClear
style={{ width: 160 }}
placeholder="请输入管理员姓名"
/>

View File

@ -180,6 +180,7 @@ export const SystemAdminrolesCreate: React.FC<PropInterface> = ({
<Input
style={{ width: 424 }}
placeholder="请在此处输入角色名称"
allowClear
/>
</Form.Item>
<Form.Item label="操作权限" name="action_ids">

View File

@ -191,7 +191,11 @@ export const SystemAdminrolesUpdate: React.FC<PropInterface> = ({
name="name"
rules={[{ required: true, message: "请输入角色名!" }]}
>
<Input style={{ width: 424 }} placeholder="请输入角色名" />
<Input
style={{ width: 424 }}
allowClear
placeholder="请输入角色名"
/>
</Form.Item>
<Form.Item label="操作权限" name="action_ids">
<TreeSelect

View File

@ -251,7 +251,11 @@ const SystemConfigPage = () => {
label="网站页脚"
name="system.pc_index_footer_msg"
>
<Input style={{ width: 274 }} placeholder="请填写网站页脚" />
<Input
style={{ width: 274 }}
allowClear
placeholder="请填写网站页脚"
/>
</Form.Item>
{/* <Form.Item
style={{ marginBottom: 30 }}
@ -315,7 +319,11 @@ const SystemConfigPage = () => {
<Form.Item style={{ marginBottom: 30 }} label="跑马灯内容">
<Space align="baseline" style={{ height: 32 }}>
<Form.Item name="player.bullet_secret_text">
<Input style={{ width: 274 }} placeholder="自定义跑马灯内容" />
<Input
style={{ width: 274 }}
allowClear
placeholder="自定义跑马灯内容"
/>
</Form.Item>
<Checkbox
checked={nameChecked}
@ -345,7 +353,7 @@ const SystemConfigPage = () => {
label="跑马灯文字颜色"
name="player.bullet_secret_color"
>
<Input type="color" style={{ width: 32, padding: 0 }} />
<Input type="color" allowClear style={{ width: 32, padding: 0 }} />
</Form.Item>
<Form.Item
style={{ marginBottom: 30 }}