Commit da523ddd authored by XieZhiXiong's avatar XieZhiXiong

feat: 添加无注册资料展示

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