mirror of
				https://github.com/pure-admin/vue-pure-admin.git
				synced 2025-11-03 13:44:47 +08:00 
			
		
		
		
	Merge branch 'main' into gitee
This commit is contained in:
		
						commit
						013ae275de
					
				
							
								
								
									
										2
									
								
								.github/workflows/linter.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/linter.yml
									
									
									
									
										vendored
									
									
								
							@ -58,7 +58,7 @@ jobs:
 | 
			
		||||
 | 
			
		||||
      - name: Build
 | 
			
		||||
        run: |
 | 
			
		||||
          pnpm install
 | 
			
		||||
          pnpm install --no-frozen-lockfile
 | 
			
		||||
          pnpm lint
 | 
			
		||||
          pnpm typecheck
 | 
			
		||||
        env:
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								LICENSE
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								LICENSE
									
									
									
									
									
								
							@ -1,6 +1,6 @@
 | 
			
		||||
MIT License
 | 
			
		||||
 | 
			
		||||
Copyright (c) 2023 啝裳
 | 
			
		||||
Copyright (c) 2023 pure-admin
 | 
			
		||||
 | 
			
		||||
Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
			
		||||
of this software and associated documentation files (the "Software"), to deal
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										46
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										46
									
								
								package.json
									
									
									
									
									
								
							@ -32,10 +32,10 @@
 | 
			
		||||
    "@howdyjs/mouse-menu": "^2.0.5",
 | 
			
		||||
    "@logicflow/core": "^1.1.30",
 | 
			
		||||
    "@logicflow/extension": "^1.1.30",
 | 
			
		||||
    "@pureadmin/descriptions": "^1.1.0",
 | 
			
		||||
    "@pureadmin/descriptions": "^1.1.1",
 | 
			
		||||
    "@pureadmin/table": "^2.0.0",
 | 
			
		||||
    "@pureadmin/utils": "^1.8.5",
 | 
			
		||||
    "@vueuse/core": "^9.12.0",
 | 
			
		||||
    "@vueuse/core": "^9.13.0",
 | 
			
		||||
    "@vueuse/motion": "2.0.0-beta.12",
 | 
			
		||||
    "@wangeditor/editor": "^5.1.21",
 | 
			
		||||
    "@wangeditor/editor-for-vue": "^5.1.12",
 | 
			
		||||
@ -44,9 +44,9 @@
 | 
			
		||||
    "china-area-data": "^5.0.1",
 | 
			
		||||
    "cropperjs": "^1.5.12",
 | 
			
		||||
    "dayjs": "^1.11.7",
 | 
			
		||||
    "echarts": "^5.4.1",
 | 
			
		||||
    "echarts": "^5.4.2",
 | 
			
		||||
    "el-table-infinite-scroll": "^3.0.1",
 | 
			
		||||
    "element-plus": "^2.2.30",
 | 
			
		||||
    "element-plus": "^2.3.1",
 | 
			
		||||
    "element-resize-detector": "^1.2.4",
 | 
			
		||||
    "intro.js": "^6.0.0",
 | 
			
		||||
    "js-cookie": "^3.0.1",
 | 
			
		||||
@ -56,20 +56,20 @@
 | 
			
		||||
    "mockjs": "^1.1.0",
 | 
			
		||||
    "nprogress": "^0.2.0",
 | 
			
		||||
    "path": "^0.12.7",
 | 
			
		||||
    "pinia": "^2.0.30",
 | 
			
		||||
    "pinia": "^2.0.33",
 | 
			
		||||
    "qrcode": "^1.5.1",
 | 
			
		||||
    "qs": "^6.11.0",
 | 
			
		||||
    "responsive-storage": "^2.1.0",
 | 
			
		||||
    "responsive-storage": "^2.2.0",
 | 
			
		||||
    "sortablejs": "^1.15.0",
 | 
			
		||||
    "swiper": "^9.0.3",
 | 
			
		||||
    "swiper": "^9.1.0",
 | 
			
		||||
    "typeit": "^8.7.1",
 | 
			
		||||
    "v-contextmenu": "3.0.0",
 | 
			
		||||
    "vue": "^3.2.45",
 | 
			
		||||
    "vue": "^3.2.47",
 | 
			
		||||
    "vue-i18n": "^9.2.2",
 | 
			
		||||
    "vue-json-pretty": "^2.2.3",
 | 
			
		||||
    "vue-pdf-embed": "^1.1.5",
 | 
			
		||||
    "vue-router": "^4.1.6",
 | 
			
		||||
    "vue-types": "^4.2.1",
 | 
			
		||||
    "vue-types": "^5.0.2",
 | 
			
		||||
    "vue-virtual-scroller": "2.0.0-beta.7",
 | 
			
		||||
    "vue3-danmaku": "^1.2.0",
 | 
			
		||||
    "vuedraggable": "^4.1.0",
 | 
			
		||||
@ -82,7 +82,7 @@
 | 
			
		||||
    "@iconify-icons/ep": "^1.2.10",
 | 
			
		||||
    "@iconify-icons/ri": "^1.2.4",
 | 
			
		||||
    "@iconify/vue": "^4.0.2",
 | 
			
		||||
    "@intlify/unplugin-vue-i18n": "^0.8.1",
 | 
			
		||||
    "@intlify/unplugin-vue-i18n": "^0.10.0",
 | 
			
		||||
    "@pureadmin/theme": "^3.0.0",
 | 
			
		||||
    "@types/element-resize-detector": "1.1.3",
 | 
			
		||||
    "@types/intro.js": "^5.1.0",
 | 
			
		||||
@ -95,13 +95,13 @@
 | 
			
		||||
    "@types/sortablejs": "^1.15.0",
 | 
			
		||||
    "@typescript-eslint/eslint-plugin": "^5.43.0",
 | 
			
		||||
    "@typescript-eslint/parser": "^5.43.0",
 | 
			
		||||
    "@vitejs/plugin-vue": "^4.0.0",
 | 
			
		||||
    "@vitejs/plugin-vue-jsx": "^3.0.0",
 | 
			
		||||
    "@vitejs/plugin-vue": "^4.1.0",
 | 
			
		||||
    "@vitejs/plugin-vue-jsx": "^3.0.1",
 | 
			
		||||
    "@vue/eslint-config-prettier": "^7.0.0",
 | 
			
		||||
    "@vue/eslint-config-typescript": "^11.0.2",
 | 
			
		||||
    "autoprefixer": "^10.4.13",
 | 
			
		||||
    "autoprefixer": "^10.4.14",
 | 
			
		||||
    "cloc": "^2.11.0",
 | 
			
		||||
    "cssnano": "^5.1.14",
 | 
			
		||||
    "cssnano": "^6.0.0",
 | 
			
		||||
    "eslint": "^8.8.0",
 | 
			
		||||
    "eslint-plugin-prettier": "^4.0.0",
 | 
			
		||||
    "eslint-plugin-vue": "^9.7.0",
 | 
			
		||||
@ -114,10 +114,10 @@
 | 
			
		||||
    "postcss-scss": "^4.0.6",
 | 
			
		||||
    "prettier": "^2.5.1",
 | 
			
		||||
    "pretty-quick": "3.1.1",
 | 
			
		||||
    "rimraf": "3.0.2",
 | 
			
		||||
    "rimraf": "^4.4.1",
 | 
			
		||||
    "rollup-plugin-visualizer": "^5.9.0",
 | 
			
		||||
    "sass": "^1.57.1",
 | 
			
		||||
    "sass-loader": "^13.2.0",
 | 
			
		||||
    "sass": "^1.60.0",
 | 
			
		||||
    "sass-loader": "^13.2.2",
 | 
			
		||||
    "stylelint": "^14.3.0",
 | 
			
		||||
    "stylelint-config-html": "^1.0.0",
 | 
			
		||||
    "stylelint-config-prettier": "^9.0.3",
 | 
			
		||||
@ -125,18 +125,18 @@
 | 
			
		||||
    "stylelint-config-standard": "^29.0.0",
 | 
			
		||||
    "stylelint-order": "^5.0.0",
 | 
			
		||||
    "svgo": "^3.0.2",
 | 
			
		||||
    "tailwindcss": "^3.2.4",
 | 
			
		||||
    "terser": "^5.16.1",
 | 
			
		||||
    "typescript": "^4.9.4",
 | 
			
		||||
    "tailwindcss": "^3.2.7",
 | 
			
		||||
    "terser": "^5.16.8",
 | 
			
		||||
    "typescript": "^5.0.2",
 | 
			
		||||
    "unplugin-vue-define-options": "^1.0.0",
 | 
			
		||||
    "vite": "^4.1.1",
 | 
			
		||||
    "vite": "^4.2.1",
 | 
			
		||||
    "vite-plugin-cdn-import": "^0.3.5",
 | 
			
		||||
    "vite-plugin-compression": "^0.5.1",
 | 
			
		||||
    "vite-plugin-mock": "^2.9.6",
 | 
			
		||||
    "vite-plugin-remove-console": "^1.3.0",
 | 
			
		||||
    "vite-plugin-remove-console": "^2.1.0",
 | 
			
		||||
    "vite-svg-loader": "^4.0.0",
 | 
			
		||||
    "vue-eslint-parser": "^9.1.0",
 | 
			
		||||
    "vue-tsc": "^1.0.22"
 | 
			
		||||
    "vue-tsc": "^1.2.0"
 | 
			
		||||
  },
 | 
			
		||||
  "pnpm": {
 | 
			
		||||
    "peerDependencyRules": {
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1733
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										1733
									
								
								pnpm-lock.yaml
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@ -1,5 +1,5 @@
 | 
			
		||||
import { PropType } from "vue";
 | 
			
		||||
import { propTypes } from "@/utils/propTypes";
 | 
			
		||||
import propTypes from "@/utils/propTypes";
 | 
			
		||||
export const countToProps = {
 | 
			
		||||
  startVal: propTypes.number.def(0),
 | 
			
		||||
  endVal: propTypes.number.def(2020),
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { PropType } from "vue";
 | 
			
		||||
import { propTypes } from "@/utils/propTypes";
 | 
			
		||||
import propTypes from "@/utils/propTypes";
 | 
			
		||||
export const reboundProps = {
 | 
			
		||||
  delay: propTypes.number.def(1),
 | 
			
		||||
  blur: propTypes.number.def(2),
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { defineComponent, ref } from "vue";
 | 
			
		||||
import { propTypes } from "@/utils/propTypes";
 | 
			
		||||
import propTypes from "@/utils/propTypes";
 | 
			
		||||
import "./filpper.css";
 | 
			
		||||
 | 
			
		||||
const props = {
 | 
			
		||||
 | 
			
		||||
@ -8,7 +8,7 @@ import {
 | 
			
		||||
  defineComponent
 | 
			
		||||
} from "vue";
 | 
			
		||||
import "./index.scss";
 | 
			
		||||
import { propTypes } from "@/utils/propTypes";
 | 
			
		||||
import propTypes from "@/utils/propTypes";
 | 
			
		||||
import { isString, cloneDeep } from "@pureadmin/utils";
 | 
			
		||||
import QRCode, { QRCodeRenderersOptions } from "qrcode";
 | 
			
		||||
import RefreshRight from "@iconify-icons/ep/refresh-right";
 | 
			
		||||
 | 
			
		||||
@ -27,6 +27,10 @@ const menuData = computed(() => {
 | 
			
		||||
    : usePermissionStoreHook().wholeMenus;
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
const loading = computed(() =>
 | 
			
		||||
  pureApp.layout === "mix" ? false : menuData.value.length === 0 ? true : false
 | 
			
		||||
);
 | 
			
		||||
 | 
			
		||||
function getSubMenuData(path: string) {
 | 
			
		||||
  // path的上级路由组成的数组
 | 
			
		||||
  const parentPathArr = getParentPaths(
 | 
			
		||||
@ -61,7 +65,7 @@ watch(
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
  <div
 | 
			
		||||
    v-loading="menuData.length === 0"
 | 
			
		||||
    v-loading="loading"
 | 
			
		||||
    :class="['sidebar-container', showLogo ? 'has-logo' : '']"
 | 
			
		||||
  >
 | 
			
		||||
    <Logo v-if="showLogo" :collapse="isCollapse" />
 | 
			
		||||
 | 
			
		||||
@ -139,7 +139,7 @@ router.beforeEach((to: toRouteType, _from, next) => {
 | 
			
		||||
      if (
 | 
			
		||||
        usePermissionStoreHook().wholeMenus.length === 0 &&
 | 
			
		||||
        to.path !== "/login"
 | 
			
		||||
      )
 | 
			
		||||
      ) {
 | 
			
		||||
        initRouter().then((router: Router) => {
 | 
			
		||||
          if (!useMultiTagsStoreHook().getMultiTagsCache) {
 | 
			
		||||
            const { path } = to;
 | 
			
		||||
@ -158,6 +158,7 @@ router.beforeEach((to: toRouteType, _from, next) => {
 | 
			
		||||
          }
 | 
			
		||||
          router.push(to.fullPath);
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
      toCorrectRoute();
 | 
			
		||||
    }
 | 
			
		||||
  } else {
 | 
			
		||||
 | 
			
		||||
@ -367,6 +367,7 @@ export {
 | 
			
		||||
  ascending,
 | 
			
		||||
  filterTree,
 | 
			
		||||
  initRouter,
 | 
			
		||||
  addPathMatch,
 | 
			
		||||
  isOneOfArray,
 | 
			
		||||
  getHistoryMode,
 | 
			
		||||
  addAsyncRoutes,
 | 
			
		||||
 | 
			
		||||
@ -23,11 +23,11 @@ export const useAppStore = defineStore({
 | 
			
		||||
    sortSwap: false
 | 
			
		||||
  }),
 | 
			
		||||
  getters: {
 | 
			
		||||
    getSidebarStatus() {
 | 
			
		||||
      return this.sidebar.opened;
 | 
			
		||||
    getSidebarStatus(state) {
 | 
			
		||||
      return state.sidebar.opened;
 | 
			
		||||
    },
 | 
			
		||||
    getDevice() {
 | 
			
		||||
      return this.device;
 | 
			
		||||
    getDevice(state) {
 | 
			
		||||
      return state.device;
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  actions: {
 | 
			
		||||
 | 
			
		||||
@ -14,14 +14,14 @@ export const useEpThemeStore = defineStore({
 | 
			
		||||
      getConfig().Theme
 | 
			
		||||
  }),
 | 
			
		||||
  getters: {
 | 
			
		||||
    getEpThemeColor() {
 | 
			
		||||
      return this.epThemeColor;
 | 
			
		||||
    getEpThemeColor(state) {
 | 
			
		||||
      return state.epThemeColor;
 | 
			
		||||
    },
 | 
			
		||||
    /** 用于mix导航模式下hamburger-svg的fill属性 */
 | 
			
		||||
    fill() {
 | 
			
		||||
      if (this.epTheme === "light") {
 | 
			
		||||
    fill(state) {
 | 
			
		||||
      if (state.epTheme === "light") {
 | 
			
		||||
        return "#409eff";
 | 
			
		||||
      } else if (this.epTheme === "yellow") {
 | 
			
		||||
      } else if (state.epTheme === "yellow") {
 | 
			
		||||
        return "#d25f00";
 | 
			
		||||
      } else {
 | 
			
		||||
        return "#fff";
 | 
			
		||||
 | 
			
		||||
@ -17,8 +17,8 @@ export const useMultiTagsStore = defineStore({
 | 
			
		||||
    )?.multiTagsCache
 | 
			
		||||
  }),
 | 
			
		||||
  getters: {
 | 
			
		||||
    getMultiTagsCache() {
 | 
			
		||||
      return this.multiTagsCache;
 | 
			
		||||
    getMultiTagsCache(state) {
 | 
			
		||||
      return state.multiTagsCache;
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  actions: {
 | 
			
		||||
 | 
			
		||||
@ -11,20 +11,19 @@ export const useSettingStore = defineStore({
 | 
			
		||||
    hiddenSideBar: getConfig().HiddenSideBar
 | 
			
		||||
  }),
 | 
			
		||||
  getters: {
 | 
			
		||||
    getTitle() {
 | 
			
		||||
      return this.title;
 | 
			
		||||
    getTitle(state) {
 | 
			
		||||
      return state.title;
 | 
			
		||||
    },
 | 
			
		||||
    getFixedHeader() {
 | 
			
		||||
      return this.fixedHeader;
 | 
			
		||||
    getFixedHeader(state) {
 | 
			
		||||
      return state.fixedHeader;
 | 
			
		||||
    },
 | 
			
		||||
    getHiddenSideBar() {
 | 
			
		||||
      return this.HiddenSideBar;
 | 
			
		||||
    getHiddenSideBar(state) {
 | 
			
		||||
      return state.hiddenSideBar;
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  actions: {
 | 
			
		||||
    CHANGE_SETTING({ key, value }) {
 | 
			
		||||
      // eslint-disable-next-line no-prototype-builtins
 | 
			
		||||
      if (this.hasOwnProperty(key)) {
 | 
			
		||||
      if (Reflect.has(this, key)) {
 | 
			
		||||
        this[key] = value;
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,10 @@
 | 
			
		||||
import { CSSProperties, VNodeChild } from "vue";
 | 
			
		||||
import { createTypes, VueTypeValidableDef, VueTypesInterface } from "vue-types";
 | 
			
		||||
import type { CSSProperties, VNodeChild } from "vue";
 | 
			
		||||
import {
 | 
			
		||||
  createTypes,
 | 
			
		||||
  toValidableType,
 | 
			
		||||
  VueTypesInterface,
 | 
			
		||||
  VueTypeValidableDef
 | 
			
		||||
} from "vue-types";
 | 
			
		||||
 | 
			
		||||
export type VueNode = VNodeChild | JSX.Element;
 | 
			
		||||
 | 
			
		||||
@ -8,7 +13,7 @@ type PropTypes = VueTypesInterface & {
 | 
			
		||||
  readonly VNodeChild: VueTypeValidableDef<VueNode>;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const propTypes = createTypes({
 | 
			
		||||
const newPropTypes = createTypes({
 | 
			
		||||
  func: undefined,
 | 
			
		||||
  bool: undefined,
 | 
			
		||||
  string: undefined,
 | 
			
		||||
@ -17,18 +22,18 @@ const propTypes = createTypes({
 | 
			
		||||
  integer: undefined
 | 
			
		||||
}) as PropTypes;
 | 
			
		||||
 | 
			
		||||
propTypes.extend([
 | 
			
		||||
  {
 | 
			
		||||
    name: "style",
 | 
			
		||||
    getter: true,
 | 
			
		||||
    type: [String, Object],
 | 
			
		||||
    default: undefined
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    name: "VNodeChild",
 | 
			
		||||
    getter: true,
 | 
			
		||||
    type: undefined
 | 
			
		||||
// 从 vue-types v5.0 开始,extend()方法已经废弃,当前已改为官方推荐的ES6+方法 https://dwightjack.github.io/vue-types/advanced/extending-vue-types.html#the-extend-method
 | 
			
		||||
export default class propTypes extends newPropTypes {
 | 
			
		||||
  // a native-like validator that supports the `.validable` method
 | 
			
		||||
  static get style() {
 | 
			
		||||
    return toValidableType("style", {
 | 
			
		||||
      type: [String, Object]
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
]);
 | 
			
		||||
 | 
			
		||||
export { propTypes };
 | 
			
		||||
  static get VNodeChild() {
 | 
			
		||||
    return toValidableType("VNodeChild", {
 | 
			
		||||
      type: undefined
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -37,7 +37,7 @@ const columns: TableColumnList = [
 | 
			
		||||
      :data="tableData"
 | 
			
		||||
      :columns="columns"
 | 
			
		||||
      highlight-current-row
 | 
			
		||||
      @current-change="handleCurrentChange"
 | 
			
		||||
      @page-current-change="handleCurrentChange"
 | 
			
		||||
    />
 | 
			
		||||
    <div style="margin-top: 20px">
 | 
			
		||||
      <el-button @click="setCurrent(tableData[1])">Select second row</el-button>
 | 
			
		||||
 | 
			
		||||
@ -66,8 +66,8 @@ const {
 | 
			
		||||
      "
 | 
			
		||||
      :columns="columns"
 | 
			
		||||
      :pagination="pagination"
 | 
			
		||||
      @size-change="onSizeChange"
 | 
			
		||||
      @current-change="onCurrentChange"
 | 
			
		||||
      @page-size-change="onSizeChange"
 | 
			
		||||
      @page-current-change="onCurrentChange"
 | 
			
		||||
    />
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
@ -109,8 +109,8 @@ const {
 | 
			
		||||
            color: 'var(--el-text-color-primary)'
 | 
			
		||||
          }"
 | 
			
		||||
          @selection-change="handleSelectionChange"
 | 
			
		||||
          @size-change="handleSizeChange"
 | 
			
		||||
          @current-change="handleCurrentChange"
 | 
			
		||||
          @page-size-change="handleSizeChange"
 | 
			
		||||
          @page-current-change="handleCurrentChange"
 | 
			
		||||
        >
 | 
			
		||||
          <template #operation="{ row }">
 | 
			
		||||
            <el-button
 | 
			
		||||
 | 
			
		||||
@ -111,8 +111,8 @@ const {
 | 
			
		||||
              color: 'var(--el-text-color-primary)'
 | 
			
		||||
            }"
 | 
			
		||||
            @selection-change="handleSelectionChange"
 | 
			
		||||
            @size-change="handleSizeChange"
 | 
			
		||||
            @current-change="handleCurrentChange"
 | 
			
		||||
            @page-size-change="handleSizeChange"
 | 
			
		||||
            @page-current-change="handleCurrentChange"
 | 
			
		||||
          >
 | 
			
		||||
            <template #operation="{ row }">
 | 
			
		||||
              <el-button
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user