element-plus
Version:
A Component Library for Vue 3
1 lines • 2.1 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 { 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"],"names":[],"mappings":";;;AA+BO,MAAM,gBAAgB,UAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAItC,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,cAAA,CAA8B,CAAC,MAAA,EAAQ,IAAI,CAAC,CAAA;AAAA;AAAA;AAAA,IAGlD,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,cAAA,CAAiC,CAAC,MAAA,EAAQ,MAAM,CAAC;AAAA,GACzD;AAAA;AAAA;AAAA;AAAA,EAIA,QAAA,EAAU;AACZ,CAAU;AAOH,MAAM,aAAA,GAAgB;AAAA,EAC3B,KAAA,EAAO,CAAC,IAAA,KACN,QAAA,CAAS,KAAK,KAAK,CAAA,IAAK,OAAA,CAAQ,IAAA,CAAK,SAAS;AAClD;;;;"}