Skip to content

Commit

Permalink
fix: fix antdv console warning
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Jun 26, 2021
1 parent 0e414ba commit 480cfb9
Show file tree
Hide file tree
Showing 10 changed files with 89 additions and 88 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.zh_CN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Wip

### ⚡ Performance Improvements

- 升级`vue``ant-design-vue`版本,解决兼容问题

### 🐛 Bug Fixes

- **Table** 修复分页抖动问题
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@logicflow/extension": "^0.5.0",
"@vueuse/core": "^5.0.3",
"@zxcvbn-ts/core": "^0.3.0",
"ant-design-vue": "2.1.6",
"ant-design-vue": "2.2.0-beta.6",
"axios": "^0.21.1",
"codemirror": "^5.62.0",
"cropperjs": "^1.5.12",
Expand All @@ -56,7 +56,7 @@
"sortablejs": "^1.13.0",
"tinymce": "^5.8.2",
"vditor": "^3.8.5",
"vue": "3.0.11",
"vue": "3.1.2",
"vue-i18n": "9.1.6",
"vue-json-pretty": "^2.0.2",
"vue-router": "^4.0.10",
Expand Down Expand Up @@ -86,7 +86,7 @@
"@vitejs/plugin-legacy": "^1.4.2",
"@vitejs/plugin-vue": "^1.2.3",
"@vitejs/plugin-vue-jsx": "^1.1.5",
"@vue/compiler-sfc": "3.0.11",
"@vue/compiler-sfc": "3.1.2",
"@vue/test-utils": "^2.0.0-rc.9",
"autoprefixer": "^10.2.6",
"commitizen": "^4.2.4",
Expand Down
7 changes: 1 addition & 6 deletions src/components/Form/src/hooks/useAdvanced.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,7 @@ export default function ({
const debounceUpdateAdvanced = useDebounceFn(updateAdvanced, 30);

watch(
[
// TODO
// () => unref(getSchema),
() => advanceState.isAdvanced,
() => unref(realWidthRef),
],
[() => unref(getSchema), () => advanceState.isAdvanced, () => unref(realWidthRef)],
() => {
const { showAdvancedButton } = unref(getProps);
if (showAdvancedButton) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Menu/src/components/BasicMenuItem.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<MenuItem>
<MenuItem :key="item.path">
<!-- <MenuItem :class="getLevelClass"> -->
<MenuItemContent v-bind="$props" :item="item" />
</MenuItem>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Menu/src/components/BasicSubMenuItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<SubMenu
v-if="menuHasChildren(item) && getShowMenu"
:class="[theme]"
:key="`submenu-${item.path}`"
popupClassName="app-top-menu-popup"
>
<template #title>
Expand All @@ -16,7 +17,6 @@
</template>
<script lang="ts">
import type { Menu as MenuType } from '/@/router/types';
import { defineComponent, computed } from 'vue';
import { Menu } from 'ant-design-vue';
import { useDesign } from '/@/hooks/web/useDesign';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Menu/src/components/MenuItemContent.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<span :class="`${prefixCls}- flex items-center `">
<Icon v-if="getIcon" :icon="getIcon" :size="18" :class="`${prefixCls}-wrapper__icon`" />
<Icon v-if="getIcon" :icon="getIcon" :size="18" :class="`${prefixCls}-wrapper__icon mr-2`" />
{{ getI18nName }}
</span>
</template>
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/web/usePermission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ export function usePermission() {
if (!value) {
return def;
}
const allCodeList = permissionStore.getPermCodeList;
const allCodeList = permissionStore.getPermCodeList as string[];
if (!isArray(value)) {
return allCodeList.includes(value as string);
return allCodeList.includes(value);
}
return (intersection(value, allCodeList) as string[]).length > 0;
}
Expand Down
4 changes: 3 additions & 1 deletion src/hooks/web/useWatermark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { getCurrentInstance, onBeforeUnmount, ref, Ref, unref } from 'vue';

const domSymbol = Symbol('watermark-dom');

export function useWatermark(appendEl: Ref<HTMLElement | null> = ref(document.body)) {
export function useWatermark(
appendEl: Ref<HTMLElement | null> = ref(document.body) as Ref<HTMLElement>
) {
let func: Fn = () => {};
const id = domSymbol.toString();
const clear = () => {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@
"mock/**/*.ts",
"vite.config.ts"
],
"exclude": ["node_modules", "dist", "**/*.js"]
"exclude": ["node_modules", "tests/server/**/*.ts", "dist", "**/*.js"]
}
144 changes: 72 additions & 72 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1816,7 +1816,7 @@
resolved "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.0.1.tgz#3a4bd24518b0e6c5940da4e2659eeb2ef0806963"
integrity sha512-6+OPzqhKX/cx5xh+yO8Cqg3u3alrkhoxhE5ZOdSEv0DOzJ13lwJ6laqGU0Kv6+XDMFmlnGId04LtY22PsFLQUw==

"@types/estree@*":
"@types/estree@*", "@types/estree@^0.0.48":
version "0.0.48"
resolved "https://registry.npmjs.org/@types/estree/-/estree-0.0.48.tgz#18dc8091b285df90db2f25aa7d906cfc394b7f74"
integrity sha512-LfZwXoGUDo0C3me81HXgkBg5CTQYb6xzEl+fNmbO4JdRiSKQ8A0GD1OBBvKAIsbCUgoyAty7m99GqqMQe784ew==
Expand Down Expand Up @@ -2316,17 +2316,6 @@
html-tags "^3.1.0"
svg-tags "^1.0.0"

"@vue/[email protected]":
version "3.0.11"
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.0.11.tgz#5ef579e46d7b336b8735228758d1c2c505aae69a"
integrity sha512-6sFj6TBac1y2cWCvYCA8YzHJEbsVkX7zdRs/3yK/n1ilvRqcn983XvpBbnN3v4mZ1UiQycTvOiajJmOgN9EVgw==
dependencies:
"@babel/parser" "^7.12.0"
"@babel/types" "^7.12.0"
"@vue/shared" "3.0.11"
estree-walker "^2.0.1"
source-map "^0.6.1"

"@vue/[email protected]":
version "3.1.1"
resolved "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.1.1.tgz#4f2c5d70eabd454675714cc8bd2b97f6a8efb196"
Expand All @@ -2338,13 +2327,16 @@
estree-walker "^2.0.1"
source-map "^0.6.1"

"@vue/compiler-dom@3.0.11":
version "3.0.11"
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.0.11.tgz#b15fc1c909371fd671746020ba55b5dab4a730ee"
integrity sha512-+3xB50uGeY5Fv9eMKVJs2WSRULfgwaTJsy23OIltKgMrynnIj8hTYY2UL97HCoz78aDw1VDXdrBQ4qepWjnQcw==
"@vue/compiler-core@3.1.2":
version "3.1.2"
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.1.2.tgz#31ab1d88e1706a5c7a545faeeb64c31bd0101db0"
integrity sha512-nHmq7vLjq/XM2IMbZUcKWoH5sPXa2uR/nIKZtjbK5F3TcbnYE/zKsrSUR9WZJ03unlwotNBX1OyxVt9HbWD7/Q==
dependencies:
"@vue/compiler-core" "3.0.11"
"@vue/shared" "3.0.11"
"@babel/parser" "^7.12.0"
"@babel/types" "^7.12.0"
"@vue/shared" "3.1.2"
estree-walker "^2.0.1"
source-map "^0.6.1"

"@vue/[email protected]", "@vue/compiler-dom@^3.0.11":
version "3.1.1"
Expand All @@ -2354,17 +2346,26 @@
"@vue/compiler-core" "3.1.1"
"@vue/shared" "3.1.1"

"@vue/[email protected]":
version "3.0.11"
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.0.11.tgz#cd8ca2154b88967b521f5ad3b10f5f8b6b665679"
integrity sha512-7fNiZuCecRleiyVGUWNa6pn8fB2fnuJU+3AGjbjl7r1P5wBivfl02H4pG+2aJP5gh2u+0wXov1W38tfWOphsXw==
"@vue/[email protected]":
version "3.1.2"
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.1.2.tgz#75a7731bcc5d9718183a3c56c18e992f7c13e7b1"
integrity sha512-k2+SWcWH0jL6WQAX7Or2ONqu5MbtTgTO0dJrvebQYzgqaKMXNI90RNeWeCxS4BnNFMDONpHBeFgbwbnDWIkmRg==
dependencies:
"@vue/compiler-core" "3.1.2"
"@vue/shared" "3.1.2"

"@vue/[email protected]":
version "3.1.2"
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.1.2.tgz#23ff1e366d887b964899568bffcb11e3d0511fc4"
integrity sha512-SeG/2+DvwejQ7oAiSx8BrDh5qOdqCYHGClPiTvVIHTfSIHiS2JjMbCANdDCjHkTOh/O7WZzo2JhdKm98bRBxTw==
dependencies:
"@babel/parser" "^7.13.9"
"@babel/types" "^7.13.0"
"@vue/compiler-core" "3.0.11"
"@vue/compiler-dom" "3.0.11"
"@vue/compiler-ssr" "3.0.11"
"@vue/shared" "3.0.11"
"@types/estree" "^0.0.48"
"@vue/compiler-core" "3.1.2"
"@vue/compiler-dom" "3.1.2"
"@vue/compiler-ssr" "3.1.2"
"@vue/shared" "3.1.2"
consolidate "^0.16.0"
estree-walker "^2.0.1"
hash-sum "^2.0.0"
Expand Down Expand Up @@ -2398,14 +2399,6 @@
postcss-selector-parser "^6.0.4"
source-map "^0.6.1"

"@vue/[email protected]":
version "3.0.11"
resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.0.11.tgz#ac5a05fd1257412fa66079c823d8203b6a889a13"
integrity sha512-66yUGI8SGOpNvOcrQybRIhl2M03PJ+OrDPm78i7tvVln86MHTKhM3ERbALK26F7tXl0RkjX4sZpucCpiKs3MnA==
dependencies:
"@vue/compiler-dom" "3.0.11"
"@vue/shared" "3.0.11"

"@vue/[email protected]":
version "3.1.1"
resolved "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.1.1.tgz#1d08b98601397258ed059b75966e0e94a385d770"
Expand All @@ -2414,32 +2407,32 @@
"@vue/compiler-dom" "3.1.1"
"@vue/shared" "3.1.1"

"@vue/[email protected]":
version "3.1.2"
resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.1.2.tgz#e33ad0876d9b96f0950e22b0e174b94c1b049d2d"
integrity sha512-BwXo9LFk5OSWdMyZQ4bX1ELHX0Z/9F+ld/OaVnpUPzAZCHslBYLvyKUVDwv2C/lpLjRffpC2DOUEdl1+RP1aGg==
dependencies:
"@vue/compiler-dom" "3.1.2"
"@vue/shared" "3.1.2"

"@vue/devtools-api@^6.0.0-beta.14", "@vue/devtools-api@^6.0.0-beta.7":
version "6.0.0-beta.14"
resolved "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-6.0.0-beta.14.tgz#6ed2d6f8d66a9256c9ad04bfff08309ba87b9723"
integrity sha512-44fPrrN1cqcs6bFkT0C+yxTM6PZXLbR+ESh1U1j8UD22yO04gXvxH62HApMjLbS3WqJO/iCNC+CYT+evPQh2EQ==

"@vue/[email protected]":
version "3.0.11"
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.0.11.tgz#07b588349fd05626b17f3500cbef7d4bdb4dbd0b"
integrity sha512-SKM3YKxtXHBPMf7yufXeBhCZ4XZDKP9/iXeQSC8bBO3ivBuzAi4aZi0bNoeE2IF2iGfP/AHEt1OU4ARj4ao/Xw==
dependencies:
"@vue/shared" "3.0.11"

"@vue/[email protected]", "@vue/reactivity@^3.0.11":
version "3.1.1"
resolved "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.1.1.tgz#9c02fd146a6c3b03e7d658b7cf76f4b69b0f98c8"
integrity sha512-DsH5woNVCcPK1M0RRYVgJEU1GJDU2ASOKpAqW3ppHk+XjoFLCbqc/26RTCgTpJYd9z8VN+79Q1u7/QqgQPbuLQ==
dependencies:
"@vue/shared" "3.1.1"

"@vue/runtime-core@3.0.11":
version "3.0.11"
resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.0.11.tgz#c52dfc6acf3215493623552c1c2919080c562e44"
integrity sha512-87XPNwHfz9JkmOlayBeCCfMh9PT2NBnv795DSbi//C/RaAnc/bGZgECjmkD7oXJ526BZbgk9QZBPdFT8KMxkAg==
"@vue/reactivity@3.1.2":
version "3.1.2"
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.1.2.tgz#66fa530dd726d2fef285ae55d02106a727db463b"
integrity sha512-glJzJoN2xE7I2lRvwKM5u1BHRPTd1yc8iaf//Lai/78/uYAvE5DXp5HzWRFOwMlbRvMGJHIQjOqoxj87cDAaag==
dependencies:
"@vue/reactivity" "3.0.11"
"@vue/shared" "3.0.11"
"@vue/shared" "3.1.2"

"@vue/[email protected]":
version "3.1.1"
Expand All @@ -2449,14 +2442,13 @@
"@vue/reactivity" "3.1.1"
"@vue/shared" "3.1.1"

"@vue/runtime-dom@3.0.11":
version "3.0.11"
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.0.11.tgz#7a552df21907942721feb6961c418e222a699337"
integrity sha512-jm3FVQESY3y2hKZ2wlkcmFDDyqaPyU3p1IdAX92zTNeCH7I8zZ37PtlE1b9NlCtzV53WjB4TZAYh9yDCMIEumA==
"@vue/runtime-core@3.1.2":
version "3.1.2"
resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.1.2.tgz#f4dbc503cfc9a02ab5f1ebe002c3322512064a54"
integrity sha512-gsPZG4dRIkixuuKmoj4P9IHgfT0yaFLcqWOM5F/bCk0nxQn1XtxH8oUehWuET726KhbukvDoJfe9G2CKviy80w==
dependencies:
"@vue/runtime-core" "3.0.11"
"@vue/shared" "3.0.11"
csstype "^2.6.8"
"@vue/reactivity" "3.1.2"
"@vue/shared" "3.1.2"

"@vue/[email protected]":
version "3.1.1"
Expand All @@ -2467,16 +2459,25 @@
"@vue/shared" "3.1.1"
csstype "^2.6.8"

"@vue/[email protected]":
version "3.0.11"
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.0.11.tgz#20d22dd0da7d358bb21c17f9bde8628152642c77"
integrity sha512-b+zB8A2so8eCE0JsxjL24J7vdGl8rzPQ09hZNhystm+KqSbKcAej1A+Hbva1rCMmTTqA+hFnUSDc5kouEo0JzA==
"@vue/[email protected]":
version "3.1.2"
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.1.2.tgz#0fd8724f14bc7ba64b6c954d874a8d8a4fcb5fe9"
integrity sha512-QvINxjLucEZFzp5f0NVu7JqWYCv5TKQfkH2FDs/N6QNE4iKcYtKrWdT0HKfABnVXG28Znqv6rIH0dH4ZAOwxpA==
dependencies:
"@vue/runtime-core" "3.1.2"
"@vue/shared" "3.1.2"
csstype "^2.6.8"

"@vue/[email protected]", "@vue/shared@^3.0.11":
version "3.1.1"
resolved "https://registry.npmjs.org/@vue/shared/-/shared-3.1.1.tgz#2287cfc3dc20e5b20aeb65c2c3a56533bdca801c"
integrity sha512-g+4pzAw7PYSjARtLBoDq6DmcblX8i9KJHSCnyM5VDDFFifUaUT9iHbFpOF/KOizQ9f7QAqU2JH3Y6aXjzUMhVA==

"@vue/[email protected]":
version "3.1.2"
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.1.2.tgz#1069c0bc7d6f4bd15ccf3a5f3be29450aca368f9"
integrity sha512-EmH/poaDWBPJaPILXNI/1fvUbArJQmmTyVCwvvyDYDFnkPoTclAbHRAtyIvqfez7jybTDn077HTNILpxlsoWhg==

"@vue/test-utils@^2.0.0-rc.9":
version "2.0.0-rc.9"
resolved "https://registry.npmjs.org/@vue/test-utils/-/test-utils-2.0.0-rc.9.tgz#b3f817d710a1d0ae2084143520c9d8d3c552bfa6"
Expand Down Expand Up @@ -2675,24 +2676,23 @@ ansi-styles@^5.0.0:
resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b"
integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==

ant-design-vue@2.1.6:
version "2.1.6"
resolved "https://registry.yarnpkg.com/ant-design-vue/-/ant-design-vue-2.1.6.tgz#c51cdc858e1b1b8b569f5435eb487f53a3f1745e"
integrity sha512-qICxb6Y4f7QuSuh/jbLhZA9SkUBnP9xYfy/E6yD7+1fg04aAzmRK8oLv8ETuGTrROVdSVeic9v/NS2BXEuuARg==
ant-design-vue@2.2.0-beta.6:
version "2.2.0-beta.6"
resolved "https://registry.yarnpkg.com/ant-design-vue/-/ant-design-vue-2.2.0-beta.6.tgz#14b20bc7723d9fc628c87870ee5ea4b78a220f8d"
integrity sha512-t0hG5W62mHnFyxYf6rztQlaVZMpziyz7jTbeRibBp72h46kIrO3d+RdJhLJQs8T7gfPzj7jJmVq2KFn0s5QeVw==
dependencies:
"@ant-design-vue/use" "^0.0.1-0"
"@ant-design/icons-vue" "^6.0.0"
"@babel/runtime" "^7.10.5"
"@simonwep/pickr" "~1.8.0"
array-tree-filter "^2.1.0"
async-validator "^3.3.0"
dom-align "^1.10.4"
dom-align "^1.12.1"
dom-scroll-into-view "^2.0.0"
lodash "^4.17.21"
lodash-es "^4.17.15"
moment "^2.27.0"
omit.js "^2.0.0"
resize-observer-polyfill "^1.5.1"
scroll-into-view-if-needed "^2.2.25"
shallow-equal "^1.0.0"
vue-types "^3.0.0"
Expand Down Expand Up @@ -4591,7 +4591,7 @@ doctypes@^1.1.0:
resolved "https://registry.npmjs.org/doctypes/-/doctypes-1.1.0.tgz#ea80b106a87538774e8a3a4a5afe293de489e0a9"
integrity sha1-6oCxBqh1OHdOijpKWv4pPeSJ4Kk=

dom-align@^1.10.4:
dom-align@^1.12.1:
version "1.12.2"
resolved "https://registry.yarnpkg.com/dom-align/-/dom-align-1.12.2.tgz#0f8164ebd0c9c21b0c790310493cd855892acd4b"
integrity sha512-pHuazgqrsTFrGU2WLDdXxCFabkdQDx72ddkraZNih1KsMcN5qsRSTR9O4VJRlwTPCPb5COYg3LOfiMHHcPInHg==
Expand Down Expand Up @@ -12511,14 +12511,14 @@ vue-types@^3.0.0, vue-types@^3.0.2:
dependencies:
is-plain-object "3.0.1"

vue@3.0.11:
version "3.0.11"
resolved "https://registry.yarnpkg.com/vue/-/vue-3.0.11.tgz#c82f9594cbf4dcc869241d4c8dd3e08d9a8f4b5f"
integrity sha512-3/eUi4InQz8MPzruHYSTQPxtM3LdZ1/S/BvaU021zBnZi0laRUyH6pfuE4wtUeLvI8wmUNwj5wrZFvbHUXL9dw==
vue@3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/vue/-/vue-3.1.2.tgz#647f8e3949a3d600771dca25d50225dc3e594c64"
integrity sha512-q/rbKpb7aofax4ugqu2k/uj7BYuNPcd6Z5/qJtfkJQsE0NkwVoCyeSh7IZGH61hChwYn3CEkh4bHolvUPxlQ+w==
dependencies:
"@vue/compiler-dom" "3.0.11"
"@vue/runtime-dom" "3.0.11"
"@vue/shared" "3.0.11"
"@vue/compiler-dom" "3.1.2"
"@vue/runtime-dom" "3.1.2"
"@vue/shared" "3.1.2"

vue@^3.0.0:
version "3.1.1"
Expand Down

0 comments on commit 480cfb9

Please sign in to comment.