Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-admin-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
najiu-frontend
najiu-admin-template
Commits
0c2e72d2
Commit
0c2e72d2
authored
Dec 04, 2020
by
vben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update README.md
parent
1bc237d7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
23 deletions
+31
-23
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+1
-0
LayoutHeader.tsx
src/layouts/default/header/LayoutHeader.tsx
+29
-22
scrollBehaviour.ts
src/router/scrollBehaviour.ts
+1
-1
No files found.
CHANGELOG.zh_CN.md
View file @
0c2e72d2
...
...
@@ -14,6 +14,7 @@
### 🎫 Chores
-
首屏 loading 修改
-
升级
`vue`
到
`3.0.4`
### 🐛 Bug Fixes
...
...
src/layouts/default/header/LayoutHeader.tsx
View file @
0c2e72d2
...
...
@@ -3,7 +3,13 @@ import './index.less';
import
type
{
FunctionalComponent
}
from
'
vue
'
;
import
type
{
Component
}
from
'
/@/components/types
'
;
import
{
defineComponent
,
unref
,
computed
,
ref
,
nextTick
}
from
'
vue
'
;
import
{
defineComponent
,
unref
,
computed
,
ref
,
// nextTick
}
from
'
vue
'
;
import
{
Layout
,
Tooltip
,
Badge
}
from
'
ant-design-vue
'
;
import
{
AppLogo
}
from
'
/@/components/Application
'
;
...
...
@@ -24,7 +30,7 @@ import { useModal } from '/@/components/Modal';
import
{
useFullscreen
}
from
'
/@/hooks/web/useFullScreen
'
;
import
{
useTabs
}
from
'
/@/hooks/web/useTabs
'
;
import
{
useWindowSizeFn
}
from
'
/@/hooks/event/useWindowSizeFn
'
;
//
import { useWindowSizeFn } from '/@/hooks/event/useWindowSizeFn';
import
{
useHeaderSetting
}
from
'
/@/hooks/setting/useHeaderSetting
'
;
import
{
useMenuSetting
}
from
'
/@/hooks/setting/useMenuSetting
'
;
import
{
useRootSetting
}
from
'
/@/hooks/setting/useRootSetting
'
;
...
...
@@ -61,9 +67,9 @@ export default defineComponent({
fixed
:
propTypes
.
bool
,
},
setup
(
props
)
{
let
logoEl
:
Element
|
null
|
undefined
;
//
let logoEl: Element | null | undefined;
const
logoWidthRef
=
ref
(
200
);
//
const logoWidthRef = ref(200);
const
logoRef
=
ref
<
ComponentRef
>
(
null
);
const
{
refreshPage
}
=
useTabs
();
const
{
t
}
=
useI18n
();
...
...
@@ -88,22 +94,22 @@ export default defineComponent({
const
[
register
,
{
openModal
}]
=
useModal
();
const
{
toggleFullscreen
,
isFullscreenRef
}
=
useFullscreen
();
useWindowSizeFn
(
()
=>
{
nextTick
(()
=>
{
if
(
!
unref
(
getShowTopMenu
))
return
;
let
width
=
0
;
if
(
!
logoEl
)
{
logoEl
=
unref
(
logoRef
)?.
$el
;
}
else
{
width
+=
logoEl
.
clientWidth
;
}
logoWidthRef
.
value
=
width
+
80
;
});
},
200
,
{
immediate
:
true
}
);
//
useWindowSizeFn(
//
() => {
//
nextTick(() => {
//
if (!unref(getShowTopMenu)) return;
//
let width = 0;
//
if (!logoEl) {
//
logoEl = unref(logoRef)?.$el;
//
} else {
//
width += logoEl.clientWidth;
//
}
//
logoWidthRef.value = width + 80;
//
});
//
},
//
200,
//
{ immediate: true }
//
);
const
headerClass
=
computed
(()
=>
{
const
theme
=
unref
(
getHeaderTheme
);
...
...
@@ -129,7 +135,7 @@ export default defineComponent({
}
function
renderHeaderContent
()
{
const
width
=
unref
(
logoWidthRef
);
//
const width = unref(logoWidthRef);
return
(
<
div
class=
"layout-header__content "
>
{
unref
(
getShowHeaderLogo
)
&&
(
...
...
@@ -146,7 +152,8 @@ export default defineComponent({
)
}
{
unref
(
getShowTopMenu
)
&&
(
<
div
class=
{
[
`layout-header__menu `
]
}
style=
{
{
width
:
`calc(100% - ${width}px)`
}
}
>
// <div class=
{[
`layout-header__menu `
]}
style
=
{{
width
:
`calc(100% - ${width}px)`
}}
>
<
div
class=
{
[
`layout-header__menu `
]
}
>
<
LayoutMenu
isHorizontal=
{
true
}
class=
{
`justify-${unref(getTopMenuAlign)}`
}
...
...
src/router/scrollBehaviour.ts
View file @
0c2e72d2
...
...
@@ -40,7 +40,7 @@ class ScrollQueue {
add
()
{
this
.
promise
=
new
Promise
((
resolve
)
=>
{
this
.
resolve
=
resolve
;
this
.
resolve
=
resolve
as
()
=>
void
;
});
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment