From abfc137a0550ce2350de95e7fad88e9661780626 Mon Sep 17 00:00:00 2001 From: yaoyuchi Date: Wed, 19 Jan 2022 17:50:22 +0800 Subject: [PATCH 1/2] set checkboxgroup onchange Signed-off-by: yaoyuchi --- .../component/ets/checkboxgroup.d.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/api/@internal/component/ets/checkboxgroup.d.ts b/api/@internal/component/ets/checkboxgroup.d.ts index 14a2221a4c..2dc6402770 100644 --- a/api/@internal/component/ets/checkboxgroup.d.ts +++ b/api/@internal/component/ets/checkboxgroup.d.ts @@ -47,6 +47,23 @@ declare interface CheckboxGroupOption { group?: string; } +/** + * Defines the option of CheckboxGroupResult. + * @since 8 + */ +declare interface CheckboxGroupResult { + /** + * Set checkbox name. + * @since 8 + */ + name: Array; + /** + * Set the group of status. + * @since 8 + */ + status:SelectStatus; +} + /** * Provides an interface for the CheckboxGroup component. * @since 8 @@ -81,7 +98,7 @@ declare class CheckboxGroupAttribute extends CommonMethod, status: SelectStatus) => void): CheckboxGroupAttribute; + onChange(callback: (event:CheckboxGroupResult) => void): CheckboxGroupAttribute; } declare const CheckboxGroup: CheckboxGroupInterface; -- Gitee From b59d62b01d49dab24230e7cb1a40d9af00d87f67 Mon Sep 17 00:00:00 2001 From: yaoyuchi Date: Thu, 20 Jan 2022 17:42:19 +0800 Subject: [PATCH 2/2] fix code check Signed-off-by: yaoyuchi --- api/@internal/component/ets/checkboxgroup.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/@internal/component/ets/checkboxgroup.d.ts b/api/@internal/component/ets/checkboxgroup.d.ts index 2dc6402770..7aa50a89f9 100644 --- a/api/@internal/component/ets/checkboxgroup.d.ts +++ b/api/@internal/component/ets/checkboxgroup.d.ts @@ -53,7 +53,7 @@ declare interface CheckboxGroupOption { */ declare interface CheckboxGroupResult { /** - * Set checkbox name. + * Checkbox name. * @since 8 */ name: Array; @@ -61,7 +61,7 @@ declare interface CheckboxGroupResult { * Set the group of status. * @since 8 */ - status:SelectStatus; + status: SelectStatus; } /** @@ -98,7 +98,7 @@ declare class CheckboxGroupAttribute extends CommonMethod void): CheckboxGroupAttribute; + onChange(callback: (event: CheckboxGroupResult) => void): CheckboxGroupAttribute; } declare const CheckboxGroup: CheckboxGroupInterface; -- Gitee