Skip to content

Commit

Permalink
fix(drop-menu): 修正 dropMenuItem 自定义事件的类型定义
Browse files Browse the repository at this point in the history
  • Loading branch information
ec50n9 committed Aug 2, 2024
1 parent 5ff143b commit a84da73
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { ComponentPublicInstance, ExtractPropTypes } from 'vue'
import type { ComponentPublicInstance, ExtractPropTypes, PropType } from 'vue'
import { baseProps, makeArrayProp, makeBooleanProp, makeStringProp } from '../common/props'

export type DropMenuItemBeforeToggle = (showPop: boolean, toggle: () => void) => void

export const dorpMenuItemProps = {
...baseProps,
/**
Expand Down Expand Up @@ -40,9 +42,9 @@ export const dorpMenuItemProps = {
*/
iconSize: makeStringProp('14px'),
/**
* 自定义点击事件: (showPop: boolean, toggle: ()=>void)=>void
* 自定义点击事件
*/
beforeToggle: Function,
beforeToggle: Function as PropType<DropMenuItemBeforeToggle>,
/**
* 选项对象中,value 对应的 key
*/
Expand Down

0 comments on commit a84da73

Please sign in to comment.