Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
08c4a700
提交
08c4a700
编写于
1月 19, 2022
作者:
RedPig97
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add: 应用菜单中间样式支持
上级
42bc5585
变更
9
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
92 行增加
和
43 行删除
+92
-43
view-base-config.hbs
...rces/templ/r7/@macro/front-end/views/view-base-config.hbs
+3
-0
app-default-index-view-layout.vue
...}/src/components/layout/app-default-index-view-layout.vue
+40
-29
menu-control.ts
...s}}/src/core/modules/widgets/menu-control/menu-control.ts
+7
-7
app-default-index-view-base-layout.scss
...components/layout/app-default-index-view-base-layout.scss
+8
-0
index.scss
...pl/r7/app_{{apps}}/src/style/components/layout/index.scss
+2
-1
app-menu.scss
...ces/templ/r7/app_{{apps}}/src/style/widgets/app-menu.scss
+18
-0
index.scss
...ources/templ/r7/app_{{apps}}/src/style/widgets/index.scss
+2
-1
{{pages@APPINDEXVIEW}}.vue.hbs
...s}}/{{pages@APPINDEXVIEW}}/{{pages@APPINDEXVIEW}}.vue.hbs
+2
-2
{{ctrls@APPMENU}}-menu.vue.hbs
...s}}/{{ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu.vue.hbs
+10
-3
未找到文件。
modules/ibizlab-generator-core/src/main/resources/templ/r7/@macro/front-end/views/view-base-config.hbs
浏览文件 @
08c4a700
...
...
@@ -17,6 +17,9 @@
]
},
{{/if}}
{{#
eq
page
.
viewType
'APPINDEXVIEW'
}}
menuAlign: '
{{#if
page
.
mainMenuAlign
}}{{
page
.
mainMenuAlign
}}{{else}}
LEFT
{{/if}}
',
{{/
eq
}}
appEntityName: '
{{
page
.
appEntity
.
codeName
}}
',
isLoadDefault:
{{#if
(
or
page
.
loadDefault
(
eq
page
.
loadDefault
false
))
}}{{
page
.
loadDefault
}}{{else}}
true
{{/if}}
,
keyPSDEField: '
{{
lowerCase
page
.
appEntity
.
codeName
}}
',
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/components/layout/app-default-index-view-layout.vue
浏览文件 @
08c4a700
...
...
@@ -3,44 +3,55 @@ interface LayoutProps {
/**
* @description 菜单方向
*/
menuAlign
:
"LEFT"
|
"TOP"
|
"CENTER"
|
"TABEXP_LEFT"
|
"TABEXP_TOP"
|
"TABEXP_RIGHT"
|
"TABEXP_BOTTOM"
|
"NONE"
,
menuAlign
:
'LEFT'
|
'TOP'
|
'CENTER'
|
'TABEXP_LEFT'
|
'TABEXP_TOP'
|
'TABEXP_RIGHT'
|
'TABEXP_BOTTOM'
|
'NONE'
;
/**
* @description 收缩
*/
collapsed
:
boolean
,
collapsed
:
boolean
;
/**
* @description 显示标题栏
*/
showCaptionBar
:
boolean
;
}
const
props
=
withDefaults
(
defineProps
<
LayoutProps
>
(),
{
menuAlign
:
"LEFT"
,
menuAlign
:
'LEFT'
,
collapsed
:
false
,
})
showCaptionBar
:
true
});
</
script
>
<
template
>
<AppIndexViewBaseLayout
class=
"app-index-view-layout--default"
>
<template
v-slot:header-left
>
<slot
name=
"caption"
></slot>
</
template
>
<
template
v-slot:header-content
>
<slot
name=
"menu"
v-if=
"Object.is(menuAlign, 'TOP')"
></slot>
</
template
>
<
template
v-slot:header-right
>
<slot
name=
"user"
></slot>
</
template
>
<
template
v-slot:side-left
>
<a-layout-sider
v-if=
"Object.is(menuAlign, 'LEFT')"
collapsible
:trigger=
"null"
:collapsed=
"collapsed"
>
<slot
name=
"menu"
></slot>
</a-layout-sider>
</
template
>
<
template
v-slot:content
>
<slot
name=
"router"
/>
</
template
>
</AppIndexViewBaseLayout>
<div
class=
"app-index-view-layout--default"
>
<a-card
v-if=
"Object.is(menuAlign, 'CENTER')"
class=
"center-menu-card"
>
<template
v-if=
"showCaptionBar"
#
title
>
<slot
name=
"caption"
/>
</
template
>
<slot
name=
"menu"
/>
</a-card>
<AppIndexViewBaseLayout
v-else
>
<
template
v-slot:header-left
>
<slot
v-if=
"showCaptionBar"
name=
"caption"
></slot>
</
template
>
<
template
v-slot:header-content
>
<slot
name=
"breadcrumb"
/>
<slot
name=
"menu"
v-if=
"Object.is(menuAlign, 'TOP')"
></slot>
</
template
>
<
template
v-slot:header-right
>
<slot
name=
"user"
></slot>
</
template
>
<
template
v-slot:side-left
>
<a-layout-sider
v-if=
"Object.is(menuAlign, 'LEFT')"
collapsible
:trigger=
"null"
:collapsed=
"collapsed"
>
<slot
name=
"menu"
></slot>
</a-layout-sider>
</
template
>
<
template
v-slot:content
>
<slot
name=
"view-exp"
/>
<slot
name=
"router"
/>
</
template
>
</AppIndexViewBaseLayout>
</div>
</template>
<
style
lang=
"scss"
>
</
style
>
\ No newline at end of file
<
style
lang=
"scss"
></
style
>
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/core/modules/widgets/menu-control/menu-control.ts
浏览文件 @
08c4a700
...
...
@@ -163,7 +163,7 @@ export class MenuControl extends ControlBase {
* @param {IParam} item 菜单项数据
* @memberof MenuControl
*/
public
m
enuClick
(
item
:
IParam
)
{
public
handleM
enuClick
(
item
:
IParam
)
{
const
{
context
,
viewParams
}
=
this
.
state
;
App
.
getAppFuncService
().
executeAppFunc
(
item
,
deepCopy
(
context
),
deepCopy
(
viewParams
));
}
...
...
@@ -204,12 +204,12 @@ export class MenuControl extends ControlBase {
* @param {IParam} $event 选中项数据
* @memberof MenuControl
*/
public
m
enuSelect
(
$event
:
IParam
)
{
public
onM
enuSelect
(
$event
:
IParam
)
{
const
{
key
}
=
$event
;
const
dataRef
=
toRef
(
this
.
state
,
'menus'
);
let
item
=
this
.
compute
(
dataRef
.
value
,
key
);
if
(
Object
.
keys
(
item
).
length
>
0
)
{
this
.
m
enuClick
(
item
);
this
.
handleM
enuClick
(
item
);
}
}
...
...
@@ -222,15 +222,15 @@ export class MenuControl extends ControlBase {
const
superParams
=
super
.
moduleInstall
();
const
{
load
}
=
this
.
useLoad
();
const
menuSelect
=
this
.
m
enuSelect
.
bind
(
this
);
this
.
m
enuSelect
=
(
$event
:
IParam
)
=>
{
m
enuSelect
(
$event
);
const
onMenuSelect
=
this
.
onM
enuSelect
.
bind
(
this
);
this
.
onM
enuSelect
=
(
$event
:
IParam
)
=>
{
onM
enuSelect
(
$event
);
}
return
{
...
superParams
,
load
,
menuSelect
:
this
.
m
enuSelect
,
onMenuSelect
:
this
.
onM
enuSelect
,
};
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/components/layout/app-default-index-view-base-layout.scss
0 → 100644
浏览文件 @
08c4a700
.app-index-view-layout--default
{
height
:
100%
;
width
:
100%
;
.center-menu-card
{
height
:
100%
;
overflow
:
auto
;
}
}
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/components/layout/index.scss
浏览文件 @
08c4a700
@use
'./app-view-base-layout.scss'
;
@use
'./app-index-view-base-layout.scss'
;
\ No newline at end of file
@use
'./app-index-view-base-layout.scss'
;
@use
'./app-default-index-view-base-layout.scss'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/widgets/app-menu.scss
0 → 100644
浏览文件 @
08c4a700
.app-menu--center
{
.ant-card-head-title
{
text-align
:
left
;
}
.ant-card-body
{
text-align
:
left
;
.ant-space
{
flex-wrap
:
wrap
;
.ant-btn
{
width
:
320px
;
height
:
56px
;
border-radius
:
4px
;
border-left
:
10px
solid
var
(
--
app-color-primary
);
}
}
}
}
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/style/widgets/index.scss
浏览文件 @
08c4a700
// 部件样式汇总
@use
'./search-form.scss'
;
\ No newline at end of file
@use
'./search-form.scss'
;
@use
'./app-menu.scss'
;
\ No newline at end of file
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/views/{{appModules}}/{{pages@APPINDEXVIEW}}/{{pages@APPINDEXVIEW}}.vue.hbs
浏览文件 @
08c4a700
...
...
@@ -39,12 +39,12 @@ const collapsedChange = () => {
</script>
<template>
<AppDefaultIndexViewLayout
:class=
"['app-index-view', state.viewSysCss]"
:menuAlign=
"state.menuAlign"
:collapsed=
"collapsed"
>
<AppDefaultIndexViewLayout
:class=
"['app-index-view', state.viewSysCss]"
:
showCaptionBar=
"state.showCaptionBar"
:
menuAlign=
"state.menuAlign"
:collapsed=
"collapsed"
>
<template
#
caption
>
<div
class=
"index-view-header"
>
\{{state.viewCaption}}
<MenuUnfoldOutlined
v-if=
"collapsed"
v-if=
"collapsed
&& Object.is(state.menuAlign,'LEFT')
"
class=
"trigger"
@
click=
"collapsedChange"
/>
...
...
modules/ibizlab-generator-core/src/main/resources/templ/r7/app_{{apps}}/src/widgets/{{appEntities}}/{{ctrls@APPMENU}}-menu/{{ctrls@APPMENU}}-menu.vue.hbs
浏览文件 @
08c4a700
...
...
@@ -20,15 +20,22 @@ interface CtrlEmit {
}
const
emit
=
defineEmits
<
CtrlEmit
>
();
const
{
state
,
m
enuSelect
}
=
new
MenuControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
const
{
state
,
onM
enuSelect
}
=
new
MenuControl
(
ctrlState
,
props
,
emit
).
moduleInstall
();
// 暴露内部状态及能力
defineExpose
({
state
,
name
:
'
{{
ctrl
.
name
}}
'
});
</script>
<template>
<a-menu
class=
"app-menu
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
v-model:openKeys=
"state.defaultOpens"
v-model:selectedKeys=
"state.defaultSelect"
:mode=
"Object.is('LEFT', state.menuAlign) ? 'inline' : 'horizontal'"
@
select=
"menuSelect"
>
<div
v-if=
"Object.is('CENTER', state.menuAlign)"
class=
"app-menu app-menu--center
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
>
<a-card
v-for=
"(menu,index) in state.menus"
v-show=
"!menu.hidden"
:key=
"index"
class=
"app-menu__card"
:title=
"menu.caption"
>
<a-space
:size=
"24"
>
<a-button
v-for=
"item in menu.items"
size=
"large"
@
click=
"onMenuSelect({key: item.name})"
>
\{{item.caption}}
</a-button>
</a-space>
</a-card>
</div>
<a-menu
v-else
class=
"app-menu
{{#if
ctrl
.
psSysCss
}}
{{
ctrl
.
psSysCss
.
cssName
}}{{/if}}
"
v-model:openKeys=
"state.defaultOpens"
v-model:selectedKeys=
"state.defaultSelect"
:mode=
"Object.is('LEFT', state.menuAlign) ? 'inline' : 'horizontal'"
@
select=
"onMenuSelect"
>
<AppMenuItem
:items=
"state.menus"
:collapsed=
"collapsed"
/>
</a-menu>
</template>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录