Options
All
  • Public
  • Public/Protected
  • All
Menu

组件弹出的菜单类

Hierarchy

  • Contextmenu

Implements

Index

Constructors

constructor

Properties

ID_RIGHT_MENU

ID_RIGHT_MENU: "rightMenu"

component

component: ComponentBase

id

id: string

menuItems

menuItems: IMenuItem[]

onPopMenu

onPopMenu: Function

Methods

Private buildMenuItems

  • 构建设计模式下拉的弹出菜单

    Returns IMenuItem[]

disableMenu

  • disableMenu(): void
  • 禁止组件的右键菜单

    Returns void

disableMenuItem

  • disableMenuItem(action: any): void
  • 禁用右键菜单的某个菜单项

    Parameters

    • action: any

      菜单项action : cut,copy delete,save,paser

    Returns void

enableMenuItem

  • enableMenuItem(action: any): void
  • 启用右键菜单的某菜单项

    Parameters

    • action: any

      菜单项action : cut,copy delete,save,paser

    Returns void

Private getMenuItemByAction

  • getMenuItemByAction(action: any): IMenuItem
  • Parameters

    • action: any

    Returns IMenuItem

hide

  • hide(): void
  • 隐藏菜单

    Returns void

Private initMenu

  • initMenu($parent: JQuery<HTMLElement>): void
  • Parameters

    • $parent: JQuery<HTMLElement>

    Returns void

initPopMenuEvent

  • initPopMenuEvent(): void
  • Returns void

Private isOutofWin

  • isOutofWin(x: any, y: any, height: any, width: any): boolean
  • 判断是否超出可视界面

    Parameters

    • x: any
    • y: any
    • height: any
    • width: any

    Returns boolean

menuPop

  • menuPop(x: any, y: any): void
  • 弹出菜单

    Parameters

    • x: any

      屏幕x坐标

    • y: any

      屏幕y坐标

    Returns void

setMenuItemStatus

  • setMenuItemStatus(action: any, value: any): void
  • 设置菜单某项的状态

    Parameters

    • action: any

      菜单项action : cut,copy delete,save,paser

    • value: any

      false/true

    Returns void

showMenu

  • showMenu(x: any, y: any): void
  • 显示出菜单

    Parameters

    • x: any

      x坐标

    • y: any

      y坐标

    Returns void

Generated using TypeDoc