Browse Source

release: update `3.9.6`

i18n
xiaoxian521 2 years ago
parent
commit
cdf4abeb58
  1. 7
      build/index.ts
  2. 4
      build/plugins.ts
  3. 19
      package.json
  4. 767
      pnpm-lock.yaml
  5. 2
      public/serverConfig.json
  6. 3
      src/config/index.ts
  7. 6
      src/layout/components/notice/index.vue
  8. 2
      src/main.ts
  9. 3
      src/router/utils.ts
  10. 1
      src/style/index.scss

7
build/index.ts

@ -27,9 +27,4 @@ const warpperEnv = (envConf: Recordable): ViteEnv => {
return ret;
};
/** 获取环境变量 */
const loadEnv = (): ViteEnv => {
return import.meta.env;
};
export { warpperEnv, loadEnv };
export { warpperEnv };

4
build/plugins.ts

@ -6,11 +6,11 @@ import svgLoader from "vite-svg-loader";
import vueJsx from "@vitejs/plugin-vue-jsx";
import { viteMockServe } from "vite-plugin-mock";
import { configCompressPlugin } from "./compress";
import VueI18n from "@intlify/vite-plugin-vue-i18n";
// import ElementPlus from "unplugin-element-plus/vite";
import { visualizer } from "rollup-plugin-visualizer";
import removeConsole from "vite-plugin-remove-console";
import themePreprocessorPlugin from "@pureadmin/theme";
import VueI18nPlugin from "@intlify/unplugin-vue-i18n/vite";
import DefineOptions from "unplugin-vue-define-options/vite";
import { genScssMultipleScopeVars } from "../src/layout/theme";
@ -24,7 +24,7 @@ export function getPluginsList(
return [
vue(),
// https://github.com/intlify/bundle-tools/tree/main/packages/vite-plugin-vue-i18n
VueI18n({
VueI18nPlugin({
runtimeOnly: true,
compositionOnly: true,
include: [resolve("locales/**")]

19
package.json

@ -1,6 +1,6 @@
{
"name": "pure-admin-thin",
"version": "3.9.5",
"version": "3.9.6",
"private": true,
"scripts": {
"dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
@ -38,14 +38,14 @@
"axios": "^1.2.0",
"dayjs": "^1.11.6",
"echarts": "^5.4.0",
"element-plus": "^2.2.26",
"element-plus": "^2.2.27",
"element-resize-detector": "^1.2.4",
"js-cookie": "^3.0.1",
"mitt": "^3.0.0",
"mockjs": "^1.1.0",
"nprogress": "^0.2.0",
"path": "^0.12.7",
"pinia": "^2.0.27",
"pinia": "^2.0.28",
"qs": "^6.11.0",
"responsive-storage": "^2.1.0",
"vue": "^3.2.45",
@ -59,7 +59,7 @@
"@iconify-icons/ep": "^1.2.7",
"@iconify-icons/ri": "^1.2.3",
"@iconify/vue": "^4.0.0",
"@intlify/vite-plugin-vue-i18n": "^6.0.3",
"@intlify/unplugin-vue-i18n": "^0.8.1",
"@pureadmin/theme": "^3.0.0",
"@types/element-resize-detector": "1.1.3",
"@types/js-cookie": "^3.0.1",
@ -69,9 +69,8 @@
"@types/qs": "^6.9.7",
"@typescript-eslint/eslint-plugin": "^5.42.1",
"@typescript-eslint/parser": "^5.42.1",
"@vitejs/plugin-legacy": "^2.3.1",
"@vitejs/plugin-vue": "^3.2.0",
"@vitejs/plugin-vue-jsx": "^2.1.1",
"@vitejs/plugin-vue": "^4.0.0",
"@vitejs/plugin-vue-jsx": "^3.0.0",
"@vue/eslint-config-prettier": "^7.0.0",
"@vue/eslint-config-typescript": "^11.0.2",
"autoprefixer": "^10.4.13",
@ -101,10 +100,10 @@
"stylelint-order": "^5.0.0",
"svgo": "^3.0.2",
"tailwindcss": "^3.2.4",
"terser": "^5.15.1",
"terser": "^5.16.1",
"typescript": "^4.9.3",
"unplugin-vue-define-options": "^1.0.0",
"vite": "3.1.8",
"unplugin-vue-define-options": "^1.1.1",
"vite": "^4.0.2",
"vite-plugin-cdn-import": "^0.3.5",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-mock": "^2.9.6",

767
pnpm-lock.yaml
File diff suppressed because it is too large
View File

2
public/serverConfig.json

@ -1,5 +1,5 @@
{
"Version": "3.9.5",
"Version": "3.9.6",
"Title": "PureAdmin",
"FixedHeader": true,
"HiddenSideBar": false,

3
src/config/index.ts

@ -1,9 +1,8 @@
import { App } from "vue";
import axios from "axios";
import { loadEnv } from "@build/index";
let config: object = {};
const { VITE_PUBLIC_PATH } = loadEnv();
const { VITE_PUBLIC_PATH } = import.meta.env;
const setConfig = (cfg?: unknown) => {
config = Object.assign(config, cfg);

6
src/layout/components/notice/index.vue

@ -70,14 +70,8 @@ notices.value.map(v => (noticesNum.value += v.list.length));
height: 1px;
}
// notices 3
:deep(.el-tabs__nav-wrap) {
padding: 0 36px 0 36px;
}
// notices 3
:deep(.el-tabs__active-bar) {
margin: 0 36px 0 36px;
}
}
</style>

2
src/main.ts

@ -16,6 +16,8 @@ import { injectResponsiveStorage } from "@/utils/responsive";
import "./style/reset.scss";
// 导入公共样式
import "./style/index.scss";
// 一定要在main.ts中导入tailwind.css,防止vite每次hmr都会请求src/style/index.scss整体css文件导致热更新慢的问题
import "./style/tailwind.css";
import "element-plus/dist/index.css";
// 导入字体图标
import "./assets/iconfont/iconfont.js";

3
src/router/utils.ts

@ -8,7 +8,6 @@ import {
} from "vue-router";
import { router } from "./index";
import { isProxy, toRaw } from "vue";
import { loadEnv } from "../../build";
import { useTimeoutFn } from "@vueuse/core";
import { RouteConfigs } from "@/layout/types";
import {
@ -324,7 +323,7 @@ function addAsyncRoutes(arrRoutes: Array<RouteRecordRaw>) {
/** 获取路由历史模式 https://next.router.vuejs.org/zh/guide/essentials/history-mode.html */
function getHistoryMode(): RouterHistory {
const routerHistory = loadEnv().VITE_ROUTER_HISTORY;
const routerHistory = import.meta.env.VITE_ROUTER_HISTORY;
// len为1 代表只有历史模式 为2 代表历史模式中存在base参数 https://next.router.vuejs.org/zh/api/#%E5%8F%82%E6%95%B0-1
const historyMode = routerHistory.split(",");
const leftMode = historyMode[0];

1
src/style/index.scss

@ -3,7 +3,6 @@
@import "./element-plus.scss";
@import "./sidebar.scss";
@import "./dark.scss";
@import "./tailwind.css";
/* 自定义全局 CssVar */
:root {

Loading…
Cancel
Save