forked from aixan/RuoYi-Vue
		
	修改主题样式本地读取
This commit is contained in:
		
							
								
								
									
										1
									
								
								ruoyi-ui/public/styles/theme-chalk/index.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								ruoyi-ui/public/styles/theme-chalk/index.css
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @@ -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 { | |||||||
|       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 { | |||||||
|       } |       } | ||||||
|  |  | ||||||
|       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')) | ||||||
|   | |||||||
| @@ -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)) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 RuoYi
					RuoYi