From 94bb6de6f35e4fd1ed87bfb5dc05dfc5661e2ef5 Mon Sep 17 00:00:00 2001 From: houguobiao Date: Fri, 5 Sep 2025 16:34:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: houguobiao Change-Id: If0dce3caa16a38e7eaa7f18d02a4730588f8cb8a --- api/arkui/component/menu.static.d.ets | 15 ++++++++------- api/arkui/component/menuItem.static.d.ets | 16 ++++++++-------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/api/arkui/component/menu.static.d.ets b/api/arkui/component/menu.static.d.ets index cb25f9c0f5..dfabc56282 100644 --- a/api/arkui/component/menu.static.d.ets +++ b/api/arkui/component/menu.static.d.ets @@ -71,7 +71,7 @@ export declare interface MenuAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - font(value: Font | undefined): this; + default font(value: Font | undefined): this; /** * Sets the Menu font color. * @@ -80,7 +80,7 @@ export declare interface MenuAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - fontColor(value: ResourceColor | undefined): this; + default fontColor(value: ResourceColor | undefined): this; /** * Sets the radius of the corner around the menu. * When the radius is less than the menu width, the default border radius is used. @@ -90,7 +90,7 @@ export declare interface MenuAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - radius(value: Dimension | BorderRadiuses | undefined): this; + default radius(value: Dimension | BorderRadiuses | undefined): this; /** * Set the divider of menu item * @@ -99,7 +99,7 @@ export declare interface MenuAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - menuItemDivider(options: DividerStyleOptions | undefined): this; + default menuItemDivider(options: DividerStyleOptions | undefined): this; /** * Set the divider of menu item group * @@ -108,7 +108,7 @@ export declare interface MenuAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - menuItemGroupDivider(options: DividerStyleOptions | undefined): this; + default menuItemGroupDivider(options: DividerStyleOptions | undefined): this; /** * Set the expanding mode of sub-menu * @@ -117,7 +117,7 @@ export declare interface MenuAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - subMenuExpandingMode(mode: SubMenuExpandingMode | undefined): this; + default subMenuExpandingMode(mode: SubMenuExpandingMode | undefined): this; /** * Set the attribute modifier * @@ -126,7 +126,8 @@ export declare interface MenuAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; + default attributeModifier( + modifier: AttributeModifier | AttributeModifier | undefined): this; } /** diff --git a/api/arkui/component/menuItem.static.d.ets b/api/arkui/component/menuItem.static.d.ets index c64e8b9352..62cff9c972 100644 --- a/api/arkui/component/menuItem.static.d.ets +++ b/api/arkui/component/menuItem.static.d.ets @@ -106,7 +106,7 @@ export declare interface MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - selected(value: boolean | undefined | Bindable): this; + default selected(value: boolean | undefined | Bindable): this; /** * Whether the relevant check icon is displayed when a menu item is selected. * Use type ResourceStr or SymbolGlyphModifier to specify icon instead of the default check mark. @@ -119,7 +119,7 @@ export declare interface MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - selectIcon(value: boolean | ResourceStr | SymbolGlyphModifier | undefined): this; + default selectIcon(value: boolean | ResourceStr | SymbolGlyphModifier | undefined): this; /** * Triggers a callback when a menu item is selected or unchecked. * @@ -128,7 +128,7 @@ export declare interface MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - onChange(callback: ((selected: boolean) => void) | undefined): this; + default onChange(callback: ((selected: boolean) => void) | undefined): this; /** * Sets the content font style. * Family and style are not supported currently and will be fixed in future. @@ -138,7 +138,7 @@ export declare interface MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - contentFont(value: Font | undefined): this; + default contentFont(value: Font | undefined): this; /** * Sets the font color of content text. * @@ -147,7 +147,7 @@ export declare interface MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - contentFontColor(value: ResourceColor | undefined): this; + default contentFontColor(value: ResourceColor | undefined): this; /** * Sets the label info font style. * Family and style are not supported currently and will be fixed in future. @@ -157,7 +157,7 @@ export declare interface MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - labelFont(value: Font | undefined): this; + default labelFont(value: Font | undefined): this; /** * Sets the font color of label info text. * @@ -166,7 +166,7 @@ export declare interface MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - labelFontColor(value: ResourceColor | undefined): this; + default labelFontColor(value: ResourceColor | undefined): this; /** * Set the attribute modifier of menu item. * @@ -176,7 +176,7 @@ export declare interface MenuItemAttribute extends CommonMethod { * @syscap SystemCapability.ArkUI.ArkUI.Full * @since 20 */ - attributeModifier( + default attributeModifier( modifier: AttributeModifier | AttributeModifier | undefined): this; } -- Gitee