From 79564847b3a933d9d743cbdc5fc53b11b36f0a6a Mon Sep 17 00:00:00 2001 From: inottn Date: Sat, 17 Jun 2023 21:07:20 +0800 Subject: [PATCH] fix(Field): should not set `for` attr to label when using input slot (#11966) * fix(Field): when using input slot, the label's for attribute will not be set * test(Field): add test case --- .../test/__snapshots__/demo-ssr.spec.ts.snap | 4 --- .../test/__snapshots__/demo.spec.ts.snap | 16 +++------- packages/vant/src/field/Field.tsx | 2 +- packages/vant/src/field/test/index.spec.js | 15 +++++++++ .../test/__snapshots__/demo-ssr.spec.ts.snap | 8 ----- .../form/test/__snapshots__/demo.spec.ts.snap | 32 +++++-------------- 6 files changed, 28 insertions(+), 49 deletions(-) diff --git a/packages/vant/src/config-provider/test/__snapshots__/demo-ssr.spec.ts.snap b/packages/vant/src/config-provider/test/__snapshots__/demo-ssr.spec.ts.snap index 163bf5d11..6b2e4c2db 100644 --- a/packages/vant/src/config-provider/test/__snapshots__/demo-ssr.spec.ts.snap +++ b/packages/vant/src/config-provider/test/__snapshots__/demo-ssr.spec.ts.snap @@ -24,7 +24,6 @@ exports[`should render demo and match snapshot 1`] = ` >