Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-vue-admin
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-vue-admin
Commits
25d43a5f
提交
25d43a5f
authored
11月 24, 2020
作者:
vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: fix topMenu align not work
上级
36734100
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
20 行增加
和
18 行删除
+20
-18
global.less
src/design/global.less
+2
-2
LayoutHeader.tsx
src/layouts/default/header/LayoutHeader.tsx
+16
-14
index.less
src/layouts/default/header/index.less
+2
-2
没有找到文件。
src/design/global.less
浏览文件 @
25d43a5f
...
@@ -26,11 +26,11 @@
...
@@ -26,11 +26,11 @@
}
}
.justify-start {
.justify-start {
justify-content: start;
justify-content:
flex-
start;
}
}
.justify-end {
.justify-end {
justify-content: end;
justify-content:
flex-
end;
}
}
.justify-around {
.justify-around {
...
...
src/layouts/default/header/LayoutHeader.tsx
浏览文件 @
25d43a5f
import
'./index.less'
;
import
'./index.less'
;
import
{
defineComponent
,
unref
,
computed
,
ref
}
from
'vue'
;
import
{
defineComponent
,
unref
,
computed
,
ref
,
nextTick
}
from
'vue'
;
import
{
Layout
,
Tooltip
,
Badge
}
from
'ant-design-vue'
;
import
{
Layout
,
Tooltip
,
Badge
}
from
'ant-design-vue'
;
import
{
AppLogo
}
from
'/@/components/Application'
;
import
{
AppLogo
}
from
'/@/components/Application'
;
...
@@ -39,8 +39,8 @@ export default defineComponent({
...
@@ -39,8 +39,8 @@ export default defineComponent({
setup
()
{
setup
()
{
let
logoEl
:
Element
|
null
;
let
logoEl
:
Element
|
null
;
const
w
idthRef
=
ref
(
200
);
const
logoW
idthRef
=
ref
(
200
);
const
logoRef
=
ref
<
any
>
(
null
);
const
{
refreshPage
}
=
useTabs
();
const
{
refreshPage
}
=
useTabs
();
const
{
getShowTopMenu
,
getShowHeaderTrigger
,
getSplit
,
getTopMenuAlign
}
=
useMenuSetting
();
const
{
getShowTopMenu
,
getShowHeaderTrigger
,
getSplit
,
getTopMenuAlign
}
=
useMenuSetting
();
...
@@ -64,15 +64,17 @@ export default defineComponent({
...
@@ -64,15 +64,17 @@ export default defineComponent({
useWindowSizeFn
(
useWindowSizeFn
(
()
=>
{
()
=>
{
if
(
!
unref
(
getShowTopMenu
))
return
;
nextTick
(()
=>
{
let
width
=
0
;
if
(
!
unref
(
getShowTopMenu
))
return
;
if
(
!
logoEl
)
{
let
width
=
0
;
logoEl
=
document
.
querySelector
(
'.layout-header__logo'
);
if
(
!
logoEl
)
{
}
logoEl
=
logoRef
.
value
.
$el
;
if
(
logoEl
)
{
}
width
+=
logoEl
.
clientWidth
;
if
(
logoEl
)
{
}
width
+=
logoEl
.
clientWidth
;
widthRef
.
value
=
width
+
60
;
}
logoWidthRef
.
value
=
width
+
80
;
});
},
},
200
,
200
,
{
immediate
:
true
}
{
immediate
:
true
}
...
@@ -105,11 +107,11 @@ export default defineComponent({
...
@@ -105,11 +107,11 @@ export default defineComponent({
}
}
function
renderHeaderContent
()
{
function
renderHeaderContent
()
{
const
width
=
unref
(
w
idthRef
);
const
width
=
unref
(
logoW
idthRef
);
return
(
return
(
<
div
class=
"layout-header__content "
>
<
div
class=
"layout-header__content "
>
{
unref
(
getShowHeaderLogo
)
&&
(
{
unref
(
getShowHeaderLogo
)
&&
(
<
AppLogo
class=
{
`layout-header__logo`
}
theme=
{
unref
(
getTheme
)
}
/>
<
AppLogo
class=
{
`layout-header__logo`
}
ref=
{
logoRef
}
theme=
{
unref
(
getTheme
)
}
/>
)
}
)
}
{
unref
(
getShowContent
)
&&
(
{
unref
(
getShowContent
)
&&
(
...
...
src/layouts/default/header/index.less
浏览文件 @
25d43a5f
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
&__left {
&__left {
display: flex;
display: flex;
flex-grow: 1;
//
flex-grow: 1;
align-items: center;
align-items: center;
.layout-trigger {
.layout-trigger {
...
@@ -184,7 +184,7 @@
...
@@ -184,7 +184,7 @@
}
}
&__menu {
&__menu {
margin-left:
20
px;
margin-left:
4
px;
overflow: hidden;
overflow: hidden;
align-items: center;
align-items: center;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论