Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wangxiaolu-sfa-ui
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
sfa
wangxiaolu-sfa-ui
Commits
c89c2e22
提交
c89c2e22
authored
8月 25, 2025
作者:
lidongxu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
style(commonmenu): 样式:调整首页常用菜单样式,超出范围垂直滚动
上级
cef7f318
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
74 行增加
和
61 行删除
+74
-61
index.scss
src/assets/styles/index.scss
+13
-15
index.vue
src/components/CommonMenu/index.vue
+26
-6
AppMain.vue
src/layout/components/AppMain.vue
+0
-4
index.vue
src/layout/index.vue
+35
-35
index.vue
src/views/index.vue
+0
-1
没有找到文件。
src/assets/styles/index.scss
浏览文件 @
c89c2e22
...
...
@@ -125,24 +125,21 @@ aside {
// 全局样式
// 容器
.app-container
{
flex
:
1
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
padding
:
20px
;
padding
:
30px
;
height
:
100%
;
// 内容区域
>
.container
{
width
:
100%
;
height
:
100%
;
background-color
:
var
(
--
el-bg-color-overlay
);
padding
:
20px
;
}
}
.components-container
{
margin
:
30px
50px
;
position
:
relative
;
}
//
.components-container {
//
margin: 30px 50px;
//
position: relative;
//
}
.pagination-container
{
margin-top
:
30px
;
...
...
@@ -197,9 +194,9 @@ aside {
}
// 分割线调整宽度线条
.splitpanes--vertical
>
.splitpanes__splitter
{
width
:
2px
;
/* 调整粗细 */
background
:
#ddd
;
/* 可选:修改颜色 */
.splitpanes--vertical
>
.splitpanes__splitter
{
width
:
2px
;
/* 调整粗细 */
background
:
#ddd
;
/* 可选:修改颜色 */
}
\ No newline at end of file
src/components/CommonMenu/index.vue
浏览文件 @
c89c2e22
<
template
>
<el-row
:gutter=
"20"
>
<el-col
:span=
"24"
>
<el-row>
<el-col>
<el-card
shadow=
"never"
>
<div
slot=
"header"
class=
"el-card__header"
>
...
...
@@ -14,6 +14,7 @@
自定义
</el-button>
</div>
<!-- -->
<div
class=
"el-card__body"
>
<div
v-for=
"o in commonMenuList"
class=
"item"
>
...
...
@@ -34,7 +35,8 @@
</div>
<el-dialog
title=
"编辑常用菜单"
v-model=
"visible"
draggable
overflow
>
draggable
overflow
>
<el-transfer
ref=
"myTransfer"
v-model=
"selectList"
:data=
"menuList"
...
...
@@ -89,9 +91,14 @@ const rightChange = (val) => {
<
style
scoped
lang=
"scss"
>
.el-row
{
height
:
100%
;
.el-col
{
height
:
100%
;
.el-card
{
margin-top
:
20px
;
width
:
100%
;
height
:
100%
;
.el-card__header
{
.custom
{
...
...
@@ -100,13 +107,23 @@ const rightChange = (val) => {
}
}
/* 内部有个额外的 div */
::v-deep
(
.el-card__body
)
{
max-height
:
100%
;
display
:
flex
;
flex-direction
:
column
;
}
/* 当前页面的标签样式 */
.el-card__body
{
padding-left
:
15px
!
important
;
display
:
flex
;
flex-wrap
:
wrap
;
flex-direction
:
row
;
justify-content
:
flex-start
;
align-items
:
flex-start
;
gap
:
20px
;
max-height
:
100%
;
overflow-y
:
auto
;
.item
{
display
:
inline-block
;
...
...
@@ -195,4 +212,7 @@ const rightChange = (val) => {
flex-direction
:
column
;
}
}
}
}
</
style
>
src/layout/components/AppMain.vue
浏览文件 @
c89c2e22
...
...
@@ -39,12 +39,8 @@ function addIframe() {
<
style
lang=
"scss"
scoped
>
.app-main
{
/* 50= navbar 50 */
min-height
:
calc
(
100vh
-
50px
);
width
:
100%
;
background-color
:
var
(
--
el-bg-color
);
display
:
flex
;
flex-direction
:
column
;
}
</
style
>
...
...
src/layout/index.vue
浏览文件 @
c89c2e22
...
...
@@ -106,22 +106,21 @@ function setLayout() {
transition
:
width
0
.28s
;
}
.app-main
{
// 头部固定菜单高度 50px
height
:
calc
(
100vh
-
50px
);
}
// 开启头部固定以后,main的高度需要设置为100vh
.fixed-header
+
.app-main
{
min-
height
:
100vh
;
height
:
100vh
;
padding-top
:
50px
;
}
// 有头部标签导航时
.hasTagsView
{
.app-main
{
/* 84 = navbar + tags-view = 50 + 34 */
// min-height: calc(100vh - 84px);
min-height
:
100vh
;
}
.fixed-header
+
.app-main
{
height
:
100vh
;
padding-top
:
84px
;
}
}
...
...
@@ -140,31 +139,31 @@ function setLayout() {
}
// 有些页面高度固定就是 100 vh - 头部高度作为可视区域
// 例如:小 BI 分析中的商品管理页面,中间可用区域固定高度,不能撑开整个网页滚动
// 所以要动态计算高度
::v-deep
()
{
// 无头部固定,无头部 Tags-view
.client-fix-height
{
// 头部导航 50,上下内边距 20
height
:
calc
(
100vh
-
50px
-
40px
);
}
// 头部固定时
.fixed-header
+
.app-main
{
.client-fix-height
{
height
:
calc
(
100vh
-
50px
-
40px
)
!
important
;
}
}
// 有头部标签时
.hasTagsView
{
.fixed-header
+
.app-main
{
.client-fix-height
{
height
:
calc
(
100vh
-
50px
-
34px
-
40px
)
!
important
;
}
}
}
}
//
//
有些页面高度固定就是 100 vh - 头部高度作为可视区域
//
//
例如:小 BI 分析中的商品管理页面,中间可用区域固定高度,不能撑开整个网页滚动
//
//
所以要动态计算高度
//
::v-deep() {
//
// 无头部固定,无头部 Tags-view
//
.client-fix-height {
//
// 头部导航 50,上下内边距 20
//
height: calc(100vh - 50px - 40px);
//
}
//
// 头部固定时
//
.fixed-header+.app-main {
//
.client-fix-height {
//
height: calc(100vh - 50px - 40px) !important;
//
}
//
}
//
// 有头部标签时
//
.hasTagsView {
//
.fixed-header+.app-main {
//
.client-fix-height {
//
height: calc(100vh - 50px - 34px - 40px) !important;
//
}
//
}
//
}
//
}
</
style
>
\ No newline at end of file
src/views/index.vue
浏览文件 @
c89c2e22
...
...
@@ -72,7 +72,6 @@ const handleSetLineChartData = (type) => {
<
style
lang=
"scss"
scoped
>
.app-container
{
padding
:
20px
;
>
div
{
padding
:
0
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论