Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sts网站
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
liyang
sts网站
Commits
5a1e7bae
Commit
5a1e7bae
authored
Dec 07, 2024
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改主题样式本地读取
parent
1810f304
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
172 additions
and
174 deletions
+172
-174
index.css
ruoyi-ui/public/styles/theme-chalk/index.css
+1
-0
index.vue
ruoyi-ui/src/components/ThemePicker/index.vue
+170
-173
permission.js
ruoyi-ui/src/permission.js
+1
-1
No files found.
ruoyi-ui/public/styles/theme-chalk/index.css
0 → 100644
View file @
5a1e7bae
This source diff could not be displayed because it is too large. You can
view the blob
instead.
ruoyi-ui/src/components/ThemePicker/index.vue
View file @
5a1e7bae
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
</
template
>
</
template
>
<
script
>
<
script
>
const
version
=
require
(
'element-ui/package.json'
).
version
// element-ui version from node_modules
const
ORIGINAL_THEME
=
'#409EFF'
// default color
const
ORIGINAL_THEME
=
'#409EFF'
// default color
export
default
{
export
default
{
...
@@ -39,7 +38,6 @@ export default {
...
@@ -39,7 +38,6 @@ export default {
this
.
setTheme
(
this
.
defaultTheme
)
this
.
setTheme
(
this
.
defaultTheme
)
}
}
},
},
methods
:
{
methods
:
{
async
setTheme
(
val
)
{
async
setTheme
(
val
)
{
const
oldVal
=
this
.
chalk
?
this
.
theme
:
ORIGINAL_THEME
const
oldVal
=
this
.
chalk
?
this
.
theme
:
ORIGINAL_THEME
...
@@ -63,12 +61,11 @@ export default {
...
@@ -63,12 +61,11 @@ export default {
}
}
if
(
!
this
.
chalk
)
{
if
(
!
this
.
chalk
)
{
const
url
=
`
https://unpkg.com/element-ui@
${
version
}
/lib/theme-chalk/index.css`
const
url
=
`
/styles/theme-chalk/index.css`
await
this
.
getCSSString
(
url
,
'chalk'
)
await
this
.
getCSSString
(
url
,
'chalk'
)
}
}
const
chalkHandler
=
getHandler
(
'chalk'
,
'chalk-style'
)
const
chalkHandler
=
getHandler
(
'chalk'
,
'chalk-style'
)
chalkHandler
()
chalkHandler
()
const
styles
=
[].
slice
.
call
(
document
.
querySelectorAll
(
'style'
))
const
styles
=
[].
slice
.
call
(
document
.
querySelectorAll
(
'style'
))
...
...
ruoyi-ui/src/permission.js
View file @
5a1e7bae
...
@@ -9,7 +9,7 @@ import { isRelogin } from '@/utils/request'
...
@@ -9,7 +9,7 @@ import { isRelogin } from '@/utils/request'
NProgress
.
configure
({
showSpinner
:
false
})
NProgress
.
configure
({
showSpinner
:
false
})
const
whiteList
=
[
'/login'
,
'/register'
,
'/register*'
,
'/register/*'
]
const
whiteList
=
[
'/login'
,
'/register'
]
const
isWhiteList
=
(
path
)
=>
{
const
isWhiteList
=
(
path
)
=>
{
return
whiteList
.
some
(
pattern
=>
isPathMatch
(
pattern
,
path
))
return
whiteList
.
some
(
pattern
=>
isPathMatch
(
pattern
,
path
))
...
...
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