From 14cf68be1ed0d714f59b09644afdff7544168d70 Mon Sep 17 00:00:00 2001 From: neverland Date: Sat, 19 Nov 2022 17:24:56 +0800 Subject: [PATCH] fix(DropdownItem): should inherit attrs when using teleport (#11273) * fix(DropdownItem): should inherit attrs when using teleport * chore: update lock file * chore: update snapshot --- packages/vant-cli/package.json | 2 +- packages/vant-compat/package.json | 2 +- packages/vant-use/package.json | 2 +- packages/vant/package.json | 2 +- .../test/__snapshots__/demo.spec.ts.snap | 60 +- .../test/__snapshots__/index.spec.ts.snap | 12 +- .../test/__snapshots__/demo.spec.ts.snap | 6 +- .../test/__snapshots__/demo.spec.ts.snap | 12 +- .../test/__snapshots__/index.spec.ts.snap | 24 +- .../card/test/__snapshots__/demo.spec.ts.snap | 16 +- .../cell/test/__snapshots__/demo.spec.ts.snap | 5 +- .../test/__snapshots__/demo.spec.ts.snap | 6 +- .../test/__snapshots__/index.spec.ts.snap | 6 +- .../test/__snapshots__/demo.spec.ts.snap | 12 +- .../test/__snapshots__/demo.spec.ts.snap | 12 +- .../vant/src/dropdown-item/DropdownItem.tsx | 5 +- .../test/__snapshots__/demo.spec.ts.snap | 120 +- .../test/__snapshots__/index.spec.tsx.snap | 276 +- .../src/dropdown-menu/test/index.spec.tsx | 17 + .../test/__snapshots__/index.spec.ts.snap | 24 +- .../test/__snapshots__/demo.spec.ts.snap | 6 +- .../test/__snapshots__/demo.spec.ts.snap | 36 +- .../test/__snapshots__/demo.spec.ts.snap | 12 +- .../test/__snapshots__/index.spec.tsx.snap | 12 +- .../test/__snapshots__/demo.spec.ts.snap | 6 +- .../test/__snapshots__/demo.spec.ts.snap | 12 +- .../test/__snapshots__/index.spec.tsx.snap | 37 +- .../test/__snapshots__/demo.spec.ts.snap | 108 +- .../test/__snapshots__/index.spec.jsx.snap | 24 +- .../test/__snapshots__/demo.spec.ts.snap | 48 +- .../test/__snapshots__/index.spec.ts.snap | 12 +- .../tag/test/__snapshots__/demo.spec.ts.snap | 71 +- .../tag/test/__snapshots__/index.spec.ts.snap | 10 +- .../test/__snapshots__/demo.spec.ts.snap | 6 +- .../test/__snapshots__/index.spec.ts.snap | 12 +- pnpm-lock.yaml | 2607 ++++++++--------- 36 files changed, 2077 insertions(+), 1563 deletions(-) diff --git a/packages/vant-cli/package.json b/packages/vant-cli/package.json index e78d97644..8d66c733c 100644 --- a/packages/vant-cli/package.json +++ b/packages/vant-cli/package.json @@ -45,7 +45,7 @@ "@types/markdown-it": "^12.2.3", "react": "^18.2.0", "react-dom": "^18.2.0", - "vue": "^3.2.38" + "vue": "^3.2.45" }, "dependencies": { "@babel/core": "^7.18.13", diff --git a/packages/vant-compat/package.json b/packages/vant-compat/package.json index b1cb99728..3e6151d73 100644 --- a/packages/vant-compat/package.json +++ b/packages/vant-compat/package.json @@ -38,7 +38,7 @@ "devDependencies": { "@vue/runtime-core": "^3.2.27", "vant": "workspace:*", - "vue": "^3.2.27", + "vue": "^3.2.45", "esbuild": "^0.15.9", "release-it": "^15.1.1", "typescript": "^4.7.4" diff --git a/packages/vant-use/package.json b/packages/vant-use/package.json index cfc3b4084..11506d514 100644 --- a/packages/vant-use/package.json +++ b/packages/vant-use/package.json @@ -40,7 +40,7 @@ "esbuild": "^0.15.9", "release-it": "^15.4.1", "typescript": "^4.8.2", - "vue": "^3.2.38" + "vue": "^3.2.45" }, "release-it": { "git": { diff --git a/packages/vant/package.json b/packages/vant/package.json index 9d4b747c4..756ca277b 100644 --- a/packages/vant/package.json +++ b/packages/vant/package.json @@ -63,7 +63,7 @@ "@vue/runtime-core": "^3.2.38", "@vue/test-utils": "^2.0.2", "typescript": "^4.8.2", - "vue": "^3.2.38", + "vue": "^3.2.45", "vue-router": "^4.1.5" }, "sideEffects": [ diff --git a/packages/vant/src/action-sheet/test/__snapshots__/demo.spec.ts.snap b/packages/vant/src/action-sheet/test/__snapshots__/demo.spec.ts.snap index a77722e10..8adfb4326 100644 --- a/packages/vant/src/action-sheet/test/__snapshots__/demo.spec.ts.snap +++ b/packages/vant/src/action-sheet/test/__snapshots__/demo.spec.ts.snap @@ -67,34 +67,74 @@ exports[`should render demo and match snapshot 1`] = ` - - + - - + - - + - - + - - + `; diff --git a/packages/vant/src/action-sheet/test/__snapshots__/index.spec.ts.snap b/packages/vant/src/action-sheet/test/__snapshots__/index.spec.ts.snap index 5d177aec2..0df1baf53 100644 --- a/packages/vant/src/action-sheet/test/__snapshots__/index.spec.ts.snap +++ b/packages/vant/src/action-sheet/test/__snapshots__/index.spec.ts.snap @@ -22,13 +22,21 @@ exports[`should render cancel slot correctly 1`] = ` `; exports[`should render default slot correctly 1`] = ` -
- + - - + `; diff --git a/packages/vant/src/calendar/test/__snapshots__/index.spec.ts.snap b/packages/vant/src/calendar/test/__snapshots__/index.spec.ts.snap index 4943bdb0b..6f4657979 100644 --- a/packages/vant/src/calendar/test/__snapshots__/index.spec.ts.snap +++ b/packages/vant/src/calendar/test/__snapshots__/index.spec.ts.snap @@ -557,16 +557,28 @@ exports[`formatter prop 1`] = ` `; exports[`popup wrapper 1`] = ` - - + `; exports[`popup wrapper 2`] = ` -
- +
- + Tag @@ -134,12 +137,19 @@ exports[`should render demo and match snapshot 1`] = `
Description
- + Tag - + Tag diff --git a/packages/vant/src/cell/test/__snapshots__/demo.spec.ts.snap b/packages/vant/src/cell/test/__snapshots__/demo.spec.ts.snap index fb5995d79..37e974fb4 100644 --- a/packages/vant/src/cell/test/__snapshots__/demo.spec.ts.snap +++ b/packages/vant/src/cell/test/__snapshots__/demo.spec.ts.snap @@ -227,7 +227,10 @@ exports[`should render demo and match snapshot 1`] = ` Cell title - + Tag diff --git a/packages/vant/src/contact-list/test/__snapshots__/demo.spec.ts.snap b/packages/vant/src/contact-list/test/__snapshots__/demo.spec.ts.snap index 9babf2386..5deeff302 100644 --- a/packages/vant/src/contact-list/test/__snapshots__/demo.spec.ts.snap +++ b/packages/vant/src/contact-list/test/__snapshots__/demo.spec.ts.snap @@ -14,7 +14,11 @@ exports[`should render demo and match snapshot 1`] = `
John Snow,13000000000 - + default diff --git a/packages/vant/src/contact-list/test/__snapshots__/index.spec.ts.snap b/packages/vant/src/contact-list/test/__snapshots__/index.spec.ts.snap index 540c3e6fc..e71eb2979 100644 --- a/packages/vant/src/contact-list/test/__snapshots__/index.spec.ts.snap +++ b/packages/vant/src/contact-list/test/__snapshots__/index.spec.ts.snap @@ -13,7 +13,11 @@ exports[`should render ContactList correctly 1`] = `
jack,12345678 - + 默认 diff --git a/packages/vant/src/coupon-list/test/__snapshots__/demo.spec.ts.snap b/packages/vant/src/coupon-list/test/__snapshots__/demo.spec.ts.snap index a33817db8..daf030583 100644 --- a/packages/vant/src/coupon-list/test/__snapshots__/demo.spec.ts.snap +++ b/packages/vant/src/coupon-list/test/__snapshots__/demo.spec.ts.snap @@ -19,11 +19,19 @@ exports[`should render demo and match snapshot 1`] = `
- - +
`; diff --git a/packages/vant/src/dialog/test/__snapshots__/demo.spec.ts.snap b/packages/vant/src/dialog/test/__snapshots__/demo.spec.ts.snap index 756475471..9c063739d 100644 --- a/packages/vant/src/dialog/test/__snapshots__/demo.spec.ts.snap +++ b/packages/vant/src/dialog/test/__snapshots__/demo.spec.ts.snap @@ -92,9 +92,17 @@ exports[`should render demo and match snapshot 1`] = `
- + - + @@ -78,21 +94,37 @@ exports[`should render demo and match snapshot 1`] = ` @@ -126,21 +158,37 @@ exports[`should render demo and match snapshot 1`] = ` @@ -174,21 +222,37 @@ exports[`should render demo and match snapshot 1`] = ` @@ -220,21 +284,37 @@ exports[`should render demo and match snapshot 1`] = ` diff --git a/packages/vant/src/dropdown-menu/test/__snapshots__/index.spec.tsx.snap b/packages/vant/src/dropdown-menu/test/__snapshots__/index.spec.tsx.snap index 5593d190a..8323fffbc 100644 --- a/packages/vant/src/dropdown-menu/test/__snapshots__/index.spec.tsx.snap +++ b/packages/vant/src/dropdown-menu/test/__snapshots__/index.spec.tsx.snap @@ -29,7 +29,11 @@ exports[`click option 1`] = `
-
- +
@@ -115,7 +131,11 @@ exports[`close-on-click-outside 1`] = `
-
- +
@@ -190,11 +222,19 @@ exports[`destroy one item 1`] = ` @@ -229,21 +269,37 @@ exports[`direction up 1`] = ` @@ -278,7 +334,11 @@ exports[`direction up 2`] = `
-
- +
@@ -364,7 +436,11 @@ exports[`disable close-on-click-outside 1`] = `
-
- +
@@ -438,11 +526,19 @@ exports[`disable dropdown item 1`] = ` @@ -477,7 +573,11 @@ exports[`render option icon 1`] = `
-
- +
@@ -567,7 +679,11 @@ exports[`show dropdown item 1`] = `
-
- +
@@ -653,7 +781,11 @@ exports[`show dropdown item 2`] = `
-
- +
- +
@@ -216,7 +220,11 @@ exports[`should render demo and match snapshot 1`] = `
- +
- + - + - + - + - +
@@ -26,7 +30,11 @@ exports[`should render demo and match snapshot 1`] = `
- + `; diff --git a/packages/vant/src/overlay/test/__snapshots__/index.spec.tsx.snap b/packages/vant/src/overlay/test/__snapshots__/index.spec.tsx.snap index 2195b57f3..ce0264778 100644 --- a/packages/vant/src/overlay/test/__snapshots__/index.spec.tsx.snap +++ b/packages/vant/src/overlay/test/__snapshots__/index.spec.tsx.snap @@ -1,7 +1,11 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`should allow to disable lazy-render 1`] = ` - + - +
diff --git a/packages/vant/src/picker/test/__snapshots__/demo.spec.ts.snap b/packages/vant/src/picker/test/__snapshots__/demo.spec.ts.snap index 15d9a95ea..f6dbf4ecd 100644 --- a/packages/vant/src/picker/test/__snapshots__/demo.spec.ts.snap +++ b/packages/vant/src/picker/test/__snapshots__/demo.spec.ts.snap @@ -109,11 +109,19 @@ exports[`should render demo and match snapshot 1`] = `
- - +
diff --git a/packages/vant/src/popover/test/__snapshots__/index.spec.tsx.snap b/packages/vant/src/popover/test/__snapshots__/index.spec.tsx.snap index cf2dfd644..1f9b0a405 100644 --- a/packages/vant/src/popover/test/__snapshots__/index.spec.tsx.snap +++ b/packages/vant/src/popover/test/__snapshots__/index.spec.tsx.snap @@ -14,7 +14,11 @@ exports[`should allow to custom the className of action 1`] = ` exports[`should change icon class prefix when using icon-prefix prop 1`] = ` - + `; diff --git a/packages/vant/src/share-sheet/test/__snapshots__/index.spec.ts.snap b/packages/vant/src/share-sheet/test/__snapshots__/index.spec.ts.snap index 9cd425bc1..c0efdf6e8 100644 --- a/packages/vant/src/share-sheet/test/__snapshots__/index.spec.ts.snap +++ b/packages/vant/src/share-sheet/test/__snapshots__/index.spec.ts.snap @@ -23,13 +23,21 @@ exports[`should render description when using description prop 1`] = ` `; exports[`should render title and description slot correctly 1`] = ` -
- +
- + Tag @@ -23,7 +26,10 @@ exports[`should render demo and match snapshot 1`] = `
- + Tag @@ -37,7 +43,10 @@ exports[`should render demo and match snapshot 1`] = `
- + Tag @@ -51,7 +60,10 @@ exports[`should render demo and match snapshot 1`] = `
- + Tag @@ -67,7 +79,10 @@ exports[`should render demo and match snapshot 1`] = `
- + Tag @@ -81,7 +96,10 @@ exports[`should render demo and match snapshot 1`] = `
- + Tag @@ -95,7 +113,10 @@ exports[`should render demo and match snapshot 1`] = `
- + Tag @@ -109,7 +130,11 @@ exports[`should render demo and match snapshot 1`] = `
- + Tag @@ -127,7 +152,10 @@ exports[`should render demo and match snapshot 1`] = `
- + Tag @@ -141,7 +169,10 @@ exports[`should render demo and match snapshot 1`] = `
- + Tag @@ -155,7 +186,10 @@ exports[`should render demo and match snapshot 1`] = `
- + Tag @@ -171,7 +205,10 @@ exports[`should render demo and match snapshot 1`] = `
- + @@ -187,7 +224,10 @@ exports[`should render demo and match snapshot 1`] = `
- + @@ -203,7 +243,10 @@ exports[`should render demo and match snapshot 1`] = `
- + diff --git a/packages/vant/src/tag/test/__snapshots__/index.spec.ts.snap b/packages/vant/src/tag/test/__snapshots__/index.spec.ts.snap index b1388a1dc..f02dfea69 100644 --- a/packages/vant/src/tag/test/__snapshots__/index.spec.ts.snap +++ b/packages/vant/src/tag/test/__snapshots__/index.spec.ts.snap @@ -1,12 +1,18 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`should hide tag when the show prop is false 1`] = ` - + `; exports[`should render border-color correctly 1`] = ` - + diff --git a/packages/vant/src/toast/test/__snapshots__/demo.spec.ts.snap b/packages/vant/src/toast/test/__snapshots__/demo.spec.ts.snap index 121fe8928..fb0793b1a 100644 --- a/packages/vant/src/toast/test/__snapshots__/demo.spec.ts.snap +++ b/packages/vant/src/toast/test/__snapshots__/demo.spec.ts.snap @@ -168,7 +168,11 @@ exports[`should render demo and match snapshot 1`] = `
- +
`; diff --git a/packages/vant/src/toast/test/__snapshots__/index.spec.ts.snap b/packages/vant/src/toast/test/__snapshots__/index.spec.ts.snap index 3ab4703fc..685af0b76 100644 --- a/packages/vant/src/toast/test/__snapshots__/index.spec.ts.snap +++ b/packages/vant/src/toast/test/__snapshots__/index.spec.ts.snap @@ -1,7 +1,11 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`create a forbidClick toast 1`] = ` - +