element-plus
Version:
A Component Library for Vue 3
1 lines • 1.68 kB
Source Map (JSON)
{"version":3,"file":"menu-item.mjs","names":[],"sources":["../../../../../../packages/components/menu/src/menu-item.ts"],"sourcesContent":["import {\n buildProps,\n definePropType,\n isArray,\n isString,\n} from '@element-plus/utils'\n\nimport type { ExtractPublicPropTypes } from 'vue'\nimport type { RouteLocationRaw } from 'vue-router'\nimport type { MenuItemRegistered } from './types'\n\nexport interface MenuItemProps {\n /**\n * @description unique identification\n */\n index: string\n /**\n * @description Vue Router object\n */\n route?: RouteLocationRaw\n /**\n * @description whether disabled\n */\n disabled?: boolean\n}\n\n/**\n * @deprecated Removed after 3.0.0, Use `MenuItemProps` instead.\n */\nexport const menuItemProps = buildProps({\n /**\n * @description unique identification\n */\n index: {\n type: String,\n required: true,\n },\n /**\n * @description Vue Router object\n */\n route: {\n type: definePropType<RouteLocationRaw>([String, Object]),\n },\n /**\n * @description whether disabled\n */\n disabled: Boolean,\n} as const)\n\n/**\n * @deprecated Removed after 3.0.0, Use `MenuItemProps` instead.\n */\nexport type MenuItemPropsPublic = ExtractPublicPropTypes<typeof menuItemProps>\n\nexport const menuItemEmits = {\n click: (item: MenuItemRegistered) =>\n isString(item.index) && isArray(item.indexPath),\n}\nexport type MenuItemEmits = typeof menuItemEmits\n"],"mappings":";;;;;;AA6BA,MAAa,gBAAgB,WAAW;;;;CAItC,OAAO;EACL,MAAM;EACN,UAAU;EACX;;;;CAID,OAAO,EACL,MAAM,eAAiC,CAAC,QAAQ,OAAO,CAAC,EACzD;;;;CAID,UAAU;CACX,CAAU;AAOX,MAAa,gBAAgB,EAC3B,QAAQ,SACN,SAAS,KAAK,MAAM,IAAI,QAAQ,KAAK,UAAU,EAClD"}