文档介绍:AntDesignPro开发手册
AntDesignPro开发手册
AntDesignPro开发手册
AntDesignPro开发手
册
修订历史记录
新建一个菜单
菜单配置文件src/common/,在menuData里增添菜单配置,数据格式为json
格式,详尽配置请参照下列图
新建一个路由配置
路由配置文件src/common/,在routerConfig里增添路由配置,数据格式为json
格式,详尽配置请参照下列图
新建一个路由页面
页面元素文件src/routes/HostOperation/
import
React,{PureComponent,Fragment}
from
'react'
;
import
{connect}
from
'dva'
;
import
{Row,Col,Card,Form,Input,Select,Icon,Button,Dropdown,Menu,
InputNumber,
DatePicker,
Modal,message,
Badge,
Divider,
Steps,
Radio}
from'antd';
import
StandardTable
from'../../components/StandardTable'
;
import
PageHeaderLayout
from
'../../layouts/PageHeaderLayout'
;
import
styles
from
'./'
;
const
FormItem
=;
const
getValue
=obj
=>
Object
.keys(obj).
map(key=>obj[key]).
join(','
);
和'hostMonitor'成立连结,进行页面的数据交互
AntDesignPro开发手册
AntDesignPro开发手册
AntDesignPro开发手册
***@connect(({hostMonitor,loading})=>({
hostMonitor,
loading:['hostMonitor/getMonitorList']
}))
AntDesignPro开发手册
AntDesignPro开发手册
AntDesignPro开发手册
创立form对象,固定写法
AntDesignPro开发手册
AntDesignPro开发手册
AntDesignPro开发手册
***@( )
exportdefaultclassHostMonitorextendsPureComponent{
state={
modalVisible:false,
updateModalVisible:false,
expandForm:false,
AntDesignPro开发手册
AntDesignPro开发手册
AntDesignPro开发手册
selectedRows:[],
formValues:{},
stepFormValues:{},
};
衬着页面达成后履行
AntDesignPro开发手册
AntDesignPro开发手册
AntDesignPro开发手册
componentDidMount( ){
const{dispatch}=;
dispatch({
type:'hostMonitor/getMonitorList',
});
}
AntDesignPro开发手册
AntDesignPro开发手册
AntDesignPro开发手册
表格表头定义
columns
=[
{
title:
'
触发器'
,
dataIndex:
'description'
,
},
{
tit