diff --git a/.env b/.env index 0c6e7c815ee9a660337942204365738d3308a70b..e911e7215ab4e826bdb0471d17bf283f900253b6 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ VUE_APP_PUBLIC_PATH=/ -VUE_APP_NAME=Admin +VUE_APP_NAME=Karote VUE_APP_ROUTES_KEY=admin.routes VUE_APP_PERMISSIONS_KEY=admin.permissions VUE_APP_ROLES_KEY=admin.roles diff --git a/src/assets/img/logo.png b/src/assets/img/logo.png deleted file mode 100644 index 62bfe39aaad240dc0daa7dd5f48a80d1feedc002..0000000000000000000000000000000000000000 Binary files a/src/assets/img/logo.png and /dev/null differ diff --git a/src/assets/img/preview-nine.png b/src/assets/img/preview-nine.png deleted file mode 100644 index d63b00b2e5615539e969b4e90eee2544a1426b38..0000000000000000000000000000000000000000 Binary files a/src/assets/img/preview-nine.png and /dev/null differ diff --git a/src/assets/img/preview.png b/src/assets/img/preview.png deleted file mode 100644 index 21fffb5ac60c2bbd6abb0a5cf6b22c115060da23..0000000000000000000000000000000000000000 Binary files a/src/assets/img/preview.png and /dev/null differ diff --git a/src/config/global.config.js b/src/config/global.config.js index 2b0b10e70fe2eaebbdc593041469b2583eaa4cf9..f3e1abd57a0349ffaa6e6eeca00e3b0691c805c8 100644 --- a/src/config/global.config.js +++ b/src/config/global.config.js @@ -1,124 +1,113 @@ // 全部的配置数据 const globalConfig = { - //支持语言 - langs: [ - {key: 'zh_CN', name: '简体中文', alias: '简体'}, - {key: 'en_US', name: 'English', alias: 'English'} - ], //调色板 颜色 - palettes: ["#f5222d", "#fa541c", "#fadb14", "#3eaf7c", "#13c2c2", "#1890ff", "#722ed1", "#eb2f96"], + palettes: ['#f5222d', '#fa541c', '#fadb14', '#3eaf7c', '#13c2c2', '#1890ff', '#722ed1', '#eb2f96'], //tab出入动画效果 animates: { preset: [ //参考Animate.css 各种特效的css命名,default对应没有 direction的情况 - { name: "back", alias: "渐近", directions: ["Left", "Right"] }, - { name: "bounce", alias: "弹跳", directions: ["Left", "Right", "Default"] }, + { name: 'back', alias: '渐近', directions: ['Left', 'Right'] }, + { name: 'bounce', alias: '弹跳', directions: ['Left', 'Right', 'Default'] }, { - name: "fade", - alias: "淡化", - directions: ["Left", "LeftBig", "Right", "RightBig", "Default"], + name: 'fade', + alias: '淡化', + directions: ['Left', 'LeftBig', 'Right', 'RightBig', 'Default'], }, - { name: "lightSpeed", alias: "光速", directions: ["Left", "Right"] }, - { name: "slide", alias: "滑动", directions: ["Left", "Right"] }, + { name: 'lightSpeed', alias: '光速', directions: ['Left', 'Right'] }, + { name: 'slide', alias: '滑动', directions: ['Left', 'Right'] }, ], }, //当前主色调 + 3个功能颜色 + 3个模式菜单颜色 primary: { - color: "#3eaf7c", - warning: "#faad14", - success: "#52c41a", - error: "#f5222d", + color: '#3eaf7c', + warning: '#faad14', + success: '#52c41a', + error: '#f5222d', light: { - menuColors: ["#000c17", "#001529", "#002140"], + menuColors: ['#000c17', '#001529', '#002140'], }, dark: { - menuColors: ["#000c17", "#001529", "#002140"], + menuColors: ['#000c17', '#001529', '#002140'], }, night: { - menuColors: ["#151515", "#1f1f1f", "#1e1e1e"], + menuColors: ['#151515', '#1f1f1f', '#1e1e1e'], }, }, //主题 theme: { mode: { - DARK: "dark", - LIGHT: "light", - NIGHT: "night", + DARK: 'dark', + LIGHT: 'light', + NIGHT: 'night', }, dark: { - "layout-body-background": "#f0f2f5", - "body-background": "#fff", - "component-background": "#fff", - "heading-color": "rgba(0, 0, 0, 0.85)", - "text-color": "rgba(0, 0, 0, 0.65)", - "text-color-inverse": "#fff", - "text-color-secondary": "rgba(0, 0, 0, 0.45)", - "shadow-color": "rgba(0, 0, 0, 0.15)", - "border-color-split": "#f0f0f0", - "background-color-light": "#fafafa", - "background-color-base": "#f5f5f5", - "table-selected-row-bg": "#fafafa", - "table-expanded-row-bg": "#fbfbfb", - "checkbox-check-color": "#fff", - "disabled-color": "rgba(0, 0, 0, 0.25)", - "menu-dark-color": "rgba(254, 254, 254, 0.65)", - "menu-dark-highlight-color": "#fefefe", - "menu-dark-arrow-color": "#fefefe", - "btn-primary-color": "#fff", + 'layout-body-background': '#f0f2f5', + 'body-background': '#fff', + 'component-background': '#fff', + 'heading-color': 'rgba(0, 0, 0, 0.85)', + 'text-color': 'rgba(0, 0, 0, 0.65)', + 'text-color-inverse': '#fff', + 'text-color-secondary': 'rgba(0, 0, 0, 0.45)', + 'shadow-color': 'rgba(0, 0, 0, 0.15)', + 'border-color-split': '#f0f0f0', + 'background-color-light': '#fafafa', + 'background-color-base': '#f5f5f5', + 'table-selected-row-bg': '#fafafa', + 'table-expanded-row-bg': '#fbfbfb', + 'checkbox-check-color': '#fff', + 'disabled-color': 'rgba(0, 0, 0, 0.25)', + 'menu-dark-color': 'rgba(254, 254, 254, 0.65)', + 'menu-dark-highlight-color': '#fefefe', + 'menu-dark-arrow-color': '#fefefe', + 'btn-primary-color': '#fff', }, light: { - "layout-body-background": "#f0f2f5", - "body-background": "#fff", - "component-background": "#fff", - "heading-color": "rgba(0, 0, 0, 0.85)", - "text-color": "rgba(0, 0, 0, 0.65)", - "text-color-inverse": "#fff", - "text-color-secondary": "rgba(0, 0, 0, 0.45)", - "shadow-color": "rgba(0, 0, 0, 0.15)", - "border-color-split": "#f0f0f0", - "background-color-light": "#fafafa", - "background-color-base": "#f5f5f5", - "table-selected-row-bg": "#fafafa", - "table-expanded-row-bg": "#fbfbfb", - "checkbox-check-color": "#fff", - "disabled-color": "rgba(0, 0, 0, 0.25)", - "menu-dark-color": "rgba(1, 1, 1, 0.65)", - "menu-dark-highlight-color": "#fefefe", - "menu-dark-arrow-color": "#fefefe", - "btn-primary-color": "#fff", + 'layout-body-background': '#f0f2f5', + 'body-background': '#fff', + 'component-background': '#fff', + 'heading-color': 'rgba(0, 0, 0, 0.85)', + 'text-color': 'rgba(0, 0, 0, 0.65)', + 'text-color-inverse': '#fff', + 'text-color-secondary': 'rgba(0, 0, 0, 0.45)', + 'shadow-color': 'rgba(0, 0, 0, 0.15)', + 'border-color-split': '#f0f0f0', + 'background-color-light': '#fafafa', + 'background-color-base': '#f5f5f5', + 'table-selected-row-bg': '#fafafa', + 'table-expanded-row-bg': '#fbfbfb', + 'checkbox-check-color': '#fff', + 'disabled-color': 'rgba(0, 0, 0, 0.25)', + 'menu-dark-color': 'rgba(1, 1, 1, 0.65)', + 'menu-dark-highlight-color': '#fefefe', + 'menu-dark-arrow-color': '#fefefe', + 'btn-primary-color': '#fff', }, night: { - "layout-body-background": "#000", - "body-background": "#141414", - "component-background": "#141414", - "heading-color": "rgba(255, 255, 255, 0.85)", - "text-color": "rgba(255, 255, 255, 0.85)", - "text-color-inverse": "#141414", - "text-color-secondary": "rgba(255, 255, 255, 0.45)", - "shadow-color": "rgba(255, 255, 255, 0.15)", - "border-color-split": "#303030", - "background-color-light": "#ffffff0a", - "background-color-base": "#2a2a2a", - "table-selected-row-bg": "#ffffff0a", - "table-expanded-row-bg": "#ffffff0b", - "checkbox-check-color": "#141414", - "disabled-color": "rgba(255, 255, 255, 0.25)", - "menu-dark-color": "rgba(254, 254, 254, 0.65)", - "menu-dark-highlight-color": "#fefefe", - "menu-dark-arrow-color": "#fefefe", - "btn-primary-color": "#141414", + 'layout-body-background': '#000', + 'body-background': '#141414', + 'component-background': '#141414', + 'heading-color': 'rgba(255, 255, 255, 0.85)', + 'text-color': 'rgba(255, 255, 255, 0.85)', + 'text-color-inverse': '#141414', + 'text-color-secondary': 'rgba(255, 255, 255, 0.45)', + 'shadow-color': 'rgba(255, 255, 255, 0.15)', + 'border-color-split': '#303030', + 'background-color-light': '#ffffff0a', + 'background-color-base': '#2a2a2a', + 'table-selected-row-bg': '#ffffff0a', + 'table-expanded-row-bg': '#ffffff0b', + 'checkbox-check-color': '#141414', + 'disabled-color': 'rgba(255, 255, 255, 0.25)', + 'menu-dark-color': 'rgba(254, 254, 254, 0.65)', + 'menu-dark-highlight-color': '#fefefe', + 'menu-dark-arrow-color': '#fefefe', + 'btn-primary-color': '#141414', }, }, layout: { - SIDE: "side", - HEAD: "head", + SIDE: 'side', + HEAD: 'head', }, }; module.exports = globalConfig; - - - - - - \ No newline at end of file diff --git a/src/main.js b/src/main.js index f19815d1867d1e34d6129736aa422e00a78fcf4d..32eb188d903c89e521a18137f8e66d968a603293 100644 --- a/src/main.js +++ b/src/main.js @@ -8,17 +8,16 @@ import VueI18n from 'vue-i18n'; import { accountModule, settingModule } from './pages/frame/store'; import globalStore from '@/store'; import App from './App.vue'; -import 'tailwindcss/tailwind.css'; - -import 'animate.css/source/animate.css'; -import './theme/index.less'; import Plugins from './plugins'; - import { loadRoutes, loadGuards, setAppOptions } from './utils/routerUtil'; import guards from './router/guards'; import { loadResponseInterceptor } from './utils/requestUtil'; +import langUtils from '@/utils/langUtils'; + +import 'tailwindcss/tailwind.css'; +import 'animate.css/source/animate.css'; +import './theme/index.less'; -// import '@/mock'; import 'moment/locale/zh-cn'; //设置为非生产提示 @@ -40,13 +39,12 @@ const router = new Router(options); //装载vue-i18n控件 如果语言优先级 请直接修改这里localeLang和fallbackLang Vue.use(VueI18n); -//defalt 'CN' -const localeLang = store.state.settingModule.lang; -//default'EN' -const fallbackLang = store.state.settingModule.fallbackLang; + +const localeLang = langUtils.get(); + const i18n = new VueI18n({ locale: localeLang, - fallbackLocale: fallbackLang, + fallbackLocale: langUtils.fallbackLocale, silentFallbackWarn: true, }); diff --git a/src/pages/frame/components/header/LayoutTopHeaderLang.vue b/src/pages/frame/components/header/LayoutTopHeaderLang.vue index 1aabba52913c0100d461de8472fc856a8a47ffcc..1f3ce65a82ec81876e79ff1f9092a04fac1cec0f 100644 --- a/src/pages/frame/components/header/LayoutTopHeaderLang.vue +++ b/src/pages/frame/components/header/LayoutTopHeaderLang.vue @@ -1,7 +1,7 @@ diff --git a/src/pages/frame/view/template/BlankTemplateView.vue b/src/pages/frame/view/template/BlankTemplateView.vue index 203dceb385ba3943b45dc8bb3303235cdc3d90a6..310611e241b8abee31c7482511877bdd104b0072 100644 --- a/src/pages/frame/view/template/BlankTemplateView.vue +++ b/src/pages/frame/view/template/BlankTemplateView.vue @@ -1,22 +1,14 @@ diff --git a/src/pages/frame/view/template/PageTemplateView.vue b/src/pages/frame/view/template/PageTemplateView.vue index 10cfeb9a93e72fa1fa67fa02be19a4125318b2f8..524b0194147f2309a0f89046d2e7f97a1c7e4fbf 100644 --- a/src/pages/frame/view/template/PageTemplateView.vue +++ b/src/pages/frame/view/template/PageTemplateView.vue @@ -1,29 +1,26 @@ -