11import React , { PureComponent } from 'react' ;
2- import { Modal , Form , Input } from 'antd' ;
2+ import { Modal , Form , Input , Row , Col , Tooltip , Icon } from 'antd' ;
33
44@Form . create ( )
55class AddDialog extends PureComponent {
@@ -38,8 +38,8 @@ class AddDialog extends PureComponent {
3838
3939 return (
4040 < Modal
41- title = "资源模板 "
42- width = { 400 }
41+ title = "菜单资源模板 "
42+ width = { 450 }
4343 visible = { visible }
4444 maskClosable = { false }
4545 destroyOnClose
@@ -50,24 +50,42 @@ class AddDialog extends PureComponent {
5050 >
5151 < Form >
5252 < Form . Item { ...formItemLayout } label = "资源名" >
53- { getFieldDecorator ( 'name' , {
54- rules : [
55- {
56- required : true ,
57- message : '请输入资源名' ,
58- } ,
59- ] ,
60- } ) ( < Input placeholder = "请输入资源名" /> ) }
53+ < Row >
54+ < Col span = { 20 } >
55+ { getFieldDecorator ( 'name' , {
56+ rules : [
57+ {
58+ required : true ,
59+ message : '请输入资源名' ,
60+ } ,
61+ ] ,
62+ } ) ( < Input placeholder = "请输入资源名" /> ) }
63+ </ Col >
64+ < Col span = { 4 } style = { { textAlign : 'center' } } >
65+ < Tooltip title = "例:用户数据" >
66+ < Icon type = "question-circle" />
67+ </ Tooltip >
68+ </ Col >
69+ </ Row >
6170 </ Form . Item >
6271 < Form . Item { ...formItemLayout } label = "资源路由" >
63- { getFieldDecorator ( 'router' , {
64- rules : [
65- {
66- required : true ,
67- message : '请输入资源路由' ,
68- } ,
69- ] ,
70- } ) ( < Input placeholder = "请输入资源路由" /> ) }
72+ < Row >
73+ < Col span = { 20 } >
74+ { getFieldDecorator ( 'router' , {
75+ rules : [
76+ {
77+ required : true ,
78+ message : '请输入资源路由' ,
79+ } ,
80+ ] ,
81+ } ) ( < Input placeholder = "请输入资源路由" /> ) }
82+ </ Col >
83+ < Col span = { 4 } style = { { textAlign : 'center' } } >
84+ < Tooltip title = "例:/api/v1/users" >
85+ < Icon type = "question-circle" />
86+ </ Tooltip >
87+ </ Col >
88+ </ Row >
7189 </ Form . Item >
7290 </ Form >
7391 </ Modal >
0 commit comments