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
aafbb052
Commit
aafbb052
authored
Dec 21, 2020
by
vben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: fix types
parent
5eecec03
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
8 deletions
+23
-8
useEffect.ts
src/hooks/core/useEffect.ts
+16
-0
SettingFooter.vue
src/layouts/default/setting/components/SettingFooter.vue
+1
-1
handler.ts
src/layouts/default/setting/handler.ts
+1
-1
tabChange.ts
src/logics/mitt/tabChange.ts
+1
-3
index.ts
src/logics/theme/index.ts
+1
-1
types.d.ts
src/router/types.d.ts
+2
-1
App.ts
src/setup/App.ts
+1
-1
No files found.
src/hooks/core/useEffect.ts
0 → 100644
View file @
aafbb052
import
{
WatchOptions
}
from
'
vue
'
;
import
{
watch
}
from
'
vue
'
;
import
{
isFunction
}
from
'
/@/utils/is
'
;
export
const
useEffect
=
(
effectHandler
:
Fn
,
dependencies
:
any
[])
=>
{
return
watch
(
dependencies
,
(
changedDependencies
,
prevDependencies
,
onCleanUp
)
=>
{
const
effectCleaner
=
effectHandler
(
changedDependencies
,
prevDependencies
);
if
(
isFunction
(
effectCleaner
))
{
onCleanUp
(
effectCleaner
);
}
},
{
immediate
:
true
,
deep
:
true
}
as
WatchOptions
);
};
src/layouts/default/setting/components/SettingFooter.vue
View file @
aafbb052
...
...
@@ -27,7 +27,7 @@
import
{
useMessage
}
from
'
/@/hooks/web/useMessage
'
;
import
{
useCopyToClipboard
}
from
'
/@/hooks/web/useCopyToClipboard
'
;
import
{
useRootSetting
}
from
'
/@/hooks/setting/useRootSetting
'
;
import
{
updateColorWeak
,
updateGrayMode
}
from
'
/@/
setup
/theme
'
;
import
{
updateColorWeak
,
updateGrayMode
}
from
'
/@/
logics
/theme
'
;
export
default
defineComponent
({
name
:
'
SettingFooter
'
,
...
...
src/layouts/default/setting/handler.ts
View file @
aafbb052
...
...
@@ -4,7 +4,7 @@ import {
updateGrayMode
,
updateHeaderBgColor
,
updateSidebarBgColor
,
}
from
'
/@/
setup
/theme
'
;
}
from
'
/@/
logics
/theme
'
;
import
{
appStore
}
from
'
/@/store/modules/app
'
;
import
{
ProjectConfig
}
from
'
/@/types/config
'
;
...
...
src/logics/mitt/tabChange.ts
View file @
aafbb052
...
...
@@ -23,7 +23,5 @@ export function listenerLastChangeTab(
immediate
=
true
)
{
mitt
.
on
(
key
,
callback
);
if
(
immediate
)
{
callback
(
lastChangeTab
);
}
immediate
&&
callback
(
lastChangeTab
);
}
src/
setup
/theme/index.ts
→
src/
logics
/theme/index.ts
View file @
aafbb052
...
...
@@ -24,7 +24,7 @@ function toggleClass(flag: boolean, clsName: string, target?: HTMLElement) {
/**
* Change the status of the project's color weakness mode
* @param
gray
* @param
colorWeak
*/
export
const
updateColorWeak
=
(
colorWeak
:
boolean
)
=>
{
toggleClass
(
colorWeak
,
'
color-weak
'
,
document
.
documentElement
);
...
...
src/router/types.d.ts
View file @
aafbb052
...
...
@@ -14,7 +14,8 @@ export interface RouteMeta {
affix
?:
boolean
;
// icon on tab
icon
?:
string
;
// Jump address
frameSrc
?:
string
;
// current page transition
transitionName
?:
string
;
...
...
src/setup/App.ts
View file @
aafbb052
...
...
@@ -17,7 +17,7 @@ import {
updateColorWeak
,
updateHeaderBgColor
,
updateSidebarBgColor
,
}
from
'
/@/
setup
/theme
'
;
}
from
'
/@/
logics
/theme
'
;
import
{
appStore
}
from
'
/@/store/modules/app
'
;
import
{
deepMerge
}
from
'
/@/utils
'
;
...
...
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