提交 17cc2724 编写于 作者: Shine-zwj's avatar Shine-zwj

update:更新表单UI

上级 b8979205
...@@ -139,7 +139,7 @@ public class CodegenConfig { ...@@ -139,7 +139,7 @@ public class CodegenConfig {
} }
else { else {
String path=file.getPath().replace("\\","/"); 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()));
} }
} }
......
这里是表单分组子模板 输出{{item.codeName}}-{{item.caption}} {{#eq item.pSLayoutPos 'FLEX'}}
<div style="flex-grow: {{#if item.pSLayoutPos.grow}}{{item.pSLayoutPos.grow}}{{else}}0{{/if}};">
{{#each item.psDEFormDetails as | detail | }} <AppFormGroup name="{{item.codeName}}" title="{{item.caption}}">
加载表单分组 {{item.codeName}}-{{item.caption}} 的 第 {{@index}} 个组件 {{detail.detailType}} {{detail.codeName}} {{#each item.psDEFormDetails as | formDetail | }}
{{>(lookup . 'detail.detailType') item=detail}} {{>(lookup . 'formDetail.detailType') item=formDetail}}
{{/each}}
</AppFormGroup>
{{/each}} </div>
\ No newline at end of file {{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
这里是表单项的子模板 输出 {{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}} {{#if item.psEditor}}
开始加载表单项 {{item.codeName}}--{{item.caption}} 的 编辑器 {{item.psEditor.editorType}}
{{>(lookup . 'item.psEditor.editorType') item=item}} {{>(lookup . 'item.psEditor.editorType') item=item}}
{{/if}}
</AppFormItem>
{{/if}} </div>
\ No newline at end of file {{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
这里是表单分页子模板,输出{{formPage.codeName}}-{{formPage.caption}}
{{#each formPage.psDEFormDetails as | formPageDetail |}} <a-tab-pane key="{{formPage.codeName}}" tab="{{formPage.caption}}">
{{secNo}}.{{@index}}. {{formPageDetail.detailType}} {{formPageDetail.codeName}} {{#eq formPage.pSLayout.layout "FLEX"}}
{{>(lookup . 'formPageDetail.detailType') item=formPageDetail}} <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}} {{/each}}
\ No newline at end of file </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
{{!引用子模板注册器 include}} {{!引用子模板注册器 include}}
{{>@macro/components/include-ctrls.hbs}} {{>@macro/components/include-ctrls.hbs}}
{{ctrl.name}} <template>
<a-form
{{#each ctrl.psDEFormPages as | ctrlPart | }} name="{{ctrl.codeName}}"
{{@index}}.表单分页{{ctrlPart.codeName}}-{{ctrlPart.caption}} class="app-form{{#if ctrl.pSSysCss}} {{ctrl.pSSysCss.cssName}}{{/if}}{{#if ctrl.infoFormMode}} info-form-mode{{/if}}"
{{>(lookup . 'ctrlPart.detailType') formPage=ctrlPart secNo=@index}} style="{{#if ctrl.formWidth}}width: {{ctrl.formWidth}}px;{{/if}}"
{{/each}} :model="data"
:rules="rules">
这里是部件所属应用实体的代码名称{{ctrl.appEntity.codeName}} {{#if ctrl.noTabHeader}}
\ No newline at end of file {{#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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册