trigger.mjs.map 1.62 KB
{"version":3,"file":"trigger.mjs","sources":["../../../../../../packages/components/tooltip/src/trigger.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\nimport { popperTriggerProps } from '@element-plus/components/popper'\nimport { EVENT_CODE } from '@element-plus/constants'\nimport type { Arrayable } from '@element-plus/utils'\nimport type { ExtractPropTypes } from 'vue'\n\nexport type TooltipTriggerType = 'hover' | 'focus' | 'click' | 'contextmenu'\n\nexport const useTooltipTriggerProps = buildProps({\n  ...popperTriggerProps,\n  /**\n   * @description whether Tooltip is disabled\n   */\n  disabled: Boolean,\n  /**\n   * @description How should the tooltip be triggered (to show)\n   */\n  trigger: {\n    type: definePropType<Arrayable<TooltipTriggerType>>([String, Array]),\n    default: 'hover',\n  },\n  /**\n   * @description When you click the mouse to focus on the trigger element, you can define a set of keyboard codes to control the display of tooltip through the keyboard\n   */\n  triggerKeys: {\n    type: definePropType<string[]>(Array),\n    default: () => [EVENT_CODE.enter, EVENT_CODE.space],\n  },\n} as const)\n\nexport type ElTooltipTriggerProps = ExtractPropTypes<\n  typeof useTooltipTriggerProps\n>\n"],"names":[],"mappings":";;;;;;;AAGY,MAAC,sBAAsB,GAAG,UAAU,CAAC;AACjD,EAAE,GAAG,kBAAkB;AACvB,EAAE,QAAQ,EAAE,OAAO;AACnB,EAAE,OAAO,EAAE;AACX,IAAI,IAAI,EAAE,cAAc,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACzC,IAAI,OAAO,EAAE,OAAO;AACpB,GAAG;AACH,EAAE,WAAW,EAAE;AACf,IAAI,IAAI,EAAE,cAAc,CAAC,KAAK,CAAC;AAC/B,IAAI,OAAO,EAAE,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC;AACvD,GAAG;AACH,CAAC;;;;"}