HarmonyOS/OpenHarmony应用开发-bindContextMenu绑定菜单选项
在页面范围内关闭通过bindContextMenu属性绑定的菜单。(api8开始支持)bindContextMenu:给组件绑定菜单,触发方式为长按或者右键点击,弹出菜单项需要自定义。示例:代码EntryComponentstructIndex{BuilderMenuBuilder(){Flex({direction:FlexDirection.Column,alignItems:ItemAlign.Center,justifyContent:FlexAlign.Center}){Button('TextMenu1')Divider().strokeWidth(2).margin(5).color(Color.Grey).opacity(0.2)Button(...