From de0696b4f606fadf8379bfa5fd5f711888107122 Mon Sep 17 00:00:00 2001 From: jeremywu <591449570@qq.com> Date: Tue, 1 Dec 2020 10:28:42 +0800 Subject: [PATCH] core/bumping-dependency-vue-version (#729) * bumping version * build(core): bumping vue version - Bumping up vue version from ^3.0.0 to ^3.0.3 due to the change of `emitOptions` * Remove transition mock/Add before-enter and before-leave hook emitter for popper --- package.json | 8 +- packages/alert/package.json | 2 +- packages/aside/package.json | 2 +- packages/autocomplete/package.json | 2 +- packages/avatar/package.json | 2 +- packages/backtop/package.json | 2 +- packages/badge/package.json | 2 +- packages/breadcrumb-item/package.json | 2 +- packages/breadcrumb/package.json | 2 +- packages/button-group/package.json | 2 +- packages/button/package.json | 2 +- packages/calendar/package.json | 2 +- packages/card/package.json | 2 +- packages/carousel-item/package.json | 2 +- packages/carousel/package.json | 2 +- packages/cascader-panel/package.json | 2 +- packages/cascader/package.json | 2 +- packages/checkbox-button/package.json | 2 +- packages/checkbox-group/package.json | 2 +- packages/checkbox/package.json | 2 +- packages/col/package.json | 2 +- packages/collapse-item/package.json | 2 +- packages/collapse-transition/package.json | 2 +- packages/collapse/package.json | 2 +- packages/color-picker/package.json | 2 +- packages/container/package.json | 2 +- packages/date-picker/package.json | 2 +- packages/dialog/package.json | 2 +- packages/directives/package.json | 2 +- packages/divider/package.json | 2 +- packages/drawer/package.json | 2 +- packages/dropdown-item/package.json | 2 +- packages/dropdown-menu/package.json | 2 +- packages/dropdown/package.json | 2 +- packages/footer/package.json | 2 +- packages/form-item/package.json | 2 +- packages/form/package.json | 2 +- packages/header/package.json | 2 +- packages/hooks/package.json | 2 +- packages/icon/package.json | 2 +- packages/image/package.json | 2 +- packages/infinite-scroll/package.json | 2 +- packages/input-number/package.json | 2 +- packages/input/package.json | 2 +- packages/link/package.json | 2 +- packages/loading/package.json | 2 +- packages/locale/package.json | 2 +- packages/main/package.json | 2 +- packages/menu-item-group/package.json | 2 +- packages/menu-item/package.json | 2 +- packages/menu/package.json | 2 +- packages/message-box/package.json | 2 +- packages/message/package.json | 2 +- packages/notification/package.json | 2 +- packages/option-group/package.json | 2 +- packages/option/package.json | 2 +- packages/overlay/package.json | 2 +- packages/page-header/package.json | 2 +- packages/pagination/package.json | 2 +- packages/popconfirm/package.json | 2 +- packages/popover/package.json | 2 +- packages/popper/__tests__/popper.spec.ts | 14 +- packages/popper/package.json | 2 +- packages/popper/src/index.vue | 8 +- packages/popper/src/renderers/popper.ts | 12 +- packages/popper/src/use-popper/index.ts | 8 +- packages/progress/package.json | 2 +- packages/radio-button/package.json | 2 +- packages/radio-group/package.json | 2 +- packages/radio/package.json | 2 +- packages/rate/package.json | 2 +- packages/row/package.json | 2 +- packages/scrollbar/package.json | 2 +- packages/select/package.json | 2 +- packages/slider/package.json | 2 +- packages/step/package.json | 2 +- packages/steps/package.json | 2 +- packages/submenu/package.json | 2 +- packages/switch/package.json | 2 +- packages/tab-pane/package.json | 2 +- packages/table-column/package.json | 2 +- packages/table/package.json | 2 +- packages/tabs/package.json | 2 +- packages/tag/package.json | 2 +- packages/test-utils/package.json | 2 +- packages/test-utils/tick.ts | 10 ++ packages/time-picker/package.json | 2 +- packages/time-select/package.json | 2 +- packages/timeline-item/package.json | 2 +- packages/timeline/package.json | 2 +- packages/tooltip/package.json | 2 +- packages/tooltip/src/index.ts | 1 + packages/transfer/package.json | 2 +- packages/transfer/src/index.vue | 4 +- packages/transfer/src/transfer-panel.vue | 4 +- packages/transfer/src/transfer.ts | 2 +- packages/transfer/src/useCheck.ts | 3 +- packages/transfer/src/useCheckedChange.ts | 6 +- packages/transition/package.json | 2 +- packages/tree/__tests__/tree.spec.ts | 12 +- packages/tree/package.json | 2 +- packages/upload/package.json | 2 +- packages/utils/package.json | 2 +- scripts/gc.sh | 2 +- yarn.lock | 162 +++++++++++++--------- 105 files changed, 245 insertions(+), 191 deletions(-) diff --git a/package.json b/package.json index 438518c274..4d65888ead 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "upgrade:vue": "bash ./scripts/update-versions.sh" }, "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@babel/cli": "^7.12.1", @@ -46,7 +46,7 @@ "@typescript-eslint/eslint-plugin": "^3.10.1", "@typescript-eslint/parser": "^3.10.1", "@vue/babel-plugin-jsx": "^1.0.0-rc.3", - "@vue/compiler-sfc": "^3.0.0", + "@vue/compiler-sfc": "^3.0.3", "@vue/component-compiler-utils": "^3.2.0", "algoliasearch": "^4.4.0", "babel-jest": "^26.3.0", @@ -92,8 +92,8 @@ "ts-loader": "^8.0.3", "typescript": "^4.0.2", "url-loader": "^4.1.0", - "vue-jest": "5.0.0-alpha.1", - "vue-loader": "16.0.0-beta.7", + "vue-jest": "5.0.0-alpha.5", + "vue-loader": "^16.1.0", "vue-router": "^4.0.0-beta.4", "vue-template-compiler": "^2.6.12", "webpack": "^4.44.1", diff --git a/packages/alert/package.json b/packages/alert/package.json index 2c1e47cfa1..60ebf1a251 100644 --- a/packages/alert/package.json +++ b/packages/alert/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/aside/package.json b/packages/aside/package.json index 28a58b2cb7..8b7ff9b292 100644 --- a/packages/aside/package.json +++ b/packages/aside/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/autocomplete/package.json b/packages/autocomplete/package.json index 7c673c3559..605825cddd 100644 --- a/packages/autocomplete/package.json +++ b/packages/autocomplete/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/avatar/package.json b/packages/avatar/package.json index c9c14350be..930b68abc5 100644 --- a/packages/avatar/package.json +++ b/packages/avatar/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/backtop/package.json b/packages/backtop/package.json index 6e700ca9de..cd49dcb875 100644 --- a/packages/backtop/package.json +++ b/packages/backtop/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/badge/package.json b/packages/badge/package.json index 40f7cc873b..2b28615880 100644 --- a/packages/badge/package.json +++ b/packages/badge/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@element-plus/button": "^0.0.0", diff --git a/packages/breadcrumb-item/package.json b/packages/breadcrumb-item/package.json index ed30b0104a..60cbca0c05 100644 --- a/packages/breadcrumb-item/package.json +++ b/packages/breadcrumb-item/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/breadcrumb/package.json b/packages/breadcrumb/package.json index fd26917da5..46364201e3 100644 --- a/packages/breadcrumb/package.json +++ b/packages/breadcrumb/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/button-group/package.json b/packages/button-group/package.json index 508016033a..75b4fade06 100644 --- a/packages/button-group/package.json +++ b/packages/button-group/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/button/package.json b/packages/button/package.json index 4d23b6ca66..64597baa48 100644 --- a/packages/button/package.json +++ b/packages/button/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/calendar/package.json b/packages/calendar/package.json index 7f577f649b..24ed08f711 100644 --- a/packages/calendar/package.json +++ b/packages/calendar/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/card/package.json b/packages/card/package.json index 45df934f9a..cdf25a470c 100644 --- a/packages/card/package.json +++ b/packages/card/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/carousel-item/package.json b/packages/carousel-item/package.json index 7efd349d0e..ee9ddb7399 100644 --- a/packages/carousel-item/package.json +++ b/packages/carousel-item/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/carousel/package.json b/packages/carousel/package.json index 3c7b672c9d..afe704cb81 100644 --- a/packages/carousel/package.json +++ b/packages/carousel/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.0" diff --git a/packages/cascader-panel/package.json b/packages/cascader-panel/package.json index 26b34e87ac..4352500057 100644 --- a/packages/cascader-panel/package.json +++ b/packages/cascader-panel/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/cascader/package.json b/packages/cascader/package.json index 5a85c14231..e1b8e526d8 100644 --- a/packages/cascader/package.json +++ b/packages/cascader/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/checkbox-button/package.json b/packages/checkbox-button/package.json index 439af31d49..1296b7d642 100644 --- a/packages/checkbox-button/package.json +++ b/packages/checkbox-button/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/checkbox-group/package.json b/packages/checkbox-group/package.json index f1465becb3..e93551751d 100644 --- a/packages/checkbox-group/package.json +++ b/packages/checkbox-group/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/checkbox/package.json b/packages/checkbox/package.json index 58ff2f3d8a..8419507466 100644 --- a/packages/checkbox/package.json +++ b/packages/checkbox/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/col/package.json b/packages/col/package.json index 1dfed33067..471bd00fcc 100644 --- a/packages/col/package.json +++ b/packages/col/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/collapse-item/package.json b/packages/collapse-item/package.json index 03e889d2e9..c8874480be 100644 --- a/packages/collapse-item/package.json +++ b/packages/collapse-item/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/collapse-transition/package.json b/packages/collapse-transition/package.json index 49d824d46d..994b4290c6 100644 --- a/packages/collapse-transition/package.json +++ b/packages/collapse-transition/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/collapse/package.json b/packages/collapse/package.json index cf135c5275..c1d39ecc60 100644 --- a/packages/collapse/package.json +++ b/packages/collapse/package.json @@ -8,7 +8,7 @@ "@element-plus/utils": "^0.0.0" }, "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/color-picker/package.json b/packages/color-picker/package.json index 9cacb98c55..0f06dbb2eb 100644 --- a/packages/color-picker/package.json +++ b/packages/color-picker/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.0" diff --git a/packages/container/package.json b/packages/container/package.json index af056b141d..ba56dd0b85 100644 --- a/packages/container/package.json +++ b/packages/container/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/date-picker/package.json b/packages/date-picker/package.json index b36b5cdd2b..54e6503559 100644 --- a/packages/date-picker/package.json +++ b/packages/date-picker/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/dialog/package.json b/packages/dialog/package.json index b4b3f723b1..c66c035bbd 100644 --- a/packages/dialog/package.json +++ b/packages/dialog/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.0" diff --git a/packages/directives/package.json b/packages/directives/package.json index e67230620d..51ad4310c1 100644 --- a/packages/directives/package.json +++ b/packages/directives/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/divider/package.json b/packages/divider/package.json index e8948ed381..6965b12ac7 100644 --- a/packages/divider/package.json +++ b/packages/divider/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/drawer/package.json b/packages/drawer/package.json index cc4a16bb41..bfa56d3b8b 100644 --- a/packages/drawer/package.json +++ b/packages/drawer/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.0" diff --git a/packages/dropdown-item/package.json b/packages/dropdown-item/package.json index 37f4dde9fa..d6efb7ab55 100644 --- a/packages/dropdown-item/package.json +++ b/packages/dropdown-item/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/dropdown-menu/package.json b/packages/dropdown-menu/package.json index d113d6a1ba..31dd7f8264 100644 --- a/packages/dropdown-menu/package.json +++ b/packages/dropdown-menu/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/dropdown/package.json b/packages/dropdown/package.json index 2df964fa6b..f371896b3b 100644 --- a/packages/dropdown/package.json +++ b/packages/dropdown/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/footer/package.json b/packages/footer/package.json index 0bf996fd82..711a6e6532 100644 --- a/packages/footer/package.json +++ b/packages/footer/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/form-item/package.json b/packages/form-item/package.json index 0938627a86..390f3eea42 100644 --- a/packages/form-item/package.json +++ b/packages/form-item/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/form/package.json b/packages/form/package.json index b36eb50afb..1395484afa 100644 --- a/packages/form/package.json +++ b/packages/form/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.0" diff --git a/packages/header/package.json b/packages/header/package.json index 55231286e2..2529bdbde7 100644 --- a/packages/header/package.json +++ b/packages/header/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/hooks/package.json b/packages/hooks/package.json index dcbe2380d8..46bd50a214 100644 --- a/packages/hooks/package.json +++ b/packages/hooks/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/icon/package.json b/packages/icon/package.json index 76e402e292..899c564beb 100644 --- a/packages/icon/package.json +++ b/packages/icon/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/image/package.json b/packages/image/package.json index b8ac38068f..84cc9d43fc 100644 --- a/packages/image/package.json +++ b/packages/image/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/infinite-scroll/package.json b/packages/infinite-scroll/package.json index eadfae0d78..1f18658d9c 100644 --- a/packages/infinite-scroll/package.json +++ b/packages/infinite-scroll/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.0" diff --git a/packages/input-number/package.json b/packages/input-number/package.json index 72b1029e42..ab8e709d27 100644 --- a/packages/input-number/package.json +++ b/packages/input-number/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/input/package.json b/packages/input/package.json index fdc71fb5c9..cf6be260cc 100644 --- a/packages/input/package.json +++ b/packages/input/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.0" diff --git a/packages/link/package.json b/packages/link/package.json index c5682a18fb..01289aee80 100644 --- a/packages/link/package.json +++ b/packages/link/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/loading/package.json b/packages/loading/package.json index cdaab506b5..4c26780d26 100644 --- a/packages/loading/package.json +++ b/packages/loading/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/locale/package.json b/packages/locale/package.json index 67f407481d..c9595963b3 100644 --- a/packages/locale/package.json +++ b/packages/locale/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/main/package.json b/packages/main/package.json index 0d43eb32ff..c0054d184c 100644 --- a/packages/main/package.json +++ b/packages/main/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/menu-item-group/package.json b/packages/menu-item-group/package.json index cae3c791b7..597a5b04d8 100644 --- a/packages/menu-item-group/package.json +++ b/packages/menu-item-group/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/menu-item/package.json b/packages/menu-item/package.json index b7e85f8f0d..403166a8ba 100644 --- a/packages/menu-item/package.json +++ b/packages/menu-item/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/menu/package.json b/packages/menu/package.json index 64d0b6a241..de035b5ea9 100644 --- a/packages/menu/package.json +++ b/packages/menu/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0-rc.9" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/message-box/package.json b/packages/message-box/package.json index 8028ac1cf6..867ae7b3d4 100644 --- a/packages/message-box/package.json +++ b/packages/message-box/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0-rc.7" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.0" diff --git a/packages/message/package.json b/packages/message/package.json index 3621090420..f16742675a 100644 --- a/packages/message/package.json +++ b/packages/message/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/notification/package.json b/packages/notification/package.json index cc41524cea..3bb4ff9c4e 100644 --- a/packages/notification/package.json +++ b/packages/notification/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/option-group/package.json b/packages/option-group/package.json index 5d597d2b07..5d56f5bb0b 100644 --- a/packages/option-group/package.json +++ b/packages/option-group/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/option/package.json b/packages/option/package.json index 9f7c444511..4a22905ed9 100644 --- a/packages/option/package.json +++ b/packages/option/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/overlay/package.json b/packages/overlay/package.json index 7e5fbf4896..737c18092a 100644 --- a/packages/overlay/package.json +++ b/packages/overlay/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.0" diff --git a/packages/page-header/package.json b/packages/page-header/package.json index 840afebd50..ee0b0f8878 100644 --- a/packages/page-header/package.json +++ b/packages/page-header/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/pagination/package.json b/packages/pagination/package.json index cf7797e810..117ff206ce 100644 --- a/packages/pagination/package.json +++ b/packages/pagination/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0-rc.1" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.0" diff --git a/packages/popconfirm/package.json b/packages/popconfirm/package.json index bafc4b9629..fc2d583edd 100644 --- a/packages/popconfirm/package.json +++ b/packages/popconfirm/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0-rc.1" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/popover/package.json b/packages/popover/package.json index 89f11b6849..fe0afe6276 100644 --- a/packages/popover/package.json +++ b/packages/popover/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/popper/__tests__/popper.spec.ts b/packages/popper/__tests__/popper.spec.ts index 4c96420099..84868e7ceb 100644 --- a/packages/popper/__tests__/popper.spec.ts +++ b/packages/popper/__tests__/popper.spec.ts @@ -1,6 +1,7 @@ import { mount } from '@vue/test-utils' import * as Vue from 'vue' import * as popperExports from '@popperjs/core' +import { rAF } from '@element-plus/test-utils/tick' import ElPopper from '../src/index.vue' import type { VueWrapper } from '@vue/test-utils' @@ -24,8 +25,7 @@ const DISPLAY_NONE = 'display: none' const Wrapped = (props: UnknownProps, { slots }) => { return h('div', h(ElPopper, props, slots)) } -const Transition = (_: UnknownProps, { attrs, slots }) => h('div', attrs, slots) -Transition.displayName = 'Transition' + // eslint-disable-next-line const _mount = (props: UnknownProps = {}, slots = {}): VueWrapper => mount(Wrapped, { @@ -51,14 +51,9 @@ const popperMock = jest })) describe('Popper.vue', () => { - const oldTransition = Vue.Transition - beforeAll(() => { - (Vue as any).Transition = Transition - }) afterAll(() => { popperMock.mockReset() - ;(Vue as any).Transition = oldTransition }) beforeEach(() => { @@ -218,10 +213,15 @@ describe('Popper.vue', () => { }) const $trigger = wrapper.find(`.${TEST_TRIGGER}`) await $trigger.trigger(MOUSE_ENTER_EVENT) + await rAF() + await nextTick() expect(wrapper.find(selector).attributes('style')).not.toContain( DISPLAY_NONE, ) + + await $trigger.trigger(MOUSE_LEAVE_EVENT) jest.runOnlyPendingTimers() + await rAF() await nextTick() expect(wrapper.find(selector).attributes('style')).toContain(DISPLAY_NONE) }) diff --git a/packages/popper/package.json b/packages/popper/package.json index cdb6bc65b9..c10f759f94 100644 --- a/packages/popper/package.json +++ b/packages/popper/package.json @@ -5,7 +5,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/popper/src/index.vue b/packages/popper/src/index.vue index f08db37236..9b33242542 100644 --- a/packages/popper/src/index.vue +++ b/packages/popper/src/index.vue @@ -25,12 +25,10 @@ import { ClickOutside } from '@element-plus/directives' const compName = 'ElPopper' const UPDATE_VISIBLE_EVENT = 'update:visible' -const emits = [UPDATE_VISIBLE_EVENT, 'after-enter', 'after-leave'] - export default defineComponent({ name: compName, props: defaultProps, - emits, + emits: [UPDATE_VISIBLE_EVENT, 'after-enter', 'after-leave', 'before-enter', 'before-leave'], setup(props, ctx) { if (!ctx.slots.trigger) { throwError(compName, 'Trigger must be provided') @@ -61,6 +59,8 @@ export default defineComponent({ onPopperMouseLeave, onAfterEnter, onAfterLeave, + onBeforeEnter, + onBeforeLeave, popperClass, popperId, popperStyle, @@ -86,6 +86,8 @@ export default defineComponent({ onMouseLeave: onPopperMouseLeave, onAfterEnter, onAfterLeave, + onBeforeEnter, + onBeforeLeave, visibility, }, [ diff --git a/packages/popper/src/renderers/popper.ts b/packages/popper/src/renderers/popper.ts index a10b1a31ea..10283939e8 100644 --- a/packages/popper/src/renderers/popper.ts +++ b/packages/popper/src/renderers/popper.ts @@ -20,6 +20,8 @@ interface IRenderPopperProps { onMouseLeave: () => void onAfterEnter: () => void onAfterLeave: () => void + onBeforeEnter: () => void + onBeforeLeave: () => void } export default function renderPopper( @@ -40,6 +42,8 @@ export default function renderPopper( onMouseLeave, onAfterEnter, onAfterLeave, + onBeforeEnter, + onBeforeLeave, } = props const kls = [ @@ -62,8 +66,10 @@ export default function renderPopper( Transition, { name, - 'onAfter-enter': onAfterEnter, - 'onAfter-leave': onAfterLeave, + 'onAfterEnter': onAfterEnter, + 'onAfterLeave': onAfterLeave, + 'onBeforeEnter': onBeforeEnter, + 'onBeforeLeave': onBeforeLeave, }, { default: withCtx(() => [withDirectives( @@ -97,6 +103,6 @@ export default function renderPopper( [[vShow, visibility]], )]), }, - PatchFlags.PROPS, ['name', 'onAfter-enter', 'onAfter-leave'], + PatchFlags.PROPS, ['name', 'onAfterEnter', 'onAfterLeave', 'onBeforeEnter', 'onBeforeLeave'], ) } diff --git a/packages/popper/src/use-popper/index.ts b/packages/popper/src/use-popper/index.ts index 075ce5f3e0..3ee841f3bc 100644 --- a/packages/popper/src/use-popper/index.ts +++ b/packages/popper/src/use-popper/index.ts @@ -259,7 +259,7 @@ export default function( if (isArray(props.trigger)) { Object.values(props.trigger).map(mapEvents) } else { - mapEvents(props.trigger) + mapEvents(props.trigger as TriggerType) } } @@ -285,6 +285,12 @@ export default function( detachPopper() emit('after-leave') }, + onBeforeEnter: () => { + emit('before-enter') + }, + onBeforeLeave: () => { + emit('before-leave') + }, initializePopper, isManualMode, arrowRef, diff --git a/packages/progress/package.json b/packages/progress/package.json index ab146a8300..e799cbb29c 100644 --- a/packages/progress/package.json +++ b/packages/progress/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/radio-button/package.json b/packages/radio-button/package.json index 0e19899e5d..d7d0ab1b76 100644 --- a/packages/radio-button/package.json +++ b/packages/radio-button/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/radio-group/package.json b/packages/radio-group/package.json index 9e914feb4f..1226adcc7d 100644 --- a/packages/radio-group/package.json +++ b/packages/radio-group/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/radio/package.json b/packages/radio/package.json index 0cc6e280c6..5a0288fc39 100644 --- a/packages/radio/package.json +++ b/packages/radio/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/rate/package.json b/packages/rate/package.json index b04fb224a7..e25c9d408d 100644 --- a/packages/rate/package.json +++ b/packages/rate/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/row/package.json b/packages/row/package.json index c7419eebf5..5b6dda9e92 100644 --- a/packages/row/package.json +++ b/packages/row/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/scrollbar/package.json b/packages/scrollbar/package.json index deb5b81605..e6df8195ad 100644 --- a/packages/scrollbar/package.json +++ b/packages/scrollbar/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/select/package.json b/packages/select/package.json index 5ad0bad490..068cc4dbe2 100644 --- a/packages/select/package.json +++ b/packages/select/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/slider/package.json b/packages/slider/package.json index 28494b743d..91fade9223 100644 --- a/packages/slider/package.json +++ b/packages/slider/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.0" diff --git a/packages/step/package.json b/packages/step/package.json index 62f406ecd5..01bd58b8c1 100644 --- a/packages/step/package.json +++ b/packages/step/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/steps/package.json b/packages/steps/package.json index d902acfbbc..72b70d5423 100644 --- a/packages/steps/package.json +++ b/packages/steps/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/submenu/package.json b/packages/submenu/package.json index a273a9a7c5..75341105fd 100644 --- a/packages/submenu/package.json +++ b/packages/submenu/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/switch/package.json b/packages/switch/package.json index 3a1f905c69..4a5ca3c51f 100644 --- a/packages/switch/package.json +++ b/packages/switch/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/tab-pane/package.json b/packages/tab-pane/package.json index 32de729c1d..f6c60a9824 100644 --- a/packages/tab-pane/package.json +++ b/packages/tab-pane/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/table-column/package.json b/packages/table-column/package.json index 3656cec936..0fcdcb229c 100644 --- a/packages/table-column/package.json +++ b/packages/table-column/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/table/package.json b/packages/table/package.json index 907ebe61ca..6dba0cd11c 100644 --- a/packages/table/package.json +++ b/packages/table/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0-rc.9" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/tabs/package.json b/packages/tabs/package.json index 30fde8dbb5..b4b43011ab 100644 --- a/packages/tabs/package.json +++ b/packages/tabs/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/tag/package.json b/packages/tag/package.json index e429d133a1..dfdc1f2a8b 100644 --- a/packages/tag/package.json +++ b/packages/tag/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index c260215519..f5b309a79e 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "dependencies": { - "vue": "^3.0.0", + "vue": "^3.0.3", "@vue/test-utils": "^2.0.0-beta.3" } } diff --git a/packages/test-utils/tick.ts b/packages/test-utils/tick.ts index 8fd81bc63b..04ee1e5ae0 100644 --- a/packages/test-utils/tick.ts +++ b/packages/test-utils/tick.ts @@ -7,3 +7,13 @@ const tick = async (times: number) => { } export default tick + +// in order to test transitions, we need to use +// await rAF() after firing transition events. +export const rAF = async () => { + return new Promise(res => { + requestAnimationFrame(() => { + requestAnimationFrame(res) + }) + }) +} diff --git a/packages/time-picker/package.json b/packages/time-picker/package.json index ed07eb3c7d..d08172ff64 100644 --- a/packages/time-picker/package.json +++ b/packages/time-picker/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.0" diff --git a/packages/time-select/package.json b/packages/time-select/package.json index be4c30b1b7..f6ea9d74af 100644 --- a/packages/time-select/package.json +++ b/packages/time-select/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0-rc.9" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/timeline-item/package.json b/packages/timeline-item/package.json index 13f0dac9f8..6ff828af63 100644 --- a/packages/timeline-item/package.json +++ b/packages/timeline-item/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/timeline/package.json b/packages/timeline/package.json index 2da5932747..d6232e9906 100644 --- a/packages/timeline/package.json +++ b/packages/timeline/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/tooltip/package.json b/packages/tooltip/package.json index 34fa25c801..86bd49132f 100644 --- a/packages/tooltip/package.json +++ b/packages/tooltip/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/tooltip/src/index.ts b/packages/tooltip/src/index.ts index f4c1e8b478..dd263d7c11 100644 --- a/packages/tooltip/src/index.ts +++ b/packages/tooltip/src/index.ts @@ -139,6 +139,7 @@ export default defineComponent({ ElPopper, { ref: 'popper', + appendToBody: true, class: this.class, disabled, effect, diff --git a/packages/transfer/package.json b/packages/transfer/package.json index ad236324b6..1a128feee8 100644 --- a/packages/transfer/package.json +++ b/packages/transfer/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.0" diff --git a/packages/transfer/src/index.vue b/packages/transfer/src/index.vue index 5920be38c9..568e52746c 100644 --- a/packages/transfer/src/index.vue +++ b/packages/transfer/src/index.vue @@ -68,6 +68,8 @@ import { useMove } from './useMove' import { UPDATE_MODEL_EVENT } from '@element-plus/utils/constants' import { elFormItemKey } from '@element-plus/form' +import { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT } from './useCheckedChange' + import type { PropType, VNode } from 'vue' import type { ElFormItemContext } from '@element-plus/form' import type { @@ -76,8 +78,6 @@ import type { } from './transfer' export const CHANGE_EVENT = 'change' -export const LEFT_CHECK_CHANGE_EVENT = 'left-check-change' -export const RIGHT_CHECK_CHANGE_EVENT = 'right-check-change' export default defineComponent({ name: 'ElTransfer', diff --git a/packages/transfer/src/transfer-panel.vue b/packages/transfer/src/transfer-panel.vue index 6a12e0daef..18d59e68d7 100644 --- a/packages/transfer/src/transfer-panel.vue +++ b/packages/transfer/src/transfer-panel.vue @@ -64,9 +64,7 @@ import { t } from '@element-plus/locale' import ElCheckbox from '@element-plus/checkbox' import ElCheckboxGroup from '@element-plus/checkbox-group' import ElInput from '@element-plus/input' -import { useCheck } from './useCheck' - -export const CHECKED_CHANGE_EVENT = 'checked-change' +import { useCheck, CHECKED_CHANGE_EVENT } from './useCheck' export default defineComponent({ name: 'ElTransferPanel', diff --git a/packages/transfer/src/transfer.ts b/packages/transfer/src/transfer.ts index c11870959d..cd389a97a7 100644 --- a/packages/transfer/src/transfer.ts +++ b/packages/transfer/src/transfer.ts @@ -1,4 +1,4 @@ -import { VNode } from 'vue' +import type { VNode } from 'vue' export type Key = string | number diff --git a/packages/transfer/src/useCheck.ts b/packages/transfer/src/useCheck.ts index 491ebcdee3..9e10517e96 100644 --- a/packages/transfer/src/useCheck.ts +++ b/packages/transfer/src/useCheck.ts @@ -1,7 +1,8 @@ import { computed, watch } from 'vue' import { TransferPanelProps, TransferPanelState, Key } from './transfer' -import { CHECKED_CHANGE_EVENT } from './transfer-panel.vue' +export const CHECKED_CHANGE_EVENT = 'checked-change' + export const useCheck = (props: TransferPanelProps, panelState: TransferPanelState, emit) => { diff --git a/packages/transfer/src/useCheckedChange.ts b/packages/transfer/src/useCheckedChange.ts index 9caf56267d..ddb676ff32 100644 --- a/packages/transfer/src/useCheckedChange.ts +++ b/packages/transfer/src/useCheckedChange.ts @@ -1,7 +1,7 @@ -import { TransferCheckedState, Key } from './transfer' - -import { LEFT_CHECK_CHANGE_EVENT, RIGHT_CHECK_CHANGE_EVENT } from './index.vue' +export const LEFT_CHECK_CHANGE_EVENT = 'left-check-change' +export const RIGHT_CHECK_CHANGE_EVENT = 'right-check-change' +import type { TransferCheckedState, Key } from './transfer' export const useCheckedChange = (checkedState: TransferCheckedState, emit) => { const onSourceCheckedChange = (val: Key[], movedKeys: Key[]) => { checkedState.leftChecked = val diff --git a/packages/transition/package.json b/packages/transition/package.json index fe980e7023..b62e64c45c 100644 --- a/packages/transition/package.json +++ b/packages/transition/package.json @@ -7,7 +7,7 @@ "@element-plus/utils": "^0.0.0" }, "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/tree/__tests__/tree.spec.ts b/packages/tree/__tests__/tree.spec.ts index 96cac84846..e9e4c5abad 100644 --- a/packages/tree/__tests__/tree.spec.ts +++ b/packages/tree/__tests__/tree.spec.ts @@ -753,13 +753,13 @@ describe('Tree.vue', () => { return resolve([{ label: 'region1' }, { label: 'region2' }]) } if (node.level > 4) return resolve([]) - setTimeout(() => { + nextTick(() => { resolve([{ label: 'zone' + this.count++, }, { label: 'zone' + this.count++, }]) - }, 50) + }) }, handleNodeOpen(data) { this.currentNode = data @@ -778,13 +778,17 @@ describe('Tree.vue', () => { expect(firstNodeWrapper.find('.el-tree-node__children').exists()).toBe(false) await firstNodeContentWrapper.trigger('click') - await sleep(100) + await nextTick() // first next tick for UI update + await nextTick() // second next tick for triggering loadNode + await nextTick() // third next tick for updating props.node.expanded expect(vm.nodeExpended).toEqual(true) expect(vm.currentNode.label).toEqual('region1') await firstNodeContentWrapper.trigger('click') - await sleep(100) + await nextTick() + await nextTick() + await nextTick() expect(vm.nodeExpended).toEqual(false) expect(vm.currentNode.label).toEqual('region1') diff --git a/packages/tree/package.json b/packages/tree/package.json index 29418ec563..8a51f4de4d 100644 --- a/packages/tree/package.json +++ b/packages/tree/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.0" diff --git a/packages/upload/package.json b/packages/upload/package.json index 07048740f1..fb07bac56b 100644 --- a/packages/upload/package.json +++ b/packages/upload/package.json @@ -4,7 +4,7 @@ "main": "dist/index.js", "license": "MIT", "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/packages/utils/package.json b/packages/utils/package.json index 9673bb2376..e0e9b55f05 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -6,7 +6,7 @@ "resize-observer-polyfill": "^1.5.1" }, "peerDependencies": { - "vue": "^3.0.0" + "vue": "^3.0.3" }, "devDependencies": { "@vue/test-utils": "^2.0.0-beta.3" diff --git a/scripts/gc.sh b/scripts/gc.sh index b915c15b92..1072e783c3 100755 --- a/scripts/gc.sh +++ b/scripts/gc.sh @@ -67,7 +67,7 @@ cat > $DIRNAME/package.json <