Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
55bad5b2
提交
55bad5b2
编写于
1月 25, 2022
作者:
WodahsOrez
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update: 分页导航视图细化
上级
2f391f52
变更
10
显示空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
89 行增加
和
15 行删除
+89
-15
tab-exp-view-state.ts
...src/core/modules/views/tab-exp-view/tab-exp-view-state.ts
+7
-2
tab-exp-view.ts
...pps}}/src/core/modules/views/tab-exp-view/tab-exp-view.ts
+17
-7
tab-exp-panel-control-prop.ts
...dgets/tab-exp-panel-control/tab-exp-panel-control-prop.ts
+9
-0
tab-exp-panel-control-state.ts
...gets/tab-exp-panel-control/tab-exp-panel-control-state.ts
+13
-0
tab-exp-panel-control.ts
...es/widgets/tab-exp-panel-control/tab-exp-panel-control.ts
+9
-0
app-tab-exp-panel.scss
.../r7/app_{{apps}}/src/style/widgets/app-tab-exp-panel.scss
+12
-0
app-tab-view-panel.scss
...r7/app_{{apps}}/src/style/widgets/app-tab-view-panel.scss
+4
-0
index.scss
...ources/templ/r7/app_{{apps}}/src/style/widgets/index.scss
+3
-1
{{pages@DETABEXPVIEW}}.vue.hbs
...s}}/{{pages@DETABEXPVIEW}}/{{pages@DETABEXPVIEW}}.vue.hbs
+4
-2
{{ctrls@TABEXPPANEL}}-tab-exp-panel.vue.hbs
...tab-exp-panel/{{ctrls@TABEXPPANEL}}-tab-exp-panel.vue.hbs
+11
-3
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/tab-exp-view/tab-exp-view-state.ts
浏览文件 @
55bad5b2
import
{
ExpViewState
}
from
"@core"
;
import
{
ExpViewState
}
from
'@core'
;
/**
* @description 树导航视图状态
...
...
@@ -6,4 +6,9 @@ import { ExpViewState } from "@core";
* @interface TabExpViewState
* @extends {ExpViewState}
*/
export
interface
TabExpViewState
extends
ExpViewState
{}
\ No newline at end of file
export
interface
TabExpViewState
extends
ExpViewState
{
/**
* 默认打开的分页name
*/
defaultActivePanel
?:
string
;
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/views/tab-exp-view/tab-exp-view.ts
浏览文件 @
55bad5b2
import
{
ExpView
}
from
"@core"
;
import
{
TabExpViewProps
}
from
"./tab-exp-view-prop"
;
import
{
TabExpViewState
}
from
"./tab-exp-view-state"
;
import
{
ExpView
,
isExist
}
from
'@core'
;
import
{
TabExpViewProps
}
from
'./tab-exp-view-prop'
;
import
{
TabExpViewState
}
from
'./tab-exp-view-state'
;
/**
* @description 分页导航视图
...
...
@@ -9,7 +9,6 @@ import { TabExpViewState } from "./tab-exp-view-state";
* @extends {ExpView}
*/
export
class
TabExpView
extends
ExpView
{
/**
* @description 视图状态
* @type {TabExpViewState}
...
...
@@ -17,6 +16,16 @@ export class TabExpView extends ExpView {
*/
public
declare
state
:
TabExpViewState
;
/**
*【内置功能】提供通过viewparams里的srfDefaultPanel指定默认打开的分页的功能
*/
public
useDefaultPanel
()
{
const
{
srfDefaultPanel
}
=
this
.
state
.
viewParams
;
if
(
isExist
(
srfDefaultPanel
))
{
this
.
state
.
defaultActivePanel
=
srfDefaultPanel
;
}
}
/**
* @description 安装视图所有功能模块的方法
* @return {*}
...
...
@@ -24,8 +33,9 @@ export class TabExpView extends ExpView {
*/
public
moduleInstall
()
{
const
superParams
=
super
.
moduleInstall
();
this
.
useDefaultPanel
()
return
{
...
superParams
...
superParams
,
};
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/tab-exp-panel-control/tab-exp-panel-control-prop.ts
浏览文件 @
55bad5b2
...
...
@@ -7,5 +7,14 @@ import { IParam, MainControlProps } from "@core";
* @extends {MainControlProps}
*/
export
interface
TabExpPanelControlProps
extends
MainControlProps
{
/**
* 分页栏显示位置
* 目前支持上,下,左,右
*/
tabPosition
:
"left"
|
"right"
|
"top"
|
"bottom"
;
/**
* 默认打开的分页name
*/
defaultActivePanel
?:
string
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/tab-exp-panel-control/tab-exp-panel-control-state.ts
浏览文件 @
55bad5b2
...
...
@@ -8,4 +8,17 @@ import { IParam, MainControlState } from '@core';
*/
export
interface
TabExpPanelControlState
extends
MainControlState
{
/**
* 分页栏显示位置
* 目前支持上,下,左,右
*
*/
tabPosition
:
"left"
|
"right"
|
"top"
|
"bottom"
;
/**
* 当前激活的分页的name
*
*/
activePanel
:
string
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/tab-exp-panel-control/tab-exp-panel-control.ts
浏览文件 @
55bad5b2
...
...
@@ -15,6 +15,15 @@ export class TabExpPanelControl extends MainControl {
*/
public
declare
state
:
TabExpPanelControlState
;
/**
* @memberof TabExpPanelControl
*/
public
setState
()
{
super
.
setState
();
this
.
state
.
tabPosition
=
toRef
(
this
.
props
,
'tabPosition'
)
as
any
;
this
.
state
.
activePanel
=
this
.
props
.
defaultActivePanel
;
}
/**
* @description 安装部件所有功能模块的方法
* @param {TabExpPanelControlProps} props
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/widgets/app-tab-exp-panel.scss
0 → 100644
浏览文件 @
55bad5b2
// 分页导航面板部件
// 高度自适应
.app-tab-exp-panel
{
height
:
100%
;
}
.app-tab-exp-panel__tabs
{
height
:
100%
;
.ant-tabs-content
{
height
:
100%
;
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/widgets/app-tab-view-panel.scss
0 → 100644
浏览文件 @
55bad5b2
// 分页视图面板部件
.app-tab-view-panel
{
height
:
100%
;
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/widgets/index.scss
浏览文件 @
55bad5b2
...
...
@@ -2,3 +2,5 @@
@use
'./search-form.scss'
;
@use
'./app-menu.scss'
;
@use
'./app-tree-exp-bar.scss'
;
@use
'./app-tab-exp-panel.scss'
;
@use
'./app-tab-view-panel.scss'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@DETABEXPVIEW}}/{{pages@DETABEXPVIEW}}.vue.hbs
浏览文件 @
55bad5b2
<script
setup
lang=
"ts"
>
import
{
Subject
}
from
'rxjs'
;
import
{
Picku
pView
,
IActionParam
,
IParam
,
IContext
}
from
'@core'
;
import
{
TabEx
pView
,
IActionParam
,
IParam
,
IContext
}
from
'@core'
;
import
{
viewState
}
from
'./
{{
spinalCase
page
.
codeName
}}
-state'
;
{{#
page
.
ctrls
}}
{{#
eq
controlType
"TABEXPPANEL"
}}
...
...
@@ -28,7 +28,7 @@ interface ViewEmit {
const
emit
=
defineEmits
<
ViewEmit
>
();
// 安装功能模块,提供状态和能力方法
const
{
state
,
onCancel
,
onConfirm
,
onCtrlEvent
,
selectData
}
=
new
Picku
pView
(
viewState
,
props
,
emit
).
moduleInstall
();
const
{
state
,
onCancel
,
onConfirm
,
onCtrlEvent
,
selectData
}
=
new
TabEx
pView
(
viewState
,
props
,
emit
).
moduleInstall
();
</script>
<template>
...
...
@@ -49,9 +49,11 @@ const { state, onCancel, onConfirm, onCtrlEvent, selectData } = new PickupView(v
{{#
eq
controlType
"TABEXPPANEL"
}}
<
{{
codeName
}}
TabExpPanel
name=
"
{{
name
}}
"
tabPosition=
"
{{
lowerCase
page
.
tabLayout
}}
"
:context=
"state.context"
:viewParams=
"state.viewParams"
:viewSubject=
"state.viewSubject"
:defaultActivePanel=
"state.defaultActivePanel"
@
onCtrlEvent=
"onCtrlEvent"
></
{{
codeName
}}
TabExpPanel>
{{/
eq
}}
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@TABEXPPANEL}}-tab-exp-panel/{{ctrls@TABEXPPANEL}}-tab-exp-panel.vue.hbs
浏览文件 @
55bad5b2
...
...
@@ -11,12 +11,20 @@ interface Props {
viewParams
?:
IParam
;
showBusyIndicator
?:
boolean
;
selectedData
?:
string
;
tabPosition
?:
string
;
defaultActivePanel
?:
string
;
viewSubject
:
Subject
<
IActionParam
>
;
}
const
props
=
withDefaults
(
defineProps
<
Props
>
(),
{
viewSubject
:
()
=>
new
Subject
<
IActionParam
>
(),
showBusyIndicator
:
true
,
tabPosition
:
"
{{#if
ctrl
.
tabLayout
}}{{
lowerCase
ctrl
.
tabLayout
}}{{else}}
top
{{/if}}
"
,
{{#
each
ctrl
.
psControls
as
|
viewPanel
|
}}
{{#if
@first
}}
defaultActivePanel
:
"
{{
viewPanel
.
name
}}
"
,
{{/if}}
{{/
each
}}
})
// emit声明
...
...
@@ -37,11 +45,11 @@ defineExpose({ state, name: '{{ctrl.name}}' });
<div
class=
"app-tab-exp-panel
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
>
{{#if
ctrl
.
psControls
}}
<a-tabs
class=
"app-tab-exp-panel__tabs"
>
<a-tabs
:tabPosition=
"state.tabPosition"
v-model:activeKey=
"state.activePanel"
class=
"app-tab-exp-panel__tabs"
>
{{#
each
ctrl
.
psControls
as
|
viewPanel
|
}}
<a-tab-pane
{{#if
viewPanel
.
psSysCss
}}
class=
"
{{
viewPanel
.
psSysCss
.
cssName
}}
"
{{/if}}
key=
"
{{
viewPanel
.
codeN
ame
}}
"
>
<a-tab-pane
key=
"
{{
viewPanel
.
n
ame
}}
"
>
<template
#
tab
>
<AppIconText
{{#if
viewPanel
.
psSysImage
}}{{#if
viewPanel
.
psSysImage
.
cssClass
}}
:iconClass=
"
{{
viewPanel
.
psSysImage
.
cssClass
}}
"
{{/if}}{{#if
viewPanel
.
psSysImage
.
imagePath
}}
:
imgPath=
"
{{
viewPanel
.
psSysImage
.
imagePath
}}
"
{{/if}}{{/if}}
text=
"
{{
viewPanel
.
caption
}}
"
/>
<AppIconText
{{#if
viewPanel
.
psSysImage
}}{{#if
viewPanel
.
psSysImage
.
cssClass
}}
iconClass=
"
{{
viewPanel
.
psSysImage
.
cssClass
}}
"
{{/if}}{{#if
viewPanel
.
psSysImage
.
imagePath
}}
imgPath=
"
{{
viewPanel
.
psSysImage
.
imagePath
}}
"
{{/if}}{{/if}}
text=
"
{{
viewPanel
.
caption
}}
"
/>
</template>
<
{{
viewPanel
.
codeName
}}
TabViewPanel
name=
"
{{
name
}}
"
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录