Commit da523ddd authored by XieZhiXiong's avatar XieZhiXiong

feat: 添加无注册资料展示

parent cad03605
......@@ -2,12 +2,12 @@
* @Author: XieZhiXiong
* @Date: 2021-06-04 15:37:19
* @LastEditors: XieZhiXiong
* @LastEditTime: 2021-11-17 18:23:20
* @LastEditTime: 2021-11-25 10:11:25
* @Description: 修改会员注册信息
*/
import React, { useState, useEffect } from 'react';
import { history, Prompt } from 'umi';
import { Button, Card, Spin, message } from 'antd';
import { Button, Card, Spin, Empty, message } from 'antd';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
import { SaveOutlined } from '@ant-design/icons';
import { createFormActions, FormEffectHooks, FormPath } from '@formily/antd';
......@@ -88,35 +88,41 @@ const MemberUpdate: React.FC<any> = props => {
backIcon={<ReutrnEle description="返回" />}
title="编辑会员"
extra={[
<Button
key="1"
type="primary"
icon={<SaveOutlined />}
loading={submitLoading}
onClick={() => formActions.submit()}
>
保存
</Button>,
memberItems.length ? (
<Button
key="1"
type="primary"
icon={<SaveOutlined />}
loading={submitLoading}
onClick={() => formActions.submit()}
>
保存
</Button>
) : null,
]}
>
<Card>
<NiceForm
onSubmit={handleSubmit}
actions={formActions}
components={{
RadioGroup: Radio.Group,
CheckboxGroup: Checkbox.Group,
AreaSelect,
}}
effects={() => {
onFormInputChange$().subscribe(() => {
if (!unsaved) {
setUnsaved(true);
}
});
}}
schema={schema(memberItems, true)}
/>
{memberItems.length ? (
<NiceForm
onSubmit={handleSubmit}
actions={formActions}
components={{
RadioGroup: Radio.Group,
CheckboxGroup: Checkbox.Group,
AreaSelect,
}}
effects={() => {
onFormInputChange$().subscribe(() => {
if (!unsaved) {
setUnsaved(true);
}
});
}}
schema={schema(memberItems, true)}
/>
) : (
<Empty description='当前无可修改的资料' />
)}
</Card>
</PageHeaderWrapper>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment