Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
17cc2724
提交
17cc2724
编写于
12月 22, 2021
作者:
Shine-zwj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新表单UI
上级
b8979205
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
72 行增加
和
30 行删除
+72
-30
CodegenConfig.java
...-core/src/main/java/cn/ibizlab/codegen/CodegenConfig.java
+1
-1
form-group.hbs
.../main/resources/templ/r7/@macro/components/form-group.hbs
+18
-8
form-item.hbs
...c/main/resources/templ/r7/@macro/components/form-item.hbs
+16
-6
form-page.hbs
...c/main/resources/templ/r7/@macro/components/form-page.hbs
+15
-7
{{ctrls@FORM}}-form.vue.hbs
...{appEntities}}/{{ctrls}}-form/{{ctrls@FORM}}-form.vue.hbs
+22
-8
未找到文件。
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/CodegenConfig.java
浏览文件 @
17cc2724
...
...
@@ -139,7 +139,7 @@ public class CodegenConfig {
}
else
{
String
path
=
file
.
getPath
().
replace
(
"\\"
,
"/"
);
templateDefinitions
.
add
(
new
TemplateDefinition
(
Paths
.
get
(
"/"
,
path
.
replace
(
this
.
getTemplateDir
(),
""
)
).
toString
()));
templateDefinitions
.
add
(
new
TemplateDefinition
(
path
.
replace
(
this
.
getTemplateDir
(),
""
).
toString
()));
}
}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/components/form-group.hbs
浏览文件 @
17cc2724
这里是表单分组子模板 输出
{{
item
.
codeName
}}
-
{{
item
.
caption
}}
{{#
each
item
.
psDEFormDetails
as
|
detail
|
}}
加载表单分组
{{
item
.
codeName
}}
-
{{
item
.
caption
}}
的 第
{{
@index
}}
个组件
{{
detail
.
detailType
}}
{{
detail
.
codeName
}}
{{>
(
lookup
.
'detail.detailType'
)
item
=
detail
}}
{{/
each
}}
\ No newline at end of file
{{#
eq
item
.
pSLayoutPos
'FLEX'
}}
<div
style=
"flex-grow:
{{#if
item
.
pSLayoutPos
.
grow
}}{{
item
.
pSLayoutPos
.
grow
}}{{else}}
0
{{/if}}
;"
>
<AppFormGroup
name=
"
{{
item
.
codeName
}}
"
title=
"
{{
item
.
caption
}}
"
>
{{#
each
item
.
psDEFormDetails
as
|
formDetail
|
}}
{{>
(
lookup
.
'formDetail.detailType'
)
item
=
formDetail
}}
{{/
each
}}
</AppFormGroup>
</div>
{{else}}
<!-- 栅格样式需要方法计算" -->
<a-col
:span=
"24"
>
<AppFormGroup
name=
"
{{
item
.
codeName
}}
"
title=
"
{{
item
.
caption
}}
"
>
{{#
each
item
.
psDEFormDetails
as
|
formDetail
|
}}
{{>
(
lookup
.
'formDetail.detailType'
)
item
=
formDetail
}}
{{/
each
}}
</AppFormGroup>
</a-col>
{{/
eq
}}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/components/form-item.hbs
浏览文件 @
17cc2724
这里是表单项的子模板 输出
{{
item
.
codeName
}}
-
{{
item
.
caption
}}
{{#
eq
item
.
pSLayoutPos
'FLEX'
}}
<div
style=
"flex-grow:
{{#if
item
.
pSLayoutPos
.
grow
}}{{
item
.
pSLayoutPos
.
grow
}}{{else}}
0
{{/if}}
;"
>
<AppFormItem
name=
"
{{
item
.
codeName
}}
"
label=
"
{{
item
.
caption
}}
"
>
{{#if
item
.
psEditor
}}
开始加载表单项
{{
item
.
codeName
}}
--
{{
item
.
caption
}}
的 编辑器
{{
item
.
psEditor
.
editorType
}}
{{>
(
lookup
.
'item.psEditor.editorType'
)
item
=
item
}}
{{/if}}
\ No newline at end of file
{{/if}}
</AppFormItem>
</div>
{{else}}
<!-- 栅格样式需要方法计算" -->
<a-col
:span=
"24"
>
<AppFormItem
name=
"
{{
item
.
codeName
}}
"
label=
"
{{
item
.
caption
}}
"
>
{{#if
item
.
psEditor
}}
{{>
(
lookup
.
'item.psEditor.editorType'
)
item
=
item
}}
{{/if}}
</AppFormItem>
</a-col>
{{/
eq
}}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/components/form-page.hbs
浏览文件 @
17cc2724
这里是表单分页子模板,输出
{{
formPage
.
codeName
}}
-
{{
formPage
.
caption
}}
{{#
each
formPage
.
psDEFormDetails
as
|
formPageDetail
|
}}
{{
secNo
}}
.
{{
@index
}}
.
{{
formPageDetail
.
detailType
}}
{{
formPageDetail
.
codeName
}}
{{>
(
lookup
.
'formPageDetail.detailType'
)
item
=
formPageDetail
}}
{{/
each
}}
\ No newline at end of file
<a-tab-pane
key=
"
{{
formPage
.
codeName
}}
"
tab=
"
{{
formPage
.
caption
}}
"
>
{{#
eq
formPage
.
pSLayout
.
layout
"FLEX"
}}
<div
class=
"app-form-layout-flex"
style=
"
{{#if
formPage
.
pSLayout
.
dir
}}
flex-direction:
{{
formPage
.
pSLayout
.
dir
}}
;
{{/if}}{{#if
formPage
.
pSLayout
.
align
}}
justify-content:
{{
formPage
.
pSLayout
.
align
}}
;
{{/if}}{{#if
formPage
.
pSLayout
.
vAlign
}}
align-items:
{{
formPage
.
pSLayout
.
vAlign
}}
;
{{/if}}
"
>
{{#
each
formPage
.
psDEFormDetails
as
|
formDetail
|
}}
{{>
(
lookup
.
'formDetail.detailType'
)
item
=
formDetail
}}
{{/
each
}}
</div>
{{else}}
<a-row>
{{#
each
formPage
.
psDEFormDetails
as
|
formDetail
|
}}
{{>
(
lookup
.
'formDetail.detailType'
)
item
=
formDetail
}}
{{/
each
}}
</a-row>
{{/
eq
}}
</a-tab-pane>
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls}}-form/{{ctrls@FORM}}-form.vue.hbs
浏览文件 @
17cc2724
{{!引用子模板注册器 include}}
{{>
@macro
/
components
/
include-ctrls
.
hbs
}}
{{
ctrl
.
name
}}
{{#
each
ctrl
.
psDEFormPages
as
|
ctrlPart
|
}}
{{
@index
}}
.表单分页
{{
ctrlPart
.
codeName
}}
-
{{
ctrlPart
.
caption
}}
{{>
(
lookup
.
'ctrlPart.detailType'
)
formPage
=
ctrlPart
secNo
=
@index
}}
{{/
each
}}
这里是部件所属应用实体的代码名称
{{
ctrl
.
appEntity
.
codeName
}}
\ No newline at end of file
<template>
<a-form
name=
"
{{
ctrl
.
codeName
}}
"
class=
"app-form
{{#if
ctrl
.
pSSysCss
}}
{{
ctrl
.
pSSysCss
.
cssName
}}{{/if}}{{#if
ctrl
.
infoFormMode
}}
info-form-mode
{{/if}}
"
style=
"
{{#if
ctrl
.
formWidth
}}
width:
{{
ctrl
.
formWidth
}}
px;
{{/if}}
"
:model=
"data"
:rules=
"rules"
>
{{#if
ctrl
.
noTabHeader
}}
{{#
each
ctrl
.
psDEFormPages
as
|
ctrlPage
|
}}
{{#
each
ctrlPage
.
pSDEFormDetails
as
|
formDetail
|
}}
{{>
(
lookup
.
'formDetail.detailType'
)
item
=
formDetail
}}
{{/
each
}}
{{/
each
}}
{{else}}
<a-tabs
class=
"app-form-page"
>
{{#
each
ctrl
.
psDEFormPages
as
|
ctrlPage
|
}}
{{>
(
lookup
.
'ctrlPage.detailType'
)
formPage
=
ctrlPage
}}
{{/
each
}}
</a-tabs>
{{/if}}
</a-form>
</template>
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录