Browse Source

chore: update deps

Vben 4 years ago
parent
commit
970d4049fd

+ 1 - 0
.vscode/settings.json

@@ -13,6 +13,7 @@
   "editor.cursorBlinking": "phase",
   "editor.cursorSmoothCaretAnimation": true,
   "editor.detectIndentation": false,
+  "editor.defaultFormatter": "esbenp.prettier-vscode",
   "diffEditor.ignoreTrimWhitespace": false,
   "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
   "editor.formatOnPaste": true,

+ 3 - 3
package.json

@@ -68,8 +68,8 @@
     "@types/rollup-plugin-visualizer": "^2.6.0",
     "@types/sortablejs": "^1.10.6",
     "@types/yargs": "^16.0.0",
-    "@typescript-eslint/eslint-plugin": "^4.16.1",
-    "@typescript-eslint/parser": "^4.16.1",
+    "@typescript-eslint/eslint-plugin": "^4.17.0",
+    "@typescript-eslint/parser": "^4.17.0",
     "@vitejs/plugin-legacy": "^1.3.1",
     "@vitejs/plugin-vue": "^1.1.5",
     "@vitejs/plugin-vue-jsx": "^1.1.2",
@@ -106,7 +106,7 @@
     "vite-plugin-compression": "^0.2.3",
     "vite-plugin-html": "^2.0.3",
     "vite-plugin-imagemin": "^0.2.9",
-    "vite-plugin-mock": "^2.2.0",
+    "vite-plugin-mock": "^2.2.2",
     "vite-plugin-purge-icons": "^0.7.0",
     "vite-plugin-pwa": "^0.5.6",
     "vite-plugin-style-import": "^0.8.1",

+ 5 - 20
src/components/Application/src/AppLocalePicker.vue

@@ -9,11 +9,11 @@
     :dropMenuList="localeList"
     :selectedKeys="selectedKeys"
     @menuEvent="handleMenuEvent"
-    :overlayClassName="`${prefixCls}-overlay`"
+    overlayClassName="app-locale-picker-overlay"
   >
-    <span :class="prefixCls">
+    <span class="cursor-pointer flex items-center">
       <Icon icon="ion:language" />
-      <span v-if="showText" :class="`${prefixCls}__text`">{{ getLangText }}</span>
+      <span v-if="showText" class="ml-1">{{ getLangText }}</span>
     </span>
   </Dropdown>
 </template>
@@ -27,7 +27,6 @@
 
   import { useLocale } from '/@/locales/useLocale';
   import { localeList } from '/@/settings/localeSetting';
-  import { useDesign } from '/@/hooks/web/useDesign';
   import { propTypes } from '/@/utils/propTypes';
 
   export default defineComponent({
@@ -42,8 +41,6 @@
     setup(props) {
       const selectedKeys = ref<string[]>([]);
 
-      const { prefixCls } = useDesign('app-locale-picker');
-
       const { changeLocale, getLocale } = useLocale();
 
       const getLangText = computed(() => {
@@ -67,27 +64,15 @@
         toggleLocale(menu.event as string);
       }
 
-      return { localeList, handleMenuEvent, selectedKeys, getLangText, prefixCls };
+      return { localeList, handleMenuEvent, selectedKeys, getLangText };
     },
   });
 </script>
 
 <style lang="less" scoped>
-  @prefix-cls: ~'@{namespace}-app-locale-picker';
-
-  :global(.@{prefix-cls}-overlay) {
+  :global(.app-locale-picker-overlay) {
     .ant-dropdown-menu-item {
       min-width: 160px;
     }
   }
-
-  .@{prefix-cls} {
-    display: flex;
-    align-items: center;
-    cursor: pointer;
-
-    &__text {
-      margin-left: 6px;
-    }
-  }
 </style>

+ 0 - 2
src/components/Application/src/AppLogo.vue

@@ -48,9 +48,7 @@
     setup() {
       const { prefixCls } = useDesign('app-logo');
       const { getCollapsedShowTitle } = useMenuSetting();
-
       const { title } = useGlobSetting();
-
       const go = useGo();
 
       function handleGoHome(): void {

+ 3 - 5
src/components/Application/src/AppProvider.vue

@@ -1,20 +1,17 @@
 <script lang="ts">
-  import type { PropType } from 'vue';
   import { defineComponent, toRefs, ref } from 'vue';
 
   import { createAppProviderContext } from './useAppContext';
 
   import designSetting from '/@/settings/designSetting';
   import { createBreakpointListen } from '/@/hooks/event/useBreakpoint';
+  import { propTypes } from '/@/utils/propTypes';
 
   export default defineComponent({
     name: 'AppProvider',
     inheritAttrs: false,
     props: {
-      prefixCls: {
-        type: String as PropType<string>,
-        default: designSetting.prefixCls,
-      },
+      prefixCls: propTypes.string.def(designSetting.prefixCls),
     },
     setup(props, { slots }) {
       const isMobileRef = ref(false);
@@ -28,6 +25,7 @@
 
       const { prefixCls } = toRefs(props);
       createAppProviderContext({ prefixCls, isMobile: isMobileRef });
+
       return () => slots.default?.();
     },
   });

+ 6 - 18
src/components/Application/src/search/AppSearch.vue

@@ -1,10 +1,10 @@
 <script lang="tsx">
   import { defineComponent, ref, unref } from 'vue';
+
   import { Tooltip } from 'ant-design-vue';
   import { SearchOutlined } from '@ant-design/icons-vue';
   import AppSearchModal from './AppSearchModal.vue';
 
-  import { useDesign } from '/@/hooks/web/useDesign';
   import { useHeaderSetting } from '/@/hooks/setting/useHeaderSetting';
   import { useI18n } from '/@/hooks/web/useI18n';
 
@@ -13,41 +13,29 @@
     components: { AppSearchModal, Tooltip },
     setup() {
       const showModal = ref(false);
-      const { prefixCls } = useDesign('app-search');
       const { getShowSearch } = useHeaderSetting();
       const { t } = useI18n();
 
-      function handleSearch() {
-        showModal.value = true;
-      }
-
-      function handleClose() {
-        showModal.value = false;
+      function changeModal(show: boolean) {
+        showModal.value = show;
       }
 
       return () => {
-        if (!getShowSearch.value) {
+        if (!unref(getShowSearch)) {
           return null;
         }
         return (
-          <div class={prefixCls} onClick={handleSearch}>
+          <div class="p-1" onClick={changeModal.bind(null, true)}>
             <Tooltip>
               {{
                 title: () => t('common.searchText'),
                 default: () => <SearchOutlined />,
               }}
             </Tooltip>
-            <AppSearchModal onClose={handleClose} visible={unref(showModal)} />
+            <AppSearchModal onClose={changeModal.bind(null, false)} visible={unref(showModal)} />
           </div>
         );
       };
     },
   });
 </script>
-<style lang="less" scoped>
-  @prefix-cls: ~'@{namespace}-app-search';
-
-  .@{prefix-cls} {
-    padding: 2px;
-  }
-</style>

+ 7 - 13
src/components/Application/src/search/AppSearchFooter.vue

@@ -1,20 +1,13 @@
 <template>
   <div :class="`${prefixCls}`">
-    <span :class="`${prefixCls}__item`">
-      <Icon icon="ant-design:enter-outlined" />
-    </span>
+    <AppSearchKeyItem :class="`${prefixCls}__item`" icon="ant-design:enter-outlined" />
     <span>{{ t('component.app.toSearch') }}</span>
 
-    <span :class="`${prefixCls}__item`">
-      <Icon icon="bi:arrow-up" />
-    </span>
-    <span :class="`${prefixCls}__item`">
-      <Icon icon="bi:arrow-down" />
-    </span>
+    <AppSearchKeyItem :class="`${prefixCls}__item`" icon="ion:arrow-up-outline" />
+    <AppSearchKeyItem :class="`${prefixCls}__item`" icon="ion:arrow-down-outline" />
     <span>{{ t('component.app.toNavigate') }}</span>
-    <span :class="`${prefixCls}__item`">
-      <Icon icon="mdi:keyboard-esc" />
-    </span>
+    <AppSearchKeyItem :class="`${prefixCls}__item`" icon="mdi:keyboard-esc" />
+
     <span>{{ t('common.closeText') }}</span>
   </div>
 </template>
@@ -22,12 +15,13 @@
 <script lang="ts">
   import { defineComponent } from 'vue';
   import Icon from '/@/components/Icon';
+  import AppSearchKeyItem from './AppSearchKeyItem.vue';
 
   import { useDesign } from '/@/hooks/web/useDesign';
   import { useI18n } from '/@/hooks/web/useI18n';
   export default defineComponent({
     name: 'AppSearchFooter',
-    components: { Icon },
+    components: { Icon, AppSearchKeyItem },
     setup() {
       const { prefixCls } = useDesign('app-search-footer');
       const { t } = useI18n();

+ 17 - 0
src/components/Application/src/search/AppSearchKeyItem.vue

@@ -0,0 +1,17 @@
+<template>
+  <span :class="$attrs.class">
+    <Icon :icon="icon" />
+  </span>
+</template>
+<script lang="ts">
+  import { defineComponent } from 'vue';
+  import Icon from '/@/components/Icon';
+  import { propTypes } from '/@/utils/propTypes';
+
+  export default defineComponent({
+    components: { Icon },
+    props: {
+      icon: propTypes.string,
+    },
+  });
+</script>

+ 6 - 4
src/components/Application/src/search/AppSearchModal.vue

@@ -11,6 +11,7 @@
               @change="handleSearch"
             >
               <template #prefix>
+                <!-- <Icon icon="ion:search"/> -->
                 <SearchOutlined />
               </template>
             </a-input>
@@ -22,6 +23,7 @@
           <div :class="`${prefixCls}-not-data`" v-show="getIsNotData">
             {{ t('component.app.searchNotData') }}
           </div>
+
           <ul :class="`${prefixCls}-list`" v-show="!getIsNotData" ref="scrollWrap">
             <li
               :ref="setRefs(index)"
@@ -56,6 +58,7 @@
 </template>
 <script lang="ts">
   import { defineComponent, computed, unref, ref } from 'vue';
+
   import { SearchOutlined } from '@ant-design/icons-vue';
   import { Input } from 'ant-design-vue';
   import AppSearchFooter from './AppSearchFooter.vue';
@@ -69,15 +72,16 @@
   import { useI18n } from '/@/hooks/web/useI18n';
   import { useAppInject } from '/@/hooks/web/useAppInject';
 
+  import { propTypes } from '/@/utils/propTypes';
+
   export default defineComponent({
     name: 'AppSearchModal',
     components: { Icon, SearchOutlined, AppSearchFooter, [Input.name]: Input },
     directives: {
       clickOutside,
     },
-
     props: {
-      visible: Boolean,
+      visible: propTypes.bool,
     },
     emits: ['close'],
     setup(_, { emit }) {
@@ -143,10 +147,8 @@
     width: 100%;
     height: 100%;
     padding-top: 50px;
-    // background: #656c85cc;
     background: rgba(0, 0, 0, 0.25);
     justify-content: center;
-    // backdrop-filter: blur(2px);
 
     &--mobile {
       padding: 0;

+ 1 - 1
src/components/Authority/src/index.vue

@@ -7,8 +7,8 @@
 
   import { PermissionModeEnum } from '/@/enums/appEnum';
   import { RoleEnum } from '/@/enums/roleEnum';
-  import { useRootSetting } from '/@/hooks/setting/useRootSetting';
 
+  import { useRootSetting } from '/@/hooks/setting/useRootSetting';
   import { usePermission } from '/@/hooks/web/usePermission';
 
   import { getSlot } from '/@/utils/helper/tsxHelper';

+ 3 - 2
src/utils/http/axios/Axios.ts

@@ -1,14 +1,15 @@
 import type { AxiosRequestConfig, AxiosInstance, AxiosResponse } from 'axios';
+import type { RequestOptions, Result, UploadFileParams } from './types';
+import type { CreateAxiosOptions } from './axiosTransform';
 
 import axios from 'axios';
+import qs from 'qs';
 import { AxiosCanceler } from './axiosCancel';
 import { isFunction } from '/@/utils/is';
 import { cloneDeep } from 'lodash-es';
 
-import type { RequestOptions, CreateAxiosOptions, Result, UploadFileParams } from './types';
 import { errorResult } from './const';
 import { ContentTypeEnum } from '/@/enums/httpEnum';
-import qs from 'qs';
 import { RequestEnum } from '../../../enums/httpEnum';
 
 export * from './axiosTransform';

+ 48 - 47
yarn.lock

@@ -1522,13 +1522,13 @@
   dependencies:
     "@types/yargs-parser" "*"
 
-"@typescript-eslint/eslint-plugin@^4.16.1":
-  version "4.16.1"
-  resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.16.1.tgz#2caf6a79dd19c3853b8d39769a27fccb24e4e651"
-  integrity sha512-SK777klBdlkUZpZLC1mPvyOWk9yAFCWmug13eAjVQ4/Q1LATE/NbcQL1xDHkptQkZOLnPmLUA1Y54m8dqYwnoQ==
+"@typescript-eslint/eslint-plugin@^4.17.0":
+  version "4.17.0"
+  resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.17.0.tgz#6f856eca4e6a52ce9cf127dfd349096ad936aa2d"
+  integrity sha512-/fKFDcoHg8oNan39IKFOb5WmV7oWhQe1K6CDaAVfJaNWEhmfqlA24g+u1lqU5bMH7zuNasfMId4LaYWC5ijRLw==
   dependencies:
-    "@typescript-eslint/experimental-utils" "4.16.1"
-    "@typescript-eslint/scope-manager" "4.16.1"
+    "@typescript-eslint/experimental-utils" "4.17.0"
+    "@typescript-eslint/scope-manager" "4.17.0"
     debug "^4.1.1"
     functional-red-black-tree "^1.0.1"
     lodash "^4.17.15"
@@ -1536,60 +1536,60 @@
     semver "^7.3.2"
     tsutils "^3.17.1"
 
-"@typescript-eslint/experimental-utils@4.16.1":
-  version "4.16.1"
-  resolved "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.16.1.tgz#da7a396dc7d0e01922acf102b76efff17320b328"
-  integrity sha512-0Hm3LSlMYFK17jO4iY3un1Ve9x1zLNn4EM50Lia+0EV99NdbK+cn0er7HC7IvBA23mBg3P+8dUkMXy4leL33UQ==
+"@typescript-eslint/experimental-utils@4.17.0":
+  version "4.17.0"
+  resolved "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.17.0.tgz#762c44aaa1a6a3c05b6d63a8648fb89b89f84c80"
+  integrity sha512-ZR2NIUbnIBj+LGqCFGQ9yk2EBQrpVVFOh9/Kd0Lm6gLpSAcCuLLe5lUCibKGCqyH9HPwYC0GIJce2O1i8VYmWA==
   dependencies:
     "@types/json-schema" "^7.0.3"
-    "@typescript-eslint/scope-manager" "4.16.1"
-    "@typescript-eslint/types" "4.16.1"
-    "@typescript-eslint/typescript-estree" "4.16.1"
+    "@typescript-eslint/scope-manager" "4.17.0"
+    "@typescript-eslint/types" "4.17.0"
+    "@typescript-eslint/typescript-estree" "4.17.0"
     eslint-scope "^5.0.0"
     eslint-utils "^2.0.0"
 
-"@typescript-eslint/parser@^4.16.1":
-  version "4.16.1"
-  resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.16.1.tgz#3bbd3234dd3c5b882b2bcd9899bc30e1e1586d2a"
-  integrity sha512-/c0LEZcDL5y8RyI1zLcmZMvJrsR6SM1uetskFkoh3dvqDKVXPsXI+wFB/CbVw7WkEyyTKobC1mUNp/5y6gRvXg==
+"@typescript-eslint/parser@^4.17.0":
+  version "4.17.0"
+  resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.17.0.tgz#141b647ffc72ebebcbf9b0fe6087f65b706d3215"
+  integrity sha512-KYdksiZQ0N1t+6qpnl6JeK9ycCFprS9xBAiIrw4gSphqONt8wydBw4BXJi3C11ywZmyHulvMaLjWsxDjUSDwAw==
   dependencies:
-    "@typescript-eslint/scope-manager" "4.16.1"
-    "@typescript-eslint/types" "4.16.1"
-    "@typescript-eslint/typescript-estree" "4.16.1"
+    "@typescript-eslint/scope-manager" "4.17.0"
+    "@typescript-eslint/types" "4.17.0"
+    "@typescript-eslint/typescript-estree" "4.17.0"
     debug "^4.1.1"
 
-"@typescript-eslint/scope-manager@4.16.1":
-  version "4.16.1"
-  resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.16.1.tgz#244e2006bc60cfe46987e9987f4ff49c9e3f00d5"
-  integrity sha512-6IlZv9JaurqV0jkEg923cV49aAn8V6+1H1DRfhRcvZUrptQ+UtSKHb5kwTayzOYTJJ/RsYZdcvhOEKiBLyc0Cw==
+"@typescript-eslint/scope-manager@4.17.0":
+  version "4.17.0"
+  resolved "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.17.0.tgz#f4edf94eff3b52a863180f7f89581bf963e3d37d"
+  integrity sha512-OJ+CeTliuW+UZ9qgULrnGpPQ1bhrZNFpfT/Bc0pzNeyZwMik7/ykJ0JHnQ7krHanFN9wcnPK89pwn84cRUmYjw==
   dependencies:
-    "@typescript-eslint/types" "4.16.1"
-    "@typescript-eslint/visitor-keys" "4.16.1"
+    "@typescript-eslint/types" "4.17.0"
+    "@typescript-eslint/visitor-keys" "4.17.0"
 
-"@typescript-eslint/types@4.16.1":
-  version "4.16.1"
-  resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.16.1.tgz#5ba2d3e38b1a67420d2487519e193163054d9c15"
-  integrity sha512-nnKqBwMgRlhzmJQF8tnFDZWfunXmJyuXj55xc8Kbfup4PbkzdoDXZvzN8//EiKR27J6vUSU8j4t37yUuYPiLqA==
+"@typescript-eslint/types@4.17.0":
+  version "4.17.0"
+  resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.17.0.tgz#f57d8fc7f31b348db946498a43050083d25f40ad"
+  integrity sha512-RN5z8qYpJ+kXwnLlyzZkiJwfW2AY458Bf8WqllkondQIcN2ZxQowAToGSd9BlAUZDB5Ea8I6mqL2quGYCLT+2g==
 
-"@typescript-eslint/typescript-estree@4.16.1":
-  version "4.16.1"
-  resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.16.1.tgz#c2fc46b05a48fbf8bbe8b66a63f0a9ba04b356f1"
-  integrity sha512-m8I/DKHa8YbeHt31T+UGd/l8Kwr0XCTCZL3H4HMvvLCT7HU9V7yYdinTOv1gf/zfqNeDcCgaFH2BMsS8x6NvJg==
+"@typescript-eslint/typescript-estree@4.17.0":
+  version "4.17.0"
+  resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.17.0.tgz#b835d152804f0972b80dbda92477f9070a72ded1"
+  integrity sha512-lRhSFIZKUEPPWpWfwuZBH9trYIEJSI0vYsrxbvVvNyIUDoKWaklOAelsSkeh3E2VBSZiNe9BZ4E5tYBZbUczVQ==
   dependencies:
-    "@typescript-eslint/types" "4.16.1"
-    "@typescript-eslint/visitor-keys" "4.16.1"
+    "@typescript-eslint/types" "4.17.0"
+    "@typescript-eslint/visitor-keys" "4.17.0"
     debug "^4.1.1"
     globby "^11.0.1"
     is-glob "^4.0.1"
     semver "^7.3.2"
     tsutils "^3.17.1"
 
-"@typescript-eslint/visitor-keys@4.16.1":
-  version "4.16.1"
-  resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.16.1.tgz#d7571fb580749fae621520deeb134370bbfc7293"
-  integrity sha512-s/aIP1XcMkEqCNcPQtl60ogUYjSM8FU2mq1O7y5cFf3Xcob1z1iXWNB6cC43Op+NGRTFgGolri6s8z/efA9i1w==
+"@typescript-eslint/visitor-keys@4.17.0":
+  version "4.17.0"
+  resolved "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.17.0.tgz#9c304cfd20287c14a31d573195a709111849b14d"
+  integrity sha512-WfuMN8mm5SSqXuAr9NM+fItJ0SVVphobWYkWOwQ1odsfC014Vdxk/92t4JwS1Q6fCA/ABfCKpa3AVtpUKTNKGQ==
   dependencies:
-    "@typescript-eslint/types" "4.16.1"
+    "@typescript-eslint/types" "4.17.0"
     eslint-visitor-keys "^2.0.0"
 
 "@vitejs/plugin-legacy@^1.3.1":
@@ -3704,7 +3704,7 @@ esbuild-register@^2.2.0:
   dependencies:
     jsonc-parser "^3.0.0"
 
-esbuild@0.8.57, esbuild@^0.8.52, esbuild@^0.8.54, esbuild@^0.8.56, esbuild@^0.8.57:
+esbuild@0.8.57, esbuild@^0.8.52, esbuild@^0.8.56, esbuild@^0.8.57:
   version "0.8.57"
   resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.8.57.tgz#a42d02bc2b57c70bcd0ef897fe244766bb6dd926"
   integrity sha512-j02SFrUwFTRUqiY0Kjplwjm1psuzO1d6AjaXKuOR9hrY0HuPsT6sV42B6myW34h1q4CRy+Y3g4RU/cGJeI/nNA==
@@ -9113,10 +9113,10 @@ vite-plugin-imagemin@^0.2.9:
     imagemin-svgo "^8.0.0"
     imagemin-webp "^6.0.0"
 
-vite-plugin-mock@^2.2.0:
-  version "2.2.0"
-  resolved "https://registry.npmjs.org/vite-plugin-mock/-/vite-plugin-mock-2.2.0.tgz#ecdfed8b46b9d9113bf036757721b24c6c45817b"
-  integrity sha512-CukTLrbVPFJIdE6gLaVGF6f66CF4ur0EOOo2kc7Ae+l/3p7vDMdqaJgaH+8pEVYMH6Q04SIJQeEsotSuhiN1Eg==
+vite-plugin-mock@^2.2.2:
+  version "2.2.2"
+  resolved "https://registry.npmjs.org/vite-plugin-mock/-/vite-plugin-mock-2.2.2.tgz#94c5aa6851c82f30417e9dd0feedf809e9ff6265"
+  integrity sha512-2qqQvjQHS2ENxdyNqHlUKdo4hx7EDAlZ3CW+sUKmjZi/3ItvMJdSbKvIkiM/aBb3MEI450iAdxLOPubikDkGhQ==
   dependencies:
     "@rollup/plugin-node-resolve" "^11.2.0"
     "@types/mockjs" "^1.0.3"
@@ -9124,8 +9124,9 @@ vite-plugin-mock@^2.2.0:
     chokidar "^3.5.1"
     connect "^3.7.0"
     debug "^4.3.2"
-    esbuild "^0.8.54"
+    esbuild "^0.8.57"
     fast-glob "^3.2.5"
+    path-to-regexp "^6.2.0"
     rollup "^2.40.0"
     rollup-plugin-esbuild "^2.6.1"