config
This commit is contained in:
parent
3dc2a742f9
commit
53f6771d69
@ -28,7 +28,7 @@
|
||||
created() {
|
||||
|
||||
//设置主题颜色
|
||||
const app_color = this.$CONFIG.COLOR || this.$tool.data.get('APP_COLOR')
|
||||
const app_color = this.$config.COLOR || this.$tool.data.get('APP_COLOR')
|
||||
if(app_color){
|
||||
document.documentElement.style.setProperty('--el-color-primary', app_color);
|
||||
for (let i = 1; i <= 9; i++) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
//业务配置
|
||||
//会合并至this.$CONFIG
|
||||
//会合并至this.$config
|
||||
//生产模式 public/config.js 同名key会覆盖这里的配置从而实现打包后的热更新
|
||||
//为避免和SCUI框架配置混淆建议添加前缀 MY_
|
||||
//全局可使用 this.$CONFIG.MY_KEY 访问
|
||||
//全局可使用 this.$config.MY_KEY 访问
|
||||
|
||||
export default {
|
||||
//是否显示第三方授权登录
|
||||
|
@ -41,10 +41,10 @@
|
||||
layout: this.$store.state.global.layout,
|
||||
menuIsCollapse: this.$store.state.global.menuIsCollapse,
|
||||
layoutTags: this.$store.state.global.layoutTags,
|
||||
lang: this.$tool.data.get('APP_LANG') || this.$CONFIG.LANG,
|
||||
lang: this.$tool.data.get('APP_LANG') || this.$config.LANG,
|
||||
dark: this.$tool.data.get('APP_DARK') || false,
|
||||
colorList: ['#409EFF', '#009688', '#536dfe', '#ff5c93', '#c62f2f', '#fd726d'],
|
||||
colorPrimary: this.$tool.data.get('APP_COLOR') || this.$CONFIG.COLOR || '#409EFF'
|
||||
colorPrimary: this.$tool.data.get('APP_COLOR') || this.$config.COLOR || '#409EFF'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -80,7 +80,7 @@
|
||||
},
|
||||
created() {
|
||||
var menu = this.$router.sc_getMenu()
|
||||
var dashboardRoute = this.treeFind(menu, node => node.path==this.$CONFIG.DASHBOARD_URL)
|
||||
var dashboardRoute = this.treeFind(menu, node => node.path==this.$config.DASHBOARD_URL)
|
||||
if(dashboardRoute){
|
||||
dashboardRoute.fullPath = dashboardRoute.path
|
||||
this.addViewTags(dashboardRoute)
|
||||
|
@ -37,7 +37,7 @@ import * as scIcons from './assets/icons'
|
||||
export default {
|
||||
install(app) {
|
||||
//挂载全局对象
|
||||
app.config.globalProperties.$CONFIG = config;
|
||||
app.config.globalProperties.$config = config;
|
||||
app.config.globalProperties.$tool = tool;
|
||||
app.config.globalProperties.$http = http;
|
||||
app.config.globalProperties.$api = api;
|
||||
|
@ -102,7 +102,7 @@
|
||||
customizing: false,
|
||||
allComps: allComps,
|
||||
selectLayout: [],
|
||||
defaultGrid: this.$CONFIG.DEFAULT_GRID,
|
||||
defaultGrid: this.$config.DEFAULT_GRID,
|
||||
grid: []
|
||||
}
|
||||
},
|
||||
|
@ -72,7 +72,7 @@
|
||||
data() {
|
||||
return {
|
||||
config: {
|
||||
lang: this.$tool.data.get('APP_LANG') || this.$CONFIG.LANG,
|
||||
lang: this.$tool.data.get('APP_LANG') || this.$config.LANG,
|
||||
dark: this.$tool.data.get('APP_DARK') || false
|
||||
},
|
||||
lang: [
|
||||
|
@ -50,9 +50,9 @@
|
||||
return {
|
||||
colorList: ['#409EFF', '#009688', '#536dfe', '#ff5c93', '#c62f2f', '#fd726d'],
|
||||
config: {
|
||||
lang: this.$tool.data.get('APP_LANG') || this.$CONFIG.LANG,
|
||||
lang: this.$tool.data.get('APP_LANG') || this.$config.LANG,
|
||||
dark: this.$tool.data.get('APP_DARK') || false,
|
||||
colorPrimary: this.$tool.data.get('APP_COLOR') || this.$CONFIG.COLOR || '#409EFF',
|
||||
colorPrimary: this.$tool.data.get('APP_COLOR') || this.$config.COLOR || '#409EFF',
|
||||
autoExit: this.$tool.data.get('AUTO_EXIT') || 0,
|
||||
}
|
||||
}
|
||||
|
@ -95,7 +95,7 @@
|
||||
span: 24,
|
||||
options: {
|
||||
remote: {
|
||||
api: `${this.$CONFIG.API_URL}/system/dic/get`,
|
||||
api: `${this.$config.API_URL}/system/dic/get`,
|
||||
data: {name: 'a'}
|
||||
},
|
||||
multiple: true,
|
||||
@ -123,7 +123,7 @@
|
||||
span: 24,
|
||||
options: {
|
||||
remote: {
|
||||
api: `${this.$CONFIG.API_URL}/system/dic/get`,
|
||||
api: `${this.$config.API_URL}/system/dic/get`,
|
||||
data: {name: 'b'}
|
||||
},
|
||||
items:[
|
||||
|
Loading…
Reference in New Issue
Block a user