Browse Source

chore: update dependencies

xiaoxian521 2 years ago
parent
commit
df71c7f75c
50 changed files with 401 additions and 425 deletions
  1. 4 1
      .eslintignore
  2. 2 2
      build/plugins.ts
  3. 23 23
      package.json
  4. 216 220
      pnpm-lock.yaml
  5. 10 10
      src/components/ReFlop/src/index.vue
  6. 3 3
      src/components/ReFlowChart/src/Control.vue
  7. 1 1
      src/components/ReFlowChart/src/NodePanel.vue
  8. 11 11
      src/components/ReIcon/src/Select.vue
  9. 6 6
      src/components/ReMap/src/Amap.vue
  10. 35 34
      src/components/ReSeamlessScroll/src/index.vue
  11. 1 1
      src/layout/components/notice/index.vue
  12. 2 2
      src/layout/components/notice/noticeItem.vue
  13. 1 1
      src/layout/components/panel/index.vue
  14. 4 4
      src/layout/components/setting/index.vue
  15. 1 1
      src/layout/components/sidebar/mixNav.vue
  16. 1 1
      src/layout/components/sidebar/vertical.vue
  17. 6 6
      src/layout/components/tag/index.vue
  18. 1 1
      src/layout/index.vue
  19. 1 1
      src/views/able/download.vue
  20. 1 1
      src/views/able/icon-select.vue
  21. 4 4
      src/views/able/line-tree.vue
  22. 4 4
      src/views/able/menu-tree.vue
  23. 7 12
      src/views/able/pdf.vue
  24. 1 1
      src/views/able/print.vue
  25. 1 20
      src/views/able/swiper.vue
  26. 2 2
      src/views/able/watermark.vue
  27. 4 4
      src/views/components/cropping/index.vue
  28. 3 3
      src/views/components/draggable/index.vue
  29. 2 2
      src/views/components/seamless-scroll/index.vue
  30. 2 2
      src/views/components/selector/index.vue
  31. 5 5
      src/views/flow-chart/index.vue
  32. 1 1
      src/views/nested/menu1/menu1-1/index.vue
  33. 1 1
      src/views/nested/menu1/menu1-2/menu1-2-1/index.vue
  34. 1 1
      src/views/nested/menu1/menu1-2/menu1-2-2/index.vue
  35. 1 1
      src/views/nested/menu1/menu1-3/index.vue
  36. 1 1
      src/views/nested/menu2/index.vue
  37. 1 1
      src/views/permission/button/index.vue
  38. 2 2
      src/views/permission/page/index.vue
  39. 3 3
      src/views/system/dept/index.vue
  40. 2 2
      src/views/system/dict/index.vue
  41. 3 3
      src/views/system/role/index.vue
  42. 3 3
      src/views/system/user/index.vue
  43. 4 4
      src/views/system/user/tree.vue
  44. 4 4
      src/views/tabs/index.vue
  45. 1 1
      src/views/welcome/components/Bar.vue
  46. 2 2
      src/views/welcome/components/Infinite.vue
  47. 1 1
      src/views/welcome/components/Line.vue
  48. 1 1
      src/views/welcome/components/Pie.vue
  49. 2 2
      src/views/welcome/index.vue
  50. 2 2
      tsconfig.json

+ 4 - 1
.eslintignore

@@ -1,10 +1,13 @@
 public
 dist
 *.d.ts
+/src/assets
 package.json
 .eslintrc.js
 .prettierrc.js
 commitlint.config.js
 postcss.config.js
 tailwind.config.js
-stylelint.config.js
+stylelint.config.js
+src/components/ReSplitPane/iconfont
+src/components/ReFlowChart/src/assets/iconfont

+ 2 - 2
build/plugins.ts

@@ -5,13 +5,13 @@ 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";
 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(
@@ -34,7 +34,7 @@ export function getPluginsList(
     vueJsx(),
     VITE_CDN ? cdn : null,
     configCompressPlugin(VITE_COMPRESSION),
-    DefineOptions(),
+    VueMacros(),
     // 线上环境删除console
     removeConsole({ external: ["src/assets/iconfont/iconfont.js"] }),
     viteBuildInfo(),

+ 23 - 23
package.json

@@ -49,8 +49,8 @@
     "driver.js": "^0.9.8",
     "echarts": "^5.4.0",
     "el-table-infinite-scroll": "^3.0.1",
-    "element-plus": "^2.2.18",
-    "element-resize-detector": "^1.2.3",
+    "element-plus": "^2.2.20",
+    "element-resize-detector": "^1.2.4",
     "js-cookie": "^3.0.1",
     "jsbarcode": "^3.11.5",
     "lodash": "^4.17.21",
@@ -69,7 +69,7 @@
     "swiper": "^8.4.4",
     "typeit": "^8.7.0",
     "v-contextmenu": "3.0.0",
-    "vue": "^3.2.40",
+    "vue": "^3.2.44",
     "vue-i18n": "^9.2.2",
     "vue-json-pretty": "^2.2.2",
     "vue-pdf-embed": "^1.1.4",
@@ -95,33 +95,33 @@
     "@iconify-icons/mdi": "^1.2.8",
     "@iconify-icons/ri": "^1.2.3",
     "@iconify-icons/uil": "^1.2.2",
-    "@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/qrcode": "^1.4.2",
     "@types/qs": "^6.9.7",
     "@types/sortablejs": "^1.13.0",
-    "@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",
@@ -134,26 +134,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.2",
     "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": {

File diff suppressed because it is too large
+ 216 - 220
pnpm-lock.yaml


+ 10 - 10
src/components/ReFlop/src/index.vue

@@ -3,8 +3,8 @@ import { ref, unref, nextTick, onUnmounted } from "vue";
 import { templateRef } from "@vueuse/core";
 import flippers from "./filpper";
 
-let timer = ref(null);
-let flipObjs = ref([]);
+const timer = ref(null);
+const flipObjs = ref([]);
 
 const flipperHour1 = templateRef<HTMLElement | null>("flipperHour1", null);
 const flipperHour2 = templateRef<HTMLElement | null>("flipperHour2", null);
@@ -15,8 +15,8 @@ const flipperSecond2 = templateRef<HTMLElement | null>("flipperSecond2", null);
 
 // 初始化数字
 const init = () => {
-  let now = new Date();
-  let nowTimeStr = formatDate(new Date(now.getTime()), "hhiiss");
+  const now = new Date();
+  const nowTimeStr = formatDate(new Date(now.getTime()), "hhiiss");
   for (let i = 0; i < flipObjs.value.length; i++) {
     flipObjs?.value[i]?.setFront(nowTimeStr[i]);
   }
@@ -26,9 +26,9 @@ const init = () => {
 const run = () => {
   timer.value = setInterval(() => {
     // 获取当前时间
-    let now = new Date();
-    let nowTimeStr = formatDate(new Date(now.getTime() - 1000), "hhiiss");
-    let nextTimeStr = formatDate(now, "hhiiss");
+    const now = new Date();
+    const nowTimeStr = formatDate(new Date(now.getTime() - 1000), "hhiiss");
+    const nextTimeStr = formatDate(now, "hhiiss");
     for (let i = 0; i < flipObjs.value.length; i++) {
       if (nowTimeStr[i] === nextTimeStr[i]) {
         continue;
@@ -52,17 +52,17 @@ const formatDate = (date: Date, dateFormat: string) => {
     );
   }
   // 格式化月、日、时、分、秒
-  let o = {
+  const o = {
     "m+": date.getMonth() + 1,
     "d+": date.getDate(),
     "h+": date.getHours(),
     "i+": date.getMinutes(),
     "s+": date.getSeconds()
   };
-  for (let k in o) {
+  for (const k in o) {
     if (new RegExp(`(${k})`).test(dateFormat)) {
       // 取出对应的值
-      let str = o[k] + "";
+      const str = o[k] + "";
       /* 根据设置的格式,输出对应的字符
        * 例如: 早上8时,hh => 08,h => 8
        * 但是,当数字>=10时,无论格式为一位还是多位,不做截取,这是与年份格式化不一致的地方

+ 3 - 3
src/components/ReFlowChart/src/Control.vue

@@ -19,8 +19,8 @@ const emit = defineEmits<{
 const controlButton3 = templateRef<HTMLElement | any>("controlButton3", null);
 const controlButton4 = templateRef<HTMLElement | any>("controlButton4", null);
 
-let focusIndex = ref<Number>(-1);
-let titleLists = ref([
+const focusIndex = ref<Number>(-1);
+const titleLists = ref([
   {
     icon: "icon-zoom-out-hs",
     text: "缩小",
@@ -68,7 +68,7 @@ let titleLists = ref([
 const onControl = (item, key) => {
   ["zoom", "zoom", "resetZoom", "undo", "redo", "getSnapshot"].forEach(
     (v, i) => {
-      let domControl = props.lf;
+      const domControl = props.lf;
       if (key === 1) {
         domControl.zoom(true);
       }

+ 1 - 1
src/components/ReFlowChart/src/NodePanel.vue

@@ -18,7 +18,7 @@ const props = withDefaults(defineProps<Props>(), {
   nodeList: null
 });
 
-let properties = ref({
+const properties = ref({
   a: "efrwe",
   b: "wewe"
 });

+ 11 - 11
src/components/ReIcon/src/Select.vue

@@ -16,21 +16,21 @@ const props = defineProps({
 });
 const emit = defineEmits<{ (e: "update:modelValue", v: string) }>();
 
-let visible = ref(false);
-let inputValue = toRef(props, "modelValue");
-let iconList = ref(IconJson);
-let icon = ref("add-location");
-let currentActiveType = ref("ep:");
+const visible = ref(false);
+const inputValue = toRef(props, "modelValue");
+const iconList = ref(IconJson);
+const icon = ref("add-location");
+const currentActiveType = ref("ep:");
 // 深拷贝图标数据,前端做搜索
-let copyIconList = cloneDeep(iconList.value);
+const copyIconList = cloneDeep(iconList.value);
 
-let pageSize = ref(96);
-let currentPage = ref(1);
+const pageSize = ref(96);
+const currentPage = ref(1);
 
 // 搜索条件
-let filterValue = ref("");
+const filterValue = ref("");
 
-let tabsList = [
+const tabsList = [
   {
     label: "Element Plus",
     name: "ep:"
@@ -45,7 +45,7 @@ let tabsList = [
   }
 ];
 
-let pageList = computed(() => {
+const pageList = computed(() => {
   if (currentPage.value === 1) {
     return copyIconList[currentActiveType.value]
       .filter(v => v.includes(filterValue.value))

+ 6 - 6
src/components/ReMap/src/Amap.vue

@@ -39,8 +39,8 @@ const complete = (): void => {
 
 onBeforeMount(() => {
   if (!instance) return;
-  let { MapConfigure } = instance.appContext.config.globalProperties.$config;
-  let { options } = MapConfigure;
+  const { MapConfigure } = instance.appContext.config.globalProperties.$config;
+  const { options } = MapConfigure;
 
   AMapLoader.load({
     key: MapConfigure.amapKey,
@@ -67,10 +67,10 @@ onBeforeMount(() => {
         gridSize: 80,
         maxZoom: 14,
         renderMarker(ctx) {
-          let { marker, data } = ctx;
+          const { marker, data } = ctx;
           if (Array.isArray(data) && data[0]) {
-            var { driver, plateNumber, orientation } = data[0];
-            var content = `<img style="transform: scale(1) rotate(${
+            const { driver, plateNumber, orientation } = data[0];
+            const content = `<img style="transform: scale(1) rotate(${
               360 - Number(orientation)
             }deg);" src='${car}' />`;
             marker.setContent(content);
@@ -93,7 +93,7 @@ onBeforeMount(() => {
       // 获取模拟车辆信息
       mapJson()
         .then(({ data }) => {
-          let points: object = data.map(v => {
+          const points: object = data.map(v => {
             return {
               lnglat: [v.lng, v.lat],
               ...v

+ 35 - 34
src/components/ReSeamlessScroll/src/index.vue

@@ -28,16 +28,16 @@ const emit = defineEmits<{
   (e: "scrollEnd"): void;
 }>();
 
-let xPos = ref<number>(0);
-let yPos = ref<number>(0);
-let delay = ref<number>(0);
-let height = ref<number>(0);
+const xPos = ref<number>(0);
+const yPos = ref<number>(0);
+const delay = ref<number>(0);
+const height = ref<number>(0);
 // 外容器宽度
-let width = ref<number>(0);
+const width = ref<number>(0);
 // 内容实际宽度
-let realBoxWidth = ref<number>(0);
-let realBoxHeight = ref<number>(0);
-let copyHtml = ref("");
+const realBoxWidth = ref<number>(0);
+const realBoxHeight = ref<number>(0);
+const copyHtml = ref("");
 // single 单步滚动的定时器
 let singleWaitTime = null;
 // move动画的animationFrame定时器
@@ -52,7 +52,7 @@ let isHover = false;
 let ease = "ease-in";
 
 // eslint-disable-next-line vue/no-setup-props-destructure
-let { classOption } = props;
+const { classOption } = props;
 
 if (classOption["key"] === undefined) {
   classOption["key"] = 0;
@@ -68,15 +68,15 @@ const realBox = templateRef<HTMLElement | null>(
   null
 );
 
-let leftSwitchState = computed(() => {
+const leftSwitchState = computed(() => {
   return unref(xPos) < 0;
 });
 
-let rightSwitchState = computed(() => {
+const rightSwitchState = computed(() => {
   return Math.abs(unref(xPos)) < unref(realBoxWidth) - unref(width);
 });
 
-let defaultOption = computed(() => {
+const defaultOption = computed(() => {
   return {
     //步长
     step: 1,
@@ -105,7 +105,7 @@ let defaultOption = computed(() => {
   };
 });
 
-let options = computed(() => {
+const options = computed(() => {
   // @ts-expect-error
   return copyObj({}, unref(defaultOption), classOption);
 });
@@ -114,11 +114,11 @@ const leftSwitchClass = computed(() => {
   return unref(leftSwitchState) ? "" : unref(options).switchDisabledClass;
 });
 
-let rightSwitchClass = computed(() => {
+const rightSwitchClass = computed(() => {
   return unref(rightSwitchState) ? "" : unref(options).switchDisabledClass;
 });
 
-let leftSwitch = computed((): CSSProperties => {
+const leftSwitch = computed((): CSSProperties => {
   return {
     position: "absolute",
     margin: `${unref(height) / 2}px 0 0 -${unref(options).switchOffset}px`,
@@ -126,7 +126,7 @@ let leftSwitch = computed((): CSSProperties => {
   };
 });
 
-let rightSwitch = computed((): CSSProperties => {
+const rightSwitch = computed((): CSSProperties => {
   return {
     position: "absolute",
     margin: `${unref(height) / 2}px 0 0 ${
@@ -136,19 +136,19 @@ let rightSwitch = computed((): CSSProperties => {
   };
 });
 
-let isHorizontal = computed(() => {
+const isHorizontal = computed(() => {
   return (
     unref(options).direction !== "bottom" && unref(options).direction !== "top"
   );
 });
 
-let float = computed((): CSSProperties => {
+const float = computed((): CSSProperties => {
   return unref(isHorizontal)
     ? { float: "left", overflow: "hidden" }
     : { overflow: "hidden" };
 });
 
-let pos = computed(() => {
+const pos = computed(() => {
   return {
     transform: `translate(${unref(xPos)}px,${unref(yPos)}px)`,
     transition: `all ${ease} ${unref(delay)}ms`,
@@ -156,45 +156,45 @@ let pos = computed(() => {
   };
 });
 
-let navigation = computed(() => {
+const navigation = computed(() => {
   return unref(options).navigation;
 });
 
-let autoPlay = computed(() => {
+const autoPlay = computed(() => {
   if (unref(navigation)) return false;
   return unref(options).autoPlay;
 });
 
-let scrollSwitch = computed(() => {
+const scrollSwitch = computed(() => {
   // 从 props 解构出来的 属性 不再具有响应性.
   return (props.data as any).length >= unref(options).limitMoveNum;
 });
 
-let hoverStopSwitch = computed(() => {
+const hoverStopSwitch = computed(() => {
   return unref(options).hoverStop && unref(autoPlay) && unref(scrollSwitch);
 });
 
-let canTouchScroll = computed(() => {
+const canTouchScroll = computed(() => {
   return unref(options).openTouch;
 });
 
-let baseFontSize = computed(() => {
+const baseFontSize = computed(() => {
   return unref(options).isSingleRemUnit
     ? parseInt(window.getComputedStyle(document.documentElement, null).fontSize)
     : 1;
 });
 
-let realSingleStopWidth = computed(() => {
+const realSingleStopWidth = computed(() => {
   return unref(options).singleWidth * unref(baseFontSize);
 });
 
-let realSingleStopHeight = computed(() => {
+const realSingleStopHeight = computed(() => {
   return unref(options).singleHeight * unref(baseFontSize);
 });
 
-let step = computed(() => {
+const step = computed(() => {
   let singleStep;
-  let step = unref(options).step;
+  const step = unref(options).step;
   if (unref(isHorizontal)) {
     singleStep = unref(realSingleStopWidth);
   } else {
@@ -275,7 +275,7 @@ function touchMove(e) {
     return;
   const touch = e.targetTouches[0];
   const { direction } = unref(options);
-  let endPos = {
+  const endPos = {
     x: touch.pageX - startPos.x,
     y: touch.pageY - startPos.y
   };
@@ -300,18 +300,19 @@ function touchMove(e) {
 
 function touchEnd() {
   if (!unref(canTouchScroll)) return;
-  let timer;
+  // eslint-disable-next-line prefer-const
+  let timer: any;
   const direction = unref(options).direction;
   delay.value = 50;
   if (direction === "top") {
     if (unref(yPos) > 0) yPos.value = 0;
   } else if (direction === "bottom") {
-    let h = (unref(realBoxHeight) / 2) * -1;
+    const h = (unref(realBoxHeight) / 2) * -1;
     if (unref(yPos) < h) yPos.value = h;
   } else if (direction === "left") {
     if (unref(xPos) > 0) xPos.value = 0;
   } else if (direction === "right") {
-    let w = unref(realBoxWidth) * -1;
+    const w = unref(realBoxWidth) * -1;
     if (unref(xPos) < w) xPos.value = w;
   }
   if (timer) clearTimeout(timer);
@@ -339,7 +340,7 @@ function scrollMove() {
     const h = unref(realBoxHeight) / 2;
     //宽度
     const w = unref(realBoxWidth) / 2;
-    let { direction, waitTime } = unref(options);
+    const { direction, waitTime } = unref(options);
     if (direction === "top") {
       // 上
       if (Math.abs(unref(yPos)) >= h) {

+ 1 - 1
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;
 });

+ 2 - 2
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();

+ 1 - 1
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;

+ 4 - 4
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);
 };

+ 1 - 1
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);

+ 1 - 1
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"

+ 6 - 6
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);

+ 1 - 1
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 隐藏侧边栏

File diff suppressed because it is too large
+ 1 - 1
src/views/able/download.vue


+ 1 - 1
src/views/able/icon-select.vue

@@ -6,7 +6,7 @@ defineOptions({
   name: "IconSelect"
 });
 
-let icon = ref("ep:add-location");
+const icon = ref("ep:add-location");
 </script>
 
 <template>

+ 4 - 4
src/views/able/line-tree.vue

@@ -10,12 +10,12 @@ defineOptions({
   name: "LineTree"
 });
 
-let menusTree = cloneDeep(usePermissionStoreHook().wholeMenus);
-let menusData = computed(() => {
+const menusTree = cloneDeep(usePermissionStoreHook().wholeMenus);
+const menusData = computed(() => {
   return deleteChildren(menusTree);
 });
-let expandedKeys = extractPathList(menusData.value);
-let dataProps = {
+const expandedKeys = extractPathList(menusData.value);
+const dataProps = {
   value: "uniqueId",
   children: "children"
 };

+ 4 - 4
src/views/able/menu-tree.vue

@@ -19,18 +19,18 @@ interface treeNode extends TreeNode {
 }
 
 const query = ref("");
-let dataProps = ref({
+const dataProps = ref({
   value: "uniqueId",
   children: "children"
 });
 const treeRef = ref<InstanceType<typeof ElTreeV2>>();
-let menusTree = cloneDeep(usePermissionStoreHook().wholeMenus);
+const menusTree = cloneDeep(usePermissionStoreHook().wholeMenus);
 
-let menusData = computed(() => {
+const menusData = computed(() => {
   return deleteChildren(menusTree);
 });
 
-let expandedKeys = extractPathList(menusData.value);
+const expandedKeys = extractPathList(menusData.value);
 
 const onQueryChanged = (query: string) => {
   (treeRef as any).value!.filter(query);

+ 7 - 12
src/views/able/pdf.vue

@@ -1,24 +1,19 @@
 <script setup lang="ts">
 import { ref } from "vue";
 import { useI18n } from "vue-i18n";
-import VuePdfEmbed, {
-  type VuePdfEmbedMethods,
-  type VuePdfEmbedData
-} from "vue-pdf-embed";
+import VuePdfEmbed from "vue-pdf-embed";
 
 defineOptions({
   name: "Pdf"
 });
 
-interface pdfRefType extends VuePdfEmbedData, VuePdfEmbedMethods {}
-
 const { t } = useI18n();
-const pdfRef = ref<pdfRefType>();
-let pageCount = ref(1);
-let loading = ref(true);
-let currentPage = ref(1);
-let currentRotation = ref(0);
-let showAllPages = ref(false);
+const pdfRef = ref<any>();
+const pageCount = ref(1);
+const loading = ref(true);
+const currentPage = ref(1);
+const currentRotation = ref(0);
+const showAllPages = ref(false);
 const rotations = [0, 90, 180, 270];
 
 const source =

+ 1 - 1
src/views/able/print.vue

@@ -77,7 +77,7 @@ const options = [
 ];
 
 function onPrint() {
-  let el = options.filter(v => v.value === value.value)[0]?.el;
+  const el = options.filter(v => v.value === value.value)[0]?.el;
   Print(el).toPrint;
 }
 

+ 1 - 20
src/views/able/swiper.vue

@@ -2,7 +2,6 @@
 import "swiper/css";
 import "swiper/css/navigation";
 import "swiper/css/pagination";
-import type { SwiperOptions } from "swiper";
 import { Swiper, SwiperSlide } from "swiper/vue";
 import SwiperCore, { Autoplay, Navigation, Pagination } from "swiper";
 
@@ -10,27 +9,9 @@ defineOptions({
   name: "Swiper"
 });
 
-type SwiperExampleOptions = Pick<
-  SwiperOptions,
-  | "navigation"
-  | "pagination"
-  | "scrollbar"
-  | "slidesPerView"
-  | "slidesPerGroup"
-  | "spaceBetween"
-  | "direction"
-  | "loop"
-  | "loopFillGroupWithBlank"
-  | "autoplay"
->;
-interface SwiperExample {
-  id: number;
-  label: string;
-  options: Partial<SwiperExampleOptions>;
-}
 SwiperCore.use([Autoplay, Navigation, Pagination]);
 
-const swiperExample: SwiperExample[] = [
+const swiperExample: any[] = [
   { id: 0, label: "Default", options: {} },
   {
     id: 1,

+ 2 - 2
src/views/able/watermark.vue

@@ -6,8 +6,8 @@ defineOptions({
   name: "WaterMark"
 });
 
-let color = ref("#409EFF");
-let value = ref("vue-pure-admin");
+const color = ref("#409EFF");
+const value = ref("vue-pure-admin");
 const { setWatermark, clear } = useWatermark();
 </script>
 

+ 4 - 4
src/views/components/cropping/index.vue

@@ -7,14 +7,14 @@ defineOptions({
   name: "Cropping"
 });
 
-let refCropper = ref();
-let info = ref<object>(null);
-let cropperImg = ref<string>("");
+const refCropper = ref();
+const info = ref<object>(null);
+const cropperImg = ref<string>("");
 
 const onCropper = (): void => {
   nextTick(() => {
     refCropper.value.cropper.getCroppedCanvas().toBlob(blob => {
-      let fileReader: FileReader = new FileReader();
+      const fileReader: FileReader = new FileReader();
       fileReader.onloadend = (e: ProgressEvent) => {
         cropperImg.value = (e.target as any).result;
         info.value = refCropper.value.cropper.getData();

+ 3 - 3
src/views/components/draggable/index.vue

@@ -8,7 +8,7 @@ defineOptions({
   name: "Draggable"
 });
 
-let gridLists = ref<Array<Object>>([
+const gridLists = ref<Array<Object>>([
   { grid: "cn", num: 1 },
   { grid: "cn", num: 2 },
   { grid: "cn", num: 3 },
@@ -20,14 +20,14 @@ let gridLists = ref<Array<Object>>([
   { grid: "cn", num: 9 }
 ]);
 
-let lists = ref<Array<Object>>([
+const lists = ref<Array<Object>>([
   { people: "cn", id: 1, name: "www.itxst.com" },
   { people: "cn", id: 2, name: "www.baidu.com" },
   { people: "cn", id: 3, name: "www.taobao.com" },
   { people: "cn", id: 4, name: "www.google.com" }
 ]);
 
-let cutLists = ref([
+const cutLists = ref([
   { people: "cn", id: 1, name: "cut1" },
   { people: "cn", id: 2, name: "cut2" },
   { people: "cn", id: 3, name: "cut3" },

+ 2 - 2
src/views/components/seamless-scroll/index.vue

@@ -9,7 +9,7 @@ defineOptions({
 
 const scroll = templateRef<ElRef | null>("scroll", null);
 
-let listData = ref([
+const listData = ref([
   {
     title: "无缝滚动第一行无缝滚动第一行!!!!!!!!!!"
   },
@@ -39,7 +39,7 @@ let listData = ref([
   }
 ]);
 
-let classOption = reactive({
+const classOption = reactive({
   direction: "top"
 });
 

+ 2 - 2
src/views/components/selector/index.vue

@@ -6,8 +6,8 @@ defineOptions({
   name: "Selector"
 });
 
-let selectRange = ref<string>("");
-let dataLists = ref([
+const selectRange = ref<string>("");
+const dataLists = ref([
   {
     title: "基本使用",
     echo: [],

+ 5 - 5
src/views/flow-chart/index.vue

@@ -15,10 +15,10 @@ defineOptions({
   name: "FlowChart"
 });
 
-let lf = ref(null);
-let graphData = ref(null);
-let dataVisible = ref<boolean>(false);
-let config = ref({
+const lf = ref(null);
+const graphData = ref(null);
+const dataVisible = ref<boolean>(false);
+const config = ref({
   grid: true,
   background: {
     color: "#f7f9ff"
@@ -27,7 +27,7 @@ let config = ref({
     enabled: true
   }
 });
-let nodeList = BpmnNode;
+const nodeList = BpmnNode;
 
 function initLf() {
   // 画布配置

+ 1 - 1
src/views/nested/menu1/menu1-1/index.vue

@@ -6,7 +6,7 @@ defineOptions({
   name: "Menu1-1"
 });
 
-let input = ref("");
+const input = ref("");
 const { t } = useI18n();
 </script>
 

+ 1 - 1
src/views/nested/menu1/menu1-2/menu1-2-1/index.vue

@@ -6,7 +6,7 @@ defineOptions({
   name: "Menu1-2-1"
 });
 
-let input = ref("");
+const input = ref("");
 const { t } = useI18n();
 </script>
 

+ 1 - 1
src/views/nested/menu1/menu1-2/menu1-2-2/index.vue

@@ -6,7 +6,7 @@ defineOptions({
   name: "Menu1-2-2"
 });
 
-let input = ref("");
+const input = ref("");
 const { t } = useI18n();
 </script>
 

+ 1 - 1
src/views/nested/menu1/menu1-3/index.vue

@@ -6,7 +6,7 @@ defineOptions({
   name: "Menu1-3"
 });
 
-let input = ref("");
+const input = ref("");
 const { t } = useI18n();
 </script>
 

+ 1 - 1
src/views/nested/menu2/index.vue

@@ -6,7 +6,7 @@ defineOptions({
   name: "Menu2"
 });
 
-let input = ref("");
+const input = ref("");
 const { t } = useI18n();
 </script>
 

+ 1 - 1
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"

+ 2 - 2
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 = [
   {

+ 3 - 3
src/views/system/dept/index.vue

@@ -15,8 +15,8 @@ const form = reactive({
   user: "",
   status: ""
 });
-let dataList = ref([]);
-let loading = ref(true);
+const dataList = ref([]);
+const loading = ref(true);
 const { columns } = useColumns();
 
 const formRef = ref<FormInstance>();
@@ -36,7 +36,7 @@ function handleSelectionChange(val) {
 
 async function onSearch() {
   loading.value = true;
-  let { data } = await getDeptList();
+  const { data } = await getDeptList();
   dataList.value = handleTree(data as any);
   setTimeout(() => {
     loading.value = false;

+ 2 - 2
src/views/system/dict/index.vue

@@ -92,7 +92,7 @@ const dictData = reactive({
   ] as VxeFormPropTypes.Items
 });
 
-let originData = cloneDeep(dictData.tableData);
+const originData = cloneDeep(dictData.tableData);
 
 const xTree = ref<TablePublicMethods>();
 const xForm = ref<FormMethods>();
@@ -195,7 +195,7 @@ const submitEvent = () => {
   }, 500);
 };
 
-let drawer = ref(false);
+const drawer = ref(false);
 
 function onDeploy(value?: object) {
   console.log("onDeploy", value);

+ 3 - 3
src/views/system/role/index.vue

@@ -17,8 +17,8 @@ const form = reactive({
   status: ""
 });
 
-let dataList = ref([]);
-let loading = ref(true);
+const dataList = ref([]);
+const loading = ref(true);
 const { columns } = useColumns();
 
 const formRef = ref<FormInstance>();
@@ -52,7 +52,7 @@ function handleSelectionChange(val) {
 
 async function onSearch() {
   loading.value = true;
-  let { data } = await getRoleList();
+  const { data } = await getRoleList();
   dataList.value = data.list;
   pagination.total = data.total;
   setTimeout(() => {

+ 3 - 3
src/views/system/user/index.vue

@@ -17,8 +17,8 @@ const form = reactive({
   mobile: "",
   status: ""
 });
-let dataList = ref([]);
-let loading = ref(true);
+const dataList = ref([]);
+const loading = ref(true);
 const { columns } = useColumns();
 
 const formRef = ref<FormInstance>();
@@ -52,7 +52,7 @@ function handleSelectionChange(val) {
 
 async function onSearch() {
   loading.value = true;
-  let { data } = await getUserList();
+  const { data } = await getUserList();
   dataList.value = data.list;
   pagination.total = data.total;
   setTimeout(() => {

+ 4 - 4
src/views/system/user/tree.vue

@@ -21,7 +21,7 @@ const searchValue = ref("");
 const { proxy } = getCurrentInstance();
 const treeRef = ref<InstanceType<typeof ElTree>>();
 
-let highlightMap = ref({});
+const highlightMap = ref({});
 
 const filterNode = (value: string, data: Tree) => {
   if (!value) return true;
@@ -45,8 +45,8 @@ function nodeClick(value) {
 }
 
 function toggleRowExpansionAll(status) {
-  let nodes = (proxy.$refs["treeRef"] as any).store._getAllNodes();
-  for (var i = 0; i < nodes.length; i++) {
+  const nodes = (proxy.$refs["treeRef"] as any).store._getAllNodes();
+  for (let i = 0; i < nodes.length; i++) {
     nodes[i].expanded = status;
   }
 }
@@ -63,7 +63,7 @@ watch(searchValue, val => {
 });
 
 onMounted(async () => {
-  let { data } = await getDeptList();
+  const { data } = await getDeptList();
   treeData.value = handleTree(data as any);
 });
 </script>

+ 4 - 4
src/views/tabs/index.vue

@@ -17,9 +17,9 @@ defineOptions({
 });
 
 const { toDetail, router } = useDetail();
-let menusTree = cloneDeep(usePermissionStoreHook().wholeMenus);
+const menusTree = cloneDeep(usePermissionStoreHook().wholeMenus);
 
-let treeData = computed(() => {
+const treeData = computed(() => {
   return appendFieldByUniqueId(deleteChildren(menusTree), 0, {
     disabled: true
   });
@@ -27,13 +27,13 @@ let treeData = computed(() => {
 
 const value = ref<string[]>([]);
 
-let multiTags = computed(() => {
+const multiTags = computed(() => {
   return useMultiTagsStoreHook()?.multiTags;
 });
 
 function onCloseTags() {
   value.value.forEach(uniqueId => {
-    let currentPath =
+    const currentPath =
       getNodeByUniqueId(treeData.value, uniqueId).redirect ??
       getNodeByUniqueId(treeData.value, uniqueId).path;
     useMultiTagsStoreHook().handleTags("splice", currentPath);

+ 1 - 1
src/views/welcome/components/Bar.vue

@@ -4,7 +4,7 @@ import { useDark, useECharts, type EchartOptions } from "@pureadmin/utils";
 
 const { isDark } = useDark();
 
-let theme: EchartOptions["theme"] = computed(() => {
+const theme: EchartOptions["theme"] = computed(() => {
   return isDark.value ? "dark" : "light";
 });
 

+ 2 - 2
src/views/welcome/components/Infinite.vue

@@ -5,7 +5,7 @@ import SeamlessScroll from "@/components/ReSeamlessScroll";
 
 const scroll = templateRef<ElRef | null>("scroll", null);
 
-let listData = ref([
+const listData = ref([
   {
     date: "2021-09-01",
     name: "vue-pure-admin",
@@ -58,7 +58,7 @@ let listData = ref([
   }
 ]);
 
-let classOption = reactive({
+const classOption = reactive({
   direction: "top"
 });
 </script>

+ 1 - 1
src/views/welcome/components/Line.vue

@@ -4,7 +4,7 @@ import { useDark, useECharts, type EchartOptions } from "@pureadmin/utils";
 
 const { isDark } = useDark();
 
-let theme: EchartOptions["theme"] = computed(() => {
+const theme: EchartOptions["theme"] = computed(() => {
   return isDark.value ? "dark" : "light";
 });
 

+ 1 - 1
src/views/welcome/components/Pie.vue

@@ -4,7 +4,7 @@ import { useDark, useECharts, type EchartOptions } from "@pureadmin/utils";
 
 const { isDark } = useDark();
 
-let theme: EchartOptions["theme"] = computed(() => {
+const theme: EchartOptions["theme"] = computed(() => {
   return isDark.value ? "dark" : "light";
 });
 

+ 2 - 2
src/views/welcome/index.vue

@@ -12,13 +12,13 @@ defineOptions({
 });
 
 const date: Date = new Date();
-let loading = ref<boolean>(true);
+const loading = ref<boolean>(true);
 
 setTimeout(() => {
   loading.value = !loading.value;
 }, 800);
 
-let greetings = computed(() => {
+const greetings = computed(() => {
   if (date.getHours() >= 0 && date.getHours() < 12) {
     return "上午阳光明媚,祝你薪水翻倍🌞!";
   } else if (date.getHours() >= 12 && date.getHours() < 18) {

+ 2 - 2
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"]
   },

Some files were not shown because too many files changed in this diff