diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index 7c6a28e3fe0170ffcf36a1d2b2926376a3dc4b88..4a3094bb78fe1d2669a0de4a2368b6f8700119cd 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -33,6 +33,7 @@ import { LineCapStyle, LineJoinStyle, PlayMode, + ResponseType, SharedTransitionEffectType, TransitionType, Visibility, @@ -1241,6 +1242,12 @@ export declare class CommonMethod { */ bindMenu(content: { value: string; action: () => void }[] | CustomBuilder): T; + /** + * ContextMenu control + * @since 8 + */ + bindContextMenu(content: CustomBuilder, responseType : ResponseType): T; + /** * Sets styles for component state. * @since 8 diff --git a/api/@internal/component/ets/enums.d.ts b/api/@internal/component/ets/enums.d.ts index e9050ce5a9233f281dc24e549a8c7d630a0181ac..1f0d57976f19fecd9cab4040aa8fb643e48a99f2 100644 --- a/api/@internal/component/ets/enums.d.ts +++ b/api/@internal/component/ets/enums.d.ts @@ -1332,6 +1332,24 @@ export declare enum TextCase { UpperCase, } +/** + * ResponseType for contextMenu + * @since 8 + */ +export declare enum ResponseType { + /** + * Right click. + * @since 8 + */ + RightClick, + + /** + * Long press. + * @since 8 + */ + LongPress, +} + /** * HoverEffect enumeration description * @since 8