Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
F
formbase
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
formexample_react
formbase
提交
c47db25c
提交
c47db25c
编写于
7月 16, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
SYSTEM 发布系统代码
上级
fceb3c4d
变更
6
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
492 行增加
和
1 行删除
+492
-1
App.tsx
app_Default/src/App.tsx
+9
-1
main.tsx
app_Default/src/forms/entity/main/main.tsx
+29
-0
main6.less
app_Default/src/forms/example/main6/main6.less
+55
-0
main6.tsx
app_Default/src/forms/example/main6/main6.tsx
+348
-0
example-main6-edit-view.less
...mple/example-main6-edit-view/example-main6-edit-view.less
+1
-0
example-main6-edit-view.tsx
...pmple/example-main6-edit-view/example-main6-edit-view.tsx
+50
-0
未找到文件。
app_Default/src/App.tsx
浏览文件 @
c47db25c
...
...
@@ -11,6 +11,7 @@ import ExampleMain4EditView from './pages/exapmple/example-main4-edit-view/examp
import
ExampleDLFEditView
from
'./pages/exapmple/example-dlfedit-view/example-dlfedit-view'
;
import
Entity2EditView
from
'./pages/module2/entity2-edit-view/entity2-edit-view'
;
import
ExampleMain2EditView
from
'./pages/exapmple/example-main2-edit-view/example-main2-edit-view'
;
import
ExampleMain6EditView
from
'./pages/exapmple/example-main6-edit-view/example-main6-edit-view'
;
import
'./App.less'
;
import
{
Layout
,
Menu
,
Breadcrumb
,
Icon
}
from
'antd'
;
const
{
Header
,
Content
,
Footer
,
Sider
}
=
Layout
;
...
...
@@ -83,6 +84,9 @@ export default class App extends PureComponent {
if
(
Object
.
is
(
this
.
currentPage
,
"ExampleMain2EditView"
))
{
return
<
ExampleMain2EditView
/>;
}
if
(
Object
.
is
(
this
.
currentPage
,
"ExampleMain6EditView"
))
{
return
<
ExampleMain6EditView
/>;
}
}
/**
...
...
@@ -107,7 +111,7 @@ export default class App extends PureComponent {
<
Layout
id=
"components-layout-demo-custom-trigger"
>
<
Sider
trigger=
{
null
}
collapsible
style=
{
{
minHeight
:
'100vh'
}
}
>
<
div
className=
"logo"
><
img
src=
"assets/images/logo.png"
/></
div
>
<
Menu
theme=
"dark"
mode=
"inline"
defaultSelectedKeys=
{
[
'"EntityEditView""ExampleEditorType""ExampleEditView""Entity3EditView""ExampleMain3EditView""ExampleMain5EditView""Entity4EditView""Entity5EditView""ExampleMain4EditView""ExampleDLFEditView""Entity2EditView""ExampleMain2EditView"'
]
}
onClick=
{
({
item
,
key
,
keyPath
,
domEvent
})
=>
{
this
.
handleMenuClick
(
item
,
key
,
keyPath
,
domEvent
)
}
}
>
<
Menu
theme=
"dark"
mode=
"inline"
defaultSelectedKeys=
{
[
'"EntityEditView""ExampleEditorType""ExampleEditView""Entity3EditView""ExampleMain3EditView""ExampleMain5EditView""Entity4EditView""Entity5EditView""ExampleMain4EditView""ExampleDLFEditView""Entity2EditView""ExampleMain2EditView"
"ExampleMain6EditView"
'
]
}
onClick=
{
({
item
,
key
,
keyPath
,
domEvent
})
=>
{
this
.
handleMenuClick
(
item
,
key
,
keyPath
,
domEvent
)
}
}
>
<
Menu
.
Item
key=
"EntityEditView"
>
<
Icon
type=
"user"
/>
<
span
>
实体编辑视图
</
span
>
...
...
@@ -156,6 +160,10 @@ export default class App extends PureComponent {
<
Icon
type=
"upload"
/>
<
span
>
表单2
</
span
>
</
Menu
.
Item
>
<
Menu
.
Item
key=
"ExampleMain6EditView"
>
<
Icon
type=
"user"
/>
<
span
>
表单6
</
span
>
</
Menu
.
Item
>
</
Menu
>
</
Sider
>
<
Layout
>
...
...
app_Default/src/forms/entity/main/main.tsx
浏览文件 @
c47db25c
...
...
@@ -34,6 +34,13 @@ export class MainFormData {
* @memberof MainFormData
*/
entityname
?:
any
;
/**
*
*
* @type {*}
* @memberof MainFormData
*/
formitem
?:
any
;
/**
* 建立人
*
...
...
@@ -201,6 +208,11 @@ export default class Main extends PureComponent<MainProps> {
{
required
:
false
,
type
:
'string'
,
message
:
'实体名称 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'实体名称 值不能为空'
,
trigger
:
'blur'
},
],
formitem
:
[
{
type
:
'string'
,
message
:
' 值必须为字符串类型'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
' 值不能为空'
,
trigger
:
'blur'
},
],
createman
:
[
{
type
:
'string'
,
message
:
'建立人 值必须为字符串类型'
,
trigger
:
'change'
},
{
required
:
false
,
type
:
'string'
,
message
:
'建立人 值不能为空'
,
trigger
:
'change'
},
...
...
@@ -260,6 +272,8 @@ export default class Main extends PureComponent<MainProps> {
srfsourcekey
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'srfsourcekey'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
error
:
""
,
isEmptyCaption
:
"false"
,
validateStatus
:
""
,
required
:
false
,
enableCond
:
3
})
,
entityname
:
new
FormItemModel
({
caption
:
'实体名称'
,
detailType
:
'FORMITEM'
,
name
:
'entityname'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
error
:
""
,
isEmptyCaption
:
"false"
,
validateStatus
:
""
,
required
:
false
,
enableCond
:
3
})
,
formitem
:
new
FormItemModel
({
caption
:
''
,
detailType
:
'FORMITEM'
,
name
:
'formitem'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
error
:
""
,
isEmptyCaption
:
"false"
,
validateStatus
:
""
,
required
:
false
,
enableCond
:
3
})
,
createman
:
new
FormItemModel
({
caption
:
'建立人'
,
detailType
:
'FORMITEM'
,
name
:
'createman'
,
visible
:
true
,
isShowCaption
:
true
,
form
:
this
,
disabled
:
false
,
error
:
""
,
isEmptyCaption
:
"false"
,
validateStatus
:
""
,
required
:
false
,
enableCond
:
3
})
,
...
...
@@ -310,6 +324,7 @@ export default class Main extends PureComponent<MainProps> {
}
...
...
@@ -439,6 +454,20 @@ export default class Main extends PureComponent<MainProps> {
</
div
>
</
div
>
</
Col
>:
""
}
{
this
.
detailsModel
.
formitem
.
visible
?<
Col
style=
{
{}
}
lg=
{
{
span
:
24
,
offset
:
0
}
}
>
<
div
className=
{
`app-form-item app-form-item-left`
}
>
{
this
.
detailsModel
.
formitem
.
isShowCaption
&&
!
this
.
detailsModel
.
formitem
.
isEmptyCaption
?
<
div
className=
"app-form-item-label"
style=
{
{
width
:
'130px'
}
}
>
{
this
.
detailsModel
.
formitem
.
required
?
<
span
className=
"isrequired"
>
*
</
span
>
:
""
}
</
div
>
:
""
}
<
div
className=
"app-form-item-container"
style=
{
{
width
:
"calc(100% - 130px)"
}
}
>
<
Form
.
Item
key=
{
'formitem'
}
validateStatus=
{
this
.
detailsModel
.
formitem
.
validateStatus
}
help=
{
this
.
detailsModel
.
formitem
.
error
}
>
<
Input
id=
{
'formitem'
}
type=
{
'password'
}
disabled=
{
this
.
detailsModel
.
formitem
.
disabled
}
value=
{
this
.
data
.
formitem
}
onChange=
{
(
$event
)
=>
{
this
.
formItemChange
(
'formitem'
,
$event
.
target
.
value
)}
}
/>
</
Form
.
Item
>
</
div
>
</
div
>
</
Col
>:
""
}
</
Row
>
...
...
app_Default/src/forms/example/main6/main6.less
0 → 100644
浏览文件 @
c47db25c
// this is less
.app-form-item {
display: flex;
justify-content: space-between;
padding-right: 16px;
margin-bottom: 6px;
.app-form-item-label {
text-align: right;
height: 32px;
line-height: 32px;
padding-right: 16px;
.isrequired {
display: inline-block;
margin-right: 4px;
font-family: SimSun;
line-height: 1;
font-size: 14px;
color: #f5222d;
}
}
.app-form-item-container {
.ant-form-item {
width: 100%;
.ant-form-item-control-wrapper {
width: 100%;
height: auto;
min-height: 59px;
}
}
}
}
.app-form-item-left {
flex-direction: row;
}
.app-form-item-right {
flex-direction: row-reverse;
}
.app-form-item-top {
flex-direction: column;
}
.app-form-item-bottom {
flex-direction: column-reverse;
}
.ant-form-inline .ant-form-item-with-help {
margin-bottom: 0px !important;
}
app_Default/src/forms/example/main6/main6.tsx
0 → 100644
浏览文件 @
c47db25c
此差异已折叠。
点击以展开。
app_Default/src/pages/exapmple/example-main6-edit-view/example-main6-edit-view.less
0 → 100644
浏览文件 @
c47db25c
// this is less
app_Default/src/pages/exapmple/example-main6-edit-view/example-main6-edit-view.tsx
0 → 100644
浏览文件 @
c47db25c
import
React
,
{
PureComponent
}
from
'react'
;
import
'./example-main6-edit-view.less'
;
import
Main6form
from
'../../../forms/example/main6/main6'
;
/**
* ExampleMain6EditView
*
* @export
* @class ExampleMain6EditView
* @extends {PureComponent}
*/
export
default
class
ExampleMain6EditView
extends
PureComponent
{
public
formData
=
{
"bookname"
:
"test1"
,
"input"
:
"文本test"
,
"label"
:
"标签test"
,
"group1"
:
"书籍基本信息test"
,
"formpage1"
:
"基本信息test"
,
"createman"
:
"建立人test"
,
"createdate"
:
"建立时间test"
,
"updateman"
:
"更新人test"
,
"updatedate"
:
"更新时间test"
,
"group2"
:
"操作信息test"
,
"formpage2"
:
"其它test"
}
/**
* 绘制内容
*
* @returns
* @memberof ExampleMain6EditView
*/
public
render
()
{
return
<>
<
div
>
<
Main6form
data=
{
{}
}
formItemChange=
{
(
value
:
any
)
=>
{
this
.
formItemChange
(
value
)}
}
></
Main6form
>
</
div
>
</>;
}
/**
* 表单项变化
* @param value
*/
public
formItemChange
(
value
:
any
){
console
.
log
(
value
);
}
}
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录