element-plus
Version:
A Component Library for Vue 3
1 lines • 1.65 kB
Source Map (JSON)
{"version":3,"file":"menu-item.mjs","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 { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\nimport type { RouteLocationRaw } from 'vue-router'\nimport type { MenuItemRegistered } from './types'\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)\nexport type MenuItemProps = ExtractPropTypes<typeof menuItemProps>\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"],"names":[],"mappings":";;;AAWO,MAAM,gBAAgB,UAAW,CAAA;AAAA,EAItC,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,cAAA,CAA8B,CAAC,MAAA,EAAQ,IAAI,CAAC,CAAA;AAAA,IAGlD,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EAIA,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,cAAA,CAAiC,CAAC,MAAA,EAAQ,MAAM,CAAC,CAAA;AAAA,GACzD;AAAA,EAIA,QAAU,EAAA,OAAA;AACZ,CAAU,EAAA;AAIH,MAAM,aAAgB,GAAA;AAAA,EAC3B,KAAA,EAAO,CAAC,IACN,KAAA,QAAA,CAAS,KAAK,KAAK,CAAA,IAAK,OAAQ,CAAA,IAAA,CAAK,SAAS,CAAA;AAClD;;;;"}