Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7-Res
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7-Res
提交
8deda252
提交
8deda252
编写于
11月 03, 2022
作者:
tony001
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
上级
1aef406f
变更
4
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
69 行增加
和
44 行删除
+69
-44
app-scroll-container.vue
...t/container/app-scroll-container/app-scroll-container.vue
+29
-12
app-simpleflex-container.less
...er/app-simpleflex-container/app-simpleflex-container.less
+4
-0
app-simpleflex-container.vue
...ner/app-simpleflex-container/app-simpleflex-container.vue
+19
-30
panel-detail.ts
src/model/panel-detail/panel-detail.ts
+17
-2
未找到文件。
src/components/layout-element/container/app-scroll-container/app-scroll-container.vue
浏览文件 @
8deda252
<
template
>
<div
:class=
"curClassName"
>
<div
:class=
"curClassName"
:style=
"curStyle"
>
<div
v-if=
"containerModel.NORTH"
:style=
"containerModel.NORTH.style"
class=
"no-style overflow-auto app-scroll-container__header"
>
<
template
v-for=
"name of containerModel.NORTH.name
"
>
<
div
v-for=
"name of containerModel.NORTH.name"
class=
"scroll-item__pos"
:style=
"getItemPosStyle(name)
"
>
<slot
:name=
"name"
></slot>
</
template
>
</
div
>
</div>
<div
class=
"app-scroll-container__middle"
:style=
"middleContainerStyle"
>
<div
v-if=
"containerModel.WEST"
:style=
"containerModel.WEST.style"
class=
"no-style overflow-auto app-scroll-container__left"
>
<
template
v-for=
"name of containerModel.WEST.name
"
>
<
div
v-for=
"name of containerModel.WEST.name"
class=
"scroll-item__pos"
:style=
"getItemPosStyle(name)
"
>
<slot
:name=
"name"
></slot>
</
template
>
</
div
>
</div>
<div
v-if=
"containerModel.CENTER"
:style=
"containerModel.CENTER.style"
class=
"no-style overflow-auto app-scroll-container__center"
>
<
template
v-for=
"name of containerModel.CENTER.name
"
>
<
div
v-for=
"name of containerModel.CENTER.name"
class=
"scroll-item__pos"
:style=
"getItemPosStyle(name)
"
>
<slot
:name=
"name"
></slot>
</
template
>
</
div
>
</div>
<div
v-if=
"containerModel.EAST"
:style=
"containerModel.EAST.style"
class=
"no-style overflow-auto app-scroll-container__right"
>
<
template
v-for=
"name of containerModel.EAST.name
"
>
<
div
v-for=
"name of containerModel.EAST.name"
class=
"scroll-item__pos"
:style=
"getItemPosStyle(name)
"
>
<slot
:name=
"name"
></slot>
</
template
>
</
div
>
</div>
</div>
<div
v-if=
"containerModel.SOUTH"
:style=
"containerModel.SOUTH.style"
class=
"no-style overflow-auto app-scroll-container__bottom"
>
<
template
v-for=
"name of containerModel.SOUTH.name
"
>
<
div
v-for=
"name of containerModel.SOUTH.name"
class=
"scroll-item__pos"
:style=
"getItemPosStyle(name)
"
>
<slot
:name=
"name"
></slot>
</
template
>
</
div
>
</div>
</div>
</
template
>
...
...
@@ -75,7 +75,24 @@ export default class AppScrollContainer extends Vue {
* 当前容器样式类
*/
get
curClassName
(){
return
`app-scroll-container
${
this
.
name
}
`
;
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
`app-scroll-container
${
this
.
name
}
${
layoutModel
.
sysCss
}
`
;
}
/**
* 当前容器样式
*/
get
curStyle
(){
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
layoutModel
.
getBoxSpacingStyle
();
}
/**
* 获取项布局样式
*/
public
getItemPosStyle
(
name
:
string
){
const
layoutModel
=
this
.
layoutModelDetails
[
name
];
return
layoutModel
.
getBorderLayoutStyle
();
}
/**
...
...
src/components/layout-element/container/app-simpleflex-container/app-simpleflex-container.less
浏览文件 @
8deda252
...
...
@@ -3,4 +3,8 @@
height: 100%;
display: flex;
border: 1px solid blue;
.simpleflex-item__pos{
height: 100%;
width: 100%;
}
}
\ No newline at end of file
src/components/layout-element/container/app-simpleflex-container/app-simpleflex-container.vue
浏览文件 @
8deda252
<
template
>
<div
:class=
"curClassName"
:style=
"curStyle
Content
"
>
<div
:class=
"curClassName"
:style=
"curStyle"
>
<template
v-if=
"containerModel.length > 0"
>
<
template
v-for=
"name of containerModel
"
>
<
div
v-for=
"name of containerModel"
class=
"simpleflex-item__pos"
:style=
"getItemPosStyle(name)
"
>
<slot
:name=
"name"
></slot>
</
template
>
</
div
>
</
template
>
</div>
</template>
...
...
@@ -63,38 +63,27 @@ export default class AppSimpleFlexContainer extends Vue {
* 当前容器样式类
*/
get
curClassName
()
{
return
`app-simpleflex-container
${
this
.
name
}
`
;
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
`app-simpleflex-container
${
this
.
name
}
${
layoutModel
.
sysCss
}
`
;
}
/**
* 当前容器样式
*/
get
curStyleContent
()
{
let
boxLayoutPosStyle
=
""
;
const
curLayoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
if
(
curLayoutModel
)
{
const
{
layout
,
flexGrow
}
=
curLayoutModel
;
// 识别FLEX占位属性
if
(
layout
&&
layout
==
'FLEX'
)
{
boxLayoutPosStyle
+=
`'flex-grow':
${
flexGrow
?
flexGrow
:
0
}
;`
;
}
// 识别SIMPLEFLEX占位属性
if
(
layout
==
'SIMPLEFLEX'
)
{
if
(
flexGrow
)
{
boxLayoutPosStyle
+=
`width:
${(
100
/
12
)
*
flexGrow
}
%;height: 100%;`
;
}
else
{
// 简单FLEX布局自适应
boxLayoutPosStyle
+=
`flex-grow:1;min-width:
${(
100
/
12
)}
%;height:100%;`
;
}
}
// 识别边缘布局占位属性
if
(
layout
==
'BORDER'
)
{
boxLayoutPosStyle
+=
`display:flex;`
;
}
* 当前容器样式
*/
get
curStyle
()
{
const
layoutModel
=
this
.
layoutModelDetails
[
this
.
name
];
return
layoutModel
.
getBoxSpacingStyle
();
}
}
return
boxLayoutPosStyle
;
/**
* 获取项布局样式
*/
public
getItemPosStyle
(
name
:
string
)
{
const
layoutModel
=
this
.
layoutModelDetails
[
name
];
return
layoutModel
.
getCommonLayoutStyle
();
}
}
</
script
>
<
style
lang=
'less'
>
...
...
src/model/panel-detail/panel-detail.ts
浏览文件 @
8deda252
...
...
@@ -292,18 +292,33 @@ export class PanelDetailModel {
}
/**
* 获取
布局样式(布局,包含约束内容布局的样式,包含内容
的对齐方式)
* 获取
通用布局样式(SAMPLEFLEX/FLEX)(布局,包含约束内容区布局的样式,包含内容区
的对齐方式)
*
* @return {*}
* @memberof PanelDetailModel
*/
public
get
LayoutStyle
()
{
public
getCommon
LayoutStyle
()
{
const
layoutStyle
=
{};
Object
.
assign
(
layoutStyle
,
this
.
getBoxSelfAlignStyle
());
Object
.
assign
(
layoutStyle
,
this
.
getBoxLayOutStyle
());
Object
.
assign
(
layoutStyle
,
this
.
getBoxSelfAlignStyle
());
return
layoutStyle
;
}
/**
* 获取边缘布局样式
*
* @memberof PanelDetailModel
*/
public
getBorderLayoutStyle
()
{
const
borderLayoutStyle
:
any
=
{
width
:
'100%'
,
height
:
'100%'
};
if
(
this
.
layoutHeight
)
{
Object
.
assign
(
borderLayoutStyle
,
Util
.
getBoxSize
(
"HEIGHT"
,
this
.
heightMode
,
this
.
layoutHeight
));
}
// TODO 合入样式代码
return
borderLayoutStyle
;
}
/**
* 获取自身对齐模式(布局)
*
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录