mirror of
https://gitee.com/chu1204505056/vue-admin-beautiful.git
synced 2025-04-05 19:41:43 +08:00
🚀 Update global configuration and code generator
This commit is contained in:
parent
3c9d625d91
commit
bc7c67c0b2
@ -3,7 +3,7 @@ const bodyParser = require('body-parser')
|
||||
const chalk = require('chalk')
|
||||
const path = require('path')
|
||||
const Mock = require('mockjs')
|
||||
const { baseURL } = require('../src/config/settings')
|
||||
const { baseURL } = require('../src/config')
|
||||
const mockDir = path.join(process.cwd(), 'mock')
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request'
|
||||
import { encryptedData } from '@/utils/encrypt'
|
||||
import { loginRSA, tokenName } from '@/config/settings'
|
||||
import { loginRSA, tokenName } from '@/config'
|
||||
|
||||
export async function login(data) {
|
||||
if (loginRSA) {
|
||||
|
@ -75,7 +75,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { baseURL, tokenName } from '@/config/settings'
|
||||
import { baseURL, tokenName } from '@/config'
|
||||
|
||||
export default {
|
||||
name: 'VabUpload',
|
||||
|
@ -1,5 +0,0 @@
|
||||
/**
|
||||
* @description 导出自定义配置
|
||||
**/
|
||||
const config = {}
|
||||
module.exports = config
|
@ -1,8 +0,0 @@
|
||||
/**
|
||||
* @description 导出默认配置(通用配置|主题配置|网络配置)
|
||||
**/
|
||||
const setting = require('./setting.config')
|
||||
const theme = require('./theme.config')
|
||||
const network = require('./net.config')
|
||||
|
||||
module.exports = { setting, theme, network }
|
7
src/config/index.js
Normal file
7
src/config/index.js
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* @description 3个子配置,通用配置|主题配置|网络配置导出
|
||||
*/
|
||||
const setting = require('./setting.config')
|
||||
const theme = require('./theme.config')
|
||||
const network = require('./net.config')
|
||||
module.exports = Object.assign({}, setting, theme, network)
|
@ -1,9 +1,6 @@
|
||||
/**
|
||||
* @description 3个子配置,通用配置|主题配置|网络配置,建议在当前目录下修改config.js修改配置,会覆盖默认配置,也可以直接修改默认配置
|
||||
* @description 3个子配置,通用配置|主题配置|网络配置
|
||||
*/
|
||||
//默认配置
|
||||
const { setting, theme, network } = require('./default')
|
||||
//自定义配置
|
||||
const config = require('./config')
|
||||
//导出配置(以自定义配置为主)
|
||||
module.exports = Object.assign({}, setting, theme, network, config)
|
||||
const { setting, theme, network } = require('./')
|
||||
module.exports = Object.assign({}, setting, theme, network)
|
||||
|
@ -16,12 +16,7 @@
|
||||
|
||||
<script>
|
||||
import { mapActions, mapGetters } from 'vuex'
|
||||
import {
|
||||
copyright,
|
||||
footerCopyright,
|
||||
keepAliveMaxNum,
|
||||
title,
|
||||
} from '@/config/settings'
|
||||
import { copyright, footerCopyright, keepAliveMaxNum, title } from '@/config'
|
||||
|
||||
export default {
|
||||
name: 'VabAppMain',
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { recordRoute } from '@/config/settings'
|
||||
import { recordRoute } from '@/config'
|
||||
|
||||
export default {
|
||||
name: 'VabAvatar',
|
||||
|
@ -15,7 +15,7 @@
|
||||
</template>
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { logo } from '@/config/settings'
|
||||
import { logo } from '@/config'
|
||||
|
||||
export default {
|
||||
name: 'VabLogo',
|
||||
|
@ -68,7 +68,7 @@
|
||||
<script>
|
||||
import variables from '@/styles/variables.scss'
|
||||
import { mapActions, mapGetters } from 'vuex'
|
||||
import { layout as defaultLayout } from '@/config/settings'
|
||||
import { layout as defaultLayout } from '@/config'
|
||||
export default {
|
||||
name: 'VabThemeBar',
|
||||
data() {
|
||||
|
@ -53,7 +53,7 @@
|
||||
|
||||
<script>
|
||||
import { mapActions, mapGetters } from 'vuex'
|
||||
import { tokenName } from '@/config/settings'
|
||||
import { tokenName } from '@/config'
|
||||
export default {
|
||||
name: 'Layout',
|
||||
data() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { MessageBox } from 'element-ui'
|
||||
import { donation } from '@/config/settings'
|
||||
import { donation } from '@/config'
|
||||
import { dependencies, repository } from '../../package.json'
|
||||
|
||||
if (!!window.ActiveXObject || 'ActiveXObject' in window) {
|
||||
|
@ -7,7 +7,7 @@ import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
import Layout from '@/layouts'
|
||||
import EmptyLayout from '@/layouts/EmptyLayout'
|
||||
import { publicPath, routerMode } from '@/config/settings'
|
||||
import { publicPath, routerMode } from '@/config'
|
||||
|
||||
Vue.use(VueRouter)
|
||||
export const constantRoutes = [
|
||||
|
@ -3,7 +3,7 @@
|
||||
* @description 所有全局配置的状态管理,如无必要请勿修改
|
||||
*/
|
||||
|
||||
import defaultSettings from '@/config/settings'
|
||||
import defaultSettings from '@/config'
|
||||
|
||||
const { tabsBar, logo, layout, header, themeBar } = defaultSettings
|
||||
const theme =
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
setAccessToken,
|
||||
} from '@/utils/accessToken'
|
||||
import { resetRouter } from '@/router'
|
||||
import { title, tokenName } from '@/config/settings'
|
||||
import { title, tokenName } from '@/config'
|
||||
|
||||
const state = {
|
||||
accessToken: getAccessToken(),
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { storage, tokenTableName } from '@/config/settings'
|
||||
import { storage, tokenTableName } from '@/config'
|
||||
|
||||
/**
|
||||
* @author chuzhixin 1204505056@qq.com (不想保留author可删除)
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
import store from '@/store'
|
||||
import { isArray, isString } from '@/utils/validate'
|
||||
import { errorLog } from '@/config/settings'
|
||||
import { errorLog } from '@/config'
|
||||
|
||||
const needErrorLog = errorLog
|
||||
const checkNeed = () => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { title } from '@/config/settings'
|
||||
import { title } from '@/config'
|
||||
|
||||
/**
|
||||
* @author chuzhixin 1204505056@qq.com (不想保留author可删除)
|
||||
|
@ -10,7 +10,7 @@ import {
|
||||
successCode,
|
||||
tokenName,
|
||||
loginInterception,
|
||||
} from '@/config/settings'
|
||||
} from '@/config'
|
||||
import store from '@/store'
|
||||
import qs from 'qs'
|
||||
import router from '@/router'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { loadingText, messageDuration, title } from '@/config/settings'
|
||||
import { loadingText, messageDuration, title } from '@/config'
|
||||
import * as lodash from 'lodash'
|
||||
import { Loading, Message, MessageBox, Notification } from 'element-ui'
|
||||
import store from '@/store'
|
||||
|
@ -115,7 +115,7 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { tokenTableName } from '@/config/settings'
|
||||
import { tokenTableName } from '@/config'
|
||||
import { getRouterList } from '@/api/router'
|
||||
|
||||
export default {
|
||||
|
@ -16,7 +16,7 @@ const {
|
||||
providePlugin,
|
||||
build7z,
|
||||
donation,
|
||||
} = require('./src/config/settings')
|
||||
} = require('./src/config')
|
||||
const { webpackBarName, webpackBanner, donationConsole } = require('zx-layouts')
|
||||
|
||||
if (donation) donationConsole()
|
||||
|
Loading…
x
Reference in New Issue
Block a user