From 0f7c9a317cc9a7219ec8431bae0658a5e84d43af Mon Sep 17 00:00:00 2001 From: chenjiahan Date: Sun, 22 Nov 2020 19:28:51 +0800 Subject: [PATCH] fix(Radio): failed to bind group --- src/checkbox/Checker.tsx | 5 ++++- .../test/__snapshots__/demo.spec.js.snap | 20 ------------------- src/form/test/__snapshots__/demo.spec.js.snap | 3 --- .../test/__snapshots__/demo.spec.js.snap | 1 - 4 files changed, 4 insertions(+), 25 deletions(-) diff --git a/src/checkbox/Checker.tsx b/src/checkbox/Checker.tsx index 0ea3c4bec..35506fe81 100644 --- a/src/checkbox/Checker.tsx +++ b/src/checkbox/Checker.tsx @@ -22,7 +22,10 @@ export default defineComponent({ role: String, parent: Object, checked: Boolean, - bindGroup: Boolean, + bindGroup: { + type: Boolean, + default: true, + }, bem: { type: Function, required: true, diff --git a/src/checkbox/test/__snapshots__/demo.spec.js.snap b/src/checkbox/test/__snapshots__/demo.spec.js.snap index fe91bfbde..991671797 100644 --- a/src/checkbox/test/__snapshots__/demo.spec.js.snap +++ b/src/checkbox/test/__snapshots__/demo.spec.js.snap @@ -6,7 +6,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox" tabindex="0" aria-checked="true" - bindgroup="true" >
@@ -22,7 +21,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox van-checkbox--disabled" tabindex="-1" aria-checked="false" - bindgroup="true" >
@@ -36,7 +34,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox van-checkbox--disabled" tabindex="-1" aria-checked="true" - bindgroup="true" >
@@ -52,7 +49,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox" tabindex="0" aria-checked="true" - bindgroup="true" >
@@ -68,7 +64,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox" tabindex="0" aria-checked="true" - bindgroup="true" >
@@ -119,7 +112,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox van-checkbox--label-disabled" tabindex="0" aria-checked="true" - bindgroup="true" >
@@ -136,7 +128,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox" tabindex="0" aria-checked="true" - bindgroup="true" >
@@ -150,7 +141,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox" tabindex="0" aria-checked="true" - bindgroup="true" >
@@ -168,7 +158,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox van-checkbox--horizontal" tabindex="0" aria-checked="false" - bindgroup="true" >
@@ -182,7 +171,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox van-checkbox--horizontal" tabindex="0" aria-checked="false" - bindgroup="true" >
@@ -200,7 +188,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox" tabindex="0" aria-checked="false" - bindgroup="true" >
@@ -214,7 +201,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox" tabindex="0" aria-checked="false" - bindgroup="true" >
@@ -228,7 +214,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox" tabindex="0" aria-checked="false" - bindgroup="true" >
@@ -246,7 +231,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox" tabindex="0" aria-checked="false" - bindgroup="true" >
@@ -260,7 +244,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox" tabindex="0" aria-checked="false" - bindgroup="true" >
@@ -274,7 +257,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox" tabindex="0" aria-checked="false" - bindgroup="true" >
@@ -322,7 +304,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox" tabindex="0" aria-checked="false" - bindgroup="true" >
@@ -343,7 +324,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox" tabindex="0" aria-checked="false" - bindgroup="true" >
diff --git a/src/form/test/__snapshots__/demo.spec.js.snap b/src/form/test/__snapshots__/demo.spec.js.snap index f8c12ac06..eba4fd856 100644 --- a/src/form/test/__snapshots__/demo.spec.js.snap +++ b/src/form/test/__snapshots__/demo.spec.js.snap @@ -147,7 +147,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox" tabindex="0" aria-checked="false" - bindgroup="true" >
@@ -172,7 +171,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox van-checkbox--horizontal" tabindex="0" aria-checked="false" - bindgroup="true" >
@@ -186,7 +184,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox van-checkbox--horizontal" tabindex="0" aria-checked="false" - bindgroup="true" >
diff --git a/src/submit-bar/test/__snapshots__/demo.spec.js.snap b/src/submit-bar/test/__snapshots__/demo.spec.js.snap index 2ffae49a4..20ad6f671 100644 --- a/src/submit-bar/test/__snapshots__/demo.spec.js.snap +++ b/src/submit-bar/test/__snapshots__/demo.spec.js.snap @@ -116,7 +116,6 @@ exports[`should render demo and match snapshot 1`] = ` class="van-checkbox" tabindex="0" aria-checked="true" - bindgroup="true" >