Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
b7f83a11
提交
b7f83a11
编写于
11月 02, 2022
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add:添加布局组件
上级
49ca41d5
变更
7
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
258 行增加
和
0 行删除
+258
-0
app-register.ts
src/app-register.ts
+6
-0
app-nav-pos.less
...nts/layout-element/container/app-nav-pos/app-nav-pos.less
+0
-0
app-nav-pos.vue
...ents/layout-element/container/app-nav-pos/app-nav-pos.vue
+84
-0
app-tab-page.less
...s/layout-element/container/app-tab-page/app-tab-page.less
+0
-0
app-tab-page.vue
...ts/layout-element/container/app-tab-page/app-tab-page.vue
+79
-0
app-tab-panel.less
...layout-element/container/app-tab-panel/app-tab-panel.less
+0
-0
app-tab-panel.vue
.../layout-element/container/app-tab-panel/app-tab-panel.vue
+89
-0
未找到文件。
src/app-register.ts
浏览文件 @
b7f83a11
...
...
@@ -112,6 +112,9 @@ import AppColorPicker from './components/app-color-picker/app-color-picker.vue'
import
AppScrollContainer
from
'./components/layout-element/container/app-scroll-container/app-scroll-container.vue'
;
import
AppSimpleFlexContainer
from
'./components/layout-element/container/app-simpleflex-container/app-simpleflex-container.vue'
;
import
AppStandardContainer
from
'./components/layout-element/container/app-standard-container/app-standard-container.vue'
;
import
AppTabPanel
from
'./components/layout-element/container/app-tab-panel/app-tab-panel.vue'
;
import
AppTabPage
from
'./components/layout-element/container/app-tab-page/app-tab-page.vue'
;
import
AppNavPos
from
'./components/layout-element/container/app-nav-pos/app-nav-pos.vue'
;
// 全局挂载UI实体服务注册中心
window
[
'uiServiceRegister'
]
=
uiServiceRegister
;
// 全局挂载实体权限服务注册中心
...
...
@@ -238,5 +241,8 @@ export const AppComponents = {
v
.
component
(
'app-scroll-container'
,
AppScrollContainer
);
v
.
component
(
'app-simpleflex-container'
,
AppSimpleFlexContainer
);
v
.
component
(
'app-standard-container'
,
AppStandardContainer
);
v
.
component
(
'app-tab-panel'
,
AppTabPanel
);
v
.
component
(
'app-tab-page'
,
AppTabPage
);
v
.
component
(
'app-nav-pos'
,
AppNavPos
);
},
};
\ No newline at end of file
src/components/layout-element/container/app-nav-pos/app-nav-pos.less
0 → 100644
浏览文件 @
b7f83a11
src/components/layout-element/container/app-nav-pos/app-nav-pos.vue
0 → 100644
浏览文件 @
b7f83a11
<
template
>
<div
class=
"app-nav-pos"
>
<template
v-if=
"dynaNavMode === 'ROUTEVIEW'"
>
<template
v-if=
"enableCache"
>
<app-keep-alive
:routerList=
"routerList"
>
<router-view
:key=
"routerViewKey"
></router-view>
</app-keep-alive>
</
template
>
<router-view
v-else
:key=
"routerViewKey"
></router-view>
</template>
<component
class=
"view-container2"
v-if=
"navData && navData.navView"
:is=
"navData.navView"
:viewDefaultUsage=
"false"
:viewdata=
"JSON.stringify(navData.srfnavdata.context)"
:viewparam=
"JSON.stringify(navData.srfnavdata.viewparmas)"
@
viewdataschange=
"handleViewEvent"
@
viewLoaded=
"handleViewEvent"
@
viewstatechange=
"handleViewEvent"
>
</component>
</div>
</template>
<
script
lang=
"ts"
>
import
{
Component
,
Prop
,
Vue
,
Watch
}
from
"vue-property-decorator"
;
@
Component
({})
export
default
class
AppNavPos
extends
Vue
{
/**
* 动态导航模式(DYNAMICCOMP:动态组件 ROUTEVIEW:路由出口)
*
* @public
* @type {'DYNAMICCOMP' | 'ROUTEVIEW'}
* @memberof AppNavPos
*/
@
Prop
({
default
:
"ROUTEVIEW"
})
public
dynaNavMode
?:
"DYNAMICCOMP"
|
"ROUTEVIEW"
;
/**
* 是否启用动态缓存
*
* @type {boolean}
* @memberof AppNavPos
*/
@
Prop
({
default
:
false
})
public
enableCache
?:
boolean
;
/**
* 导航数据
*
* @type {*}
* @memberof AppNavPos
*/
@
Prop
()
public
navData
?:
any
;
/**
* 路由列表
*
* @memberof AppNavPos
*/
get
routerList
()
{
return
this
.
$store
.
state
.
historyPathList
;
}
/**
* 路由键值
*
* @memberof AppNavPos
*/
get
routerViewKey
()
{
let
_this
:
any
=
this
;
return
_this
.
$route
.
fullPath
;
}
/**
* 执行视图事件
*
* @param {*} args
* @memberof AppNavPos
*/
public
handleViewEvent
(
args
:
any
)
{
console
.
log
(
args
);
}
}
</
script
>
src/components/layout-element/container/app-tab-page/app-tab-page.less
0 → 100644
浏览文件 @
b7f83a11
src/components/layout-element/container/app-tab-page/app-tab-page.vue
0 → 100644
浏览文件 @
b7f83a11
<
template
>
<TabPane
:label=
"currentModelDetail.caption"
:name=
"currentModelDetail.name"
tab=
"tabpanel1"
:class=
"curClassName"
>
<template
v-if=
"containerModel.length > 0"
>
<template
v-for=
"name of containerModel"
>
<slot
:name=
"name"
></slot>
</
template
>
</template>
</TabPane>
</template>
<
script
lang=
"ts"
>
import
{
Component
,
Prop
,
Vue
}
from
'vue-property-decorator'
;
@
Component
({})
export
default
class
AppTabPanel
extends
Vue
{
/**
* 名称
*
* @type {string}
* @memberof AppTabPanel
*/
@
Prop
()
public
name
!
:
string
;
/**
* 布局模型详情
*
* @type {string}
* @memberof AppTabPanel
*/
@
Prop
()
public
layoutModelDetails
:
any
;
/**
* 插槽对象
*
* @memberof AppTabPanel
*/
public
containerModel
:
any
[]
=
[];
/**
* 当前模型
*
* @memberof AppTabPanel
*/
public
currentModelDetail
:
any
;
/**
* 组件初始化
*
* @memberof SimpleFlexContainer
*/
public
created
()
{
this
.
init
();
}
/**
* 初始化子项
*
* @memberof SimpleFlexContainer
*/
public
init
()
{
this
.
currentModelDetail
=
this
.
layoutModelDetails
[
this
.
name
];
if
(
this
.
currentModelDetail
&&
this
.
currentModelDetail
.
details
&&
this
.
currentModelDetail
.
details
.
length
>
0
)
{
this
.
currentModelDetail
.
details
.
forEach
((
key
:
string
)
=>
{
this
.
containerModel
.
push
(
key
);
})
}
}
/**
* 当前容器样式类
*/
get
curClassName
()
{
return
`app-tab-page
${
this
.
name
}
`
;
}
}
</
script
>
<
style
lang=
'less'
>
</
style
>
\ No newline at end of file
src/components/layout-element/container/app-tab-panel/app-tab-panel.less
0 → 100644
浏览文件 @
b7f83a11
src/components/layout-element/container/app-tab-panel/app-tab-panel.vue
0 → 100644
浏览文件 @
b7f83a11
<
template
>
<Tabs
v-model=
"activeName"
@
on-click=
"handleClick"
:name=
"name"
:class=
"curClassName"
>
<template
v-if=
"containerModel.length > 0"
>
<template
v-for=
"name of containerModel"
>
<slot
:name=
"name"
></slot>
</
template
>
</template>
</Tabs>
</template>
<
script
lang=
"ts"
>
import
{
Component
,
Prop
,
Vue
}
from
'vue-property-decorator'
;
@
Component
({})
export
default
class
AppTabPanel
extends
Vue
{
/**
* 名称
*
* @type {string}
* @memberof AppTabPanel
*/
@
Prop
()
public
name
!
:
string
;
/**
* 布局模型详情
*
* @type {string}
* @memberof AppTabPanel
*/
@
Prop
()
public
layoutModelDetails
:
any
;
/**
* 插槽对象
*
* @memberof AppTabPanel
*/
public
containerModel
:
any
[]
=
[];
/**
* 当前激活项
*
* @memberof AppTabPanel
*/
public
activeName
:
string
=
''
;
/**
* 组件初始化
*
* @memberof SimpleFlexContainer
*/
public
created
()
{
this
.
initTabPage
();
}
/**
* 初始化分页
*
* @memberof SimpleFlexContainer
*/
public
initTabPage
()
{
const
curLayoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
if
(
curLayoutModel
&&
curLayoutModel
.
details
&&
curLayoutModel
.
details
.
length
>
0
)
{
curLayoutModel
.
details
.
forEach
((
key
:
string
)
=>
{
this
.
containerModel
.
push
(
key
);
})
}
this
.
activeName
=
this
.
containerModel
&&
this
.
containerModel
.
length
>
0
?
this
.
containerModel
[
0
]
:
''
;
this
.
layoutModelDetails
[
this
.
name
].
clickPage
(
this
.
activeName
);
}
/**
* 处理分页点击
*
* @memberof SimpleFlexContainer
*/
public
handleClick
(
tab
:
any
)
{
this
.
layoutModelDetails
[
this
.
name
].
clickPage
(
tab
);
}
/**
* 当前容器样式类
*/
get
curClassName
()
{
return
`app-tab-panel
${
this
.
name
}
`
;
}
}
</
script
>
<
style
lang=
'less'
>
</
style
>
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录