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