Browse Source

chore: 同步完整版代码

i18n
xiaoxian521 2 years ago
parent
commit
6dc29c134f
  1. 1
      .eslintignore
  2. 4
      build/plugins.ts
  3. 48
      package.json
  4. 1791
      pnpm-lock.yaml
  5. 2
      public/serverConfig.json
  6. 2
      src/layout/components/notice/index.vue
  7. 4
      src/layout/components/notice/noticeItem.vue
  8. 2
      src/layout/components/panel/index.vue
  9. 8
      src/layout/components/setting/index.vue
  10. 2
      src/layout/components/sidebar/mixNav.vue
  11. 2
      src/layout/components/sidebar/vertical.vue
  12. 12
      src/layout/components/tag/index.vue
  13. 2
      src/layout/index.vue
  14. 2
      src/views/permission/button/index.vue
  15. 4
      src/views/permission/page/index.vue
  16. 4
      tsconfig.json

1
.eslintignore

@ -1,6 +1,7 @@
public
dist
*.d.ts
/src/assets
package.json
.eslintrc.js
.prettierrc.js

4
build/plugins.ts

@ -5,6 +5,7 @@ import { viteBuildInfo } from "./info";
import svgLoader from "vite-svg-loader";
import legacy from "@vitejs/plugin-legacy";
import vueJsx from "@vitejs/plugin-vue-jsx";
import VueMacros from "unplugin-vue-macros/vite";
import { viteMockServe } from "vite-plugin-mock";
import { configCompressPlugin } from "./compress";
import VueI18n from "@intlify/vite-plugin-vue-i18n";
@ -12,7 +13,6 @@ import VueI18n from "@intlify/vite-plugin-vue-i18n";
import { visualizer } from "rollup-plugin-visualizer";
import removeConsole from "vite-plugin-remove-console";
import themePreprocessorPlugin from "@pureadmin/theme";
import DefineOptions from "unplugin-vue-define-options/vite";
import { genScssMultipleScopeVars } from "../src/layout/theme";
export function getPluginsList(
@ -35,7 +35,7 @@ export function getPluginsList(
vueJsx(),
VITE_CDN ? cdn : null,
configCompressPlugin(VITE_COMPRESSION),
DefineOptions(),
VueMacros(),
// 线上环境删除console
removeConsole({ external: ["src/assets/iconfont/iconfont.js"] }),
viteBuildInfo(),

48
package.json

@ -1,6 +1,6 @@
{
"name": "pure-admin-thin",
"version": "3.6.3",
"version": "3.6.4",
"private": true,
"scripts": {
"dev": "NODE_OPTIONS=--max-old-space-size=4096 vite",
@ -40,8 +40,8 @@
"axios": "^1.1.3",
"dayjs": "^1.11.4",
"echarts": "^5.3.3",
"element-plus": "^2.2.16",
"element-resize-detector": "^1.2.3",
"element-plus": "^2.2.20",
"element-resize-detector": "^1.2.4",
"js-cookie": "^3.0.1",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
@ -54,7 +54,7 @@
"qs": "^6.11.0",
"resize-observer-polyfill": "^1.5.1",
"responsive-storage": "^2.1.0",
"vue": "^3.2.40",
"vue": "^3.2.44",
"vue-i18n": "^9.2.2",
"vue-router": "^4.1.6",
"vue-types": "^4.2.1",
@ -66,31 +66,31 @@
"@commitlint/config-conventional": "13.1.0",
"@iconify-icons/ep": "^1.2.7",
"@iconify-icons/ri": "^1.2.3",
"@iconify/vue": "^3.2.1",
"@iconify/vue": "^4.0.0",
"@intlify/vite-plugin-vue-i18n": "^6.0.3",
"@pureadmin/theme": "^2.4.0",
"@types/element-resize-detector": "1.1.3",
"@types/js-cookie": "^3.0.1",
"@types/lodash": "^4.14.180",
"@types/lodash-es": "^4.17.6",
"@types/mockjs": "1.0.3",
"@types/node": "14.14.14",
"@types/mockjs": "^1.0.7",
"@types/node": "^18.11.9",
"@types/nprogress": "0.2.0",
"@types/qs": "^6.9.7",
"@typescript-eslint/eslint-plugin": "^5.10.2",
"@typescript-eslint/parser": "^5.10.2",
"@vitejs/plugin-legacy": "^2.2.0",
"@vitejs/plugin-vue": "^3.1.2",
"@vitejs/plugin-vue-jsx": "^2.0.1",
"@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",
"@vue/eslint-config-prettier": "^7.0.0",
"@vue/eslint-config-typescript": "^10.0.0",
"@vue/runtime-core": "^3.2.40",
"@vue/eslint-config-typescript": "^11.0.2",
"@vue/runtime-core": "^3.2.44",
"autoprefixer": "^10.4.13",
"cloc": "^2.10.0",
"cssnano": "^5.1.14",
"eslint": "^8.8.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^8.4.1",
"eslint-plugin-vue": "^9.7.0",
"font-awesome": "^4.7.0",
"husky": "^7.0.4",
"lint-staged": "11.1.2",
@ -103,26 +103,26 @@
"pretty-quick": "3.1.1",
"rimraf": "3.0.2",
"rollup-plugin-visualizer": "^5.8.3",
"sass": "^1.53.0",
"sass-loader": "^13.0.2",
"sass": "^1.56.1",
"sass-loader": "^13.2.0",
"stylelint": "^14.3.0",
"stylelint-config-html": "^1.0.0",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-recommended": "^6.0.0",
"stylelint-config-standard": "^24.0.0",
"stylelint-config-recommended": "^9.0.0",
"stylelint-config-standard": "^29.0.0",
"stylelint-order": "^5.0.0",
"tailwindcss": "^3.2.3",
"terser": "^5.15.1",
"typescript": "^4.7.4",
"unplugin-vue-define-options": "0.7.3",
"vite": "^3.1.8",
"typescript": "^4.8.4",
"unplugin-vue-macros": "^0.16.2",
"vite": "3.1.8",
"vite-plugin-cdn-import": "^0.3.5",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-mock": "^2.9.6",
"vite-plugin-remove-console": "^1.2.0",
"vite-svg-loader": "^3.6.0",
"vue-eslint-parser": "^8.2.0",
"vue-tsc": "^0.40.13"
"vue-eslint-parser": "^9.1.0",
"vue-tsc": "^1.0.9"
},
"pnpm": {
"peerDependencyRules": {

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

2
public/serverConfig.json

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

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

@ -9,7 +9,7 @@ const dropdownDom = templateRef<ElRef | null>("dropdownDom", null);
const activeName = ref(noticesData[0].name);
const notices = ref(noticesData);
let noticesNum = ref(0);
const noticesNum = ref(0);
notices.value.forEach(notice => {
noticesNum.value += notice.list.length;
});

4
src/layout/components/notice/noticeItem.vue

@ -24,11 +24,11 @@ function hoverTitle() {
function hoverDescription(event, description) {
// currentWidth currentWidth ,
let tempTag = document.createElement("span");
const tempTag = document.createElement("span");
tempTag.innerText = description;
tempTag.className = "getDescriptionWidth";
document.querySelector("body").appendChild(tempTag);
let currentWidth = (
const currentWidth = (
document.querySelector(".getDescriptionWidth") as HTMLSpanElement
).offsetWidth;
document.querySelector(".getDescriptionWidth").remove();

2
src/layout/components/panel/index.vue

@ -3,7 +3,7 @@ import { ref } from "vue";
import { onClickOutside } from "@vueuse/core";
import { emitter } from "@/utils/mitt";
let show = ref<Boolean>(false);
const show = ref<Boolean>(false);
const target = ref(null);
onClickOutside(target, (event: any) => {
if (event.clientX > target.value.offsetLeft) return;

8
src/layout/components/setting/index.vue

@ -54,8 +54,8 @@ const {
/* body添加layout属性,作用于src/style/sidebar.scss */
if (unref(layoutTheme)) {
let layout = unref(layoutTheme).layout;
let theme = unref(layoutTheme).theme;
const layout = unref(layoutTheme).layout;
const theme = unref(layoutTheme).theme;
toggleTheme({
scopeName: `layout-theme-${theme}`
});
@ -119,13 +119,13 @@ const weekChange = (value): void => {
};
const tagsChange = () => {
let showVal = settings.tabsVal;
const showVal = settings.tabsVal;
storageConfigureChange("hideTabs", showVal);
emitter.emit("tagViewsChange", showVal as unknown as string);
};
const multiTagsCacheChange = () => {
let multiTagsCache = settings.multiTagsCache;
const multiTagsCache = settings.multiTagsCache;
storageConfigureChange("multiTagsCache", multiTagsCache);
useMultiTagsStoreHook().multiTagsCacheChange(multiTagsCache);
};

2
src/layout/components/sidebar/mixNav.vue

@ -11,7 +11,7 @@ import { usePermissionStoreHook } from "@/store/modules/permission";
import globalization from "@/assets/svg/globalization.svg?component";
const menuRef = ref();
let defaultActive = ref(null);
const defaultActive = ref(null);
const { t, route, locale, translationCh, translationEn } =
useTranslationLang(menuRef);

2
src/layout/components/sidebar/vertical.vue

@ -19,7 +19,7 @@ const showLogo = ref(
const { routers, device, pureApp, isCollapse, menuSelect, toggleSideBar } =
useNav();
let subMenuData = ref([]);
const subMenuData = ref([]);
const menuData = computed(() => {
return pureApp.layout === "mix" && device.value !== "mobile"

12
src/layout/components/tag/index.vue

@ -42,7 +42,7 @@ const {
const tabDom = ref();
const containerDom = ref();
const scrollbarDom = ref();
let isShowArrow = ref(false);
const isShowArrow = ref(false);
const { isFullscreen, toggle } = useFullscreen();
const dynamicTagView = () => {
@ -129,7 +129,7 @@ function dynamicRouteTag(value: string, parentPath: string): void {
function concatPath(arr: object[], value: string, parentPath: string) {
if (!hasValue) {
arr.forEach((arrItem: any) => {
let pathConcat = parentPath + arrItem.path;
const pathConcat = parentPath + arrItem.path;
if (arrItem.path === value || pathConcat === value) {
useMultiTagsStoreHook().handleTags("push", {
path: value,
@ -160,7 +160,7 @@ function onFresh() {
function deleteDynamicTag(obj: any, current: any, tag?: string) {
//
let delAliveRouteList = [];
let valueIndex: number = multiTags.value.findIndex((item: any) => {
const valueIndex: number = multiTags.value.findIndex((item: any) => {
if (item.query) {
if (item.path === obj.path) {
return item.query === obj.query;
@ -199,7 +199,7 @@ function deleteDynamicTag(obj: any, current: any, tag?: string) {
//
spliceRoute(valueIndex, 1);
}
let newRoute = useMultiTagsStoreHook().handleTags("slice");
const newRoute = useMultiTagsStoreHook().handleTags("slice");
if (current === route.path) {
//
tag
@ -339,8 +339,8 @@ function showMenuModel(
query: object = {},
refresh = false
) {
let allRoute = multiTags.value;
let routeLength = multiTags.value.length;
const allRoute = multiTags.value;
const routeLength = multiTags.value.length;
let currentIndex = -1;
if (isEmpty(query)) {
currentIndex = allRoute.findIndex(v => v.path === currentPath);

2
src/layout/index.vue

@ -70,7 +70,7 @@ let isAutoCloseSidebar = true;
//
emitter.on("resize", ({ detail }) => {
if (isMobile) return;
let { width } = detail;
const { width } = detail;
width <= 760 ? setTheme("vertical") : setTheme(useAppStoreHook().layout);
/** width app-wrapper
* 0 < width <= 760 隐藏侧边栏

2
src/views/permission/button/index.vue

@ -6,7 +6,7 @@ defineOptions({
name: "PermissionButton"
});
let elStyle = computed((): CSSProperties => {
const elStyle = computed((): CSSProperties => {
return {
width: "85vw",
justifyContent: "start"

4
src/views/permission/page/index.vue

@ -8,14 +8,14 @@ defineOptions({
name: "PermissionPage"
});
let elStyle = computed((): CSSProperties => {
const elStyle = computed((): CSSProperties => {
return {
width: "85vw",
justifyContent: "start"
};
});
let username = ref(useUserStoreHook()?.username);
const username = ref(useUserStoreHook()?.username);
const options = [
{

4
tsconfig.json

@ -29,8 +29,8 @@
"vite/client",
"element-plus/global",
"@pureadmin/table/volar",
"unplugin-vue-define-options",
"@pureadmin/descriptions/volar"
"@pureadmin/descriptions/volar",
"unplugin-vue-macros/macros-global"
],
"typeRoots": ["./node_modules/@types/", "./types"]
},

Loading…
Cancel
Save