element-plus
Version:
A Component Library for Vue 3
1 lines • 1.9 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 * - will be required in the next major version\n * - required: true\n */\n index?: string | null\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: definePropType<string | null>([String, null]),\n // will be required in the next major version\n // required: true,\n default: null,\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":";;;;;;;AA+BA,MAAa,gBAAgB,WAAW;CAItC,OAAO;EACL,MAAM,eAA8B,CAAC,QAAQ,KAAK,CAAC;EAGnD,SAAS;EACV;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"}