UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 2.33 kB
{"version":3,"file":"link.mjs","sources":["../../../../../../packages/components/link/src/link.ts"],"sourcesContent":["import { buildProps, iconPropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes, PropType } from 'vue'\nimport type Link from './link.vue'\n\nexport const linkProps = buildProps({\n /**\n * @description type\n */\n type: {\n type: String,\n values: ['primary', 'success', 'warning', 'info', 'danger', 'default'],\n default: undefined,\n },\n /**\n * @description when underlines should appear\n */\n underline: {\n type: [Boolean, String],\n values: [true, false, 'always', 'never', 'hover'],\n default: undefined,\n },\n /**\n * @description whether the component is disabled\n */\n disabled: Boolean,\n /**\n * @description same as native hyperlink's `href`\n */\n href: { type: String, default: '' },\n /**\n * @description same as native hyperlink's `target`\n */\n target: {\n type: String as PropType<'_blank' | '_parent' | '_self' | '_top' | string>,\n default: '_self',\n },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n} as const)\nexport type LinkProps = ExtractPropTypes<typeof linkProps>\nexport type LinkPropsPublic = ExtractPublicPropTypes<typeof linkProps>\n\nexport const linkEmits = {\n click: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type LinkEmits = typeof linkEmits\n\nexport type LinkInstance = InstanceType<typeof Link> & unknown\nexport interface LinkConfigContext {\n type?: string\n underline?: string | boolean\n}\n"],"names":[],"mappings":";;;AAKO,MAAM,YAAY,UAAW,CAAA;AAAA,EAIlC,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,QAAQ,CAAC,SAAA,EAAW,WAAW,SAAW,EAAA,MAAA,EAAQ,UAAU,SAAS,CAAA;AAAA,IACrE,OAAS,EAAA,KAAA,CAAA;AAAA,GACX;AAAA,EAIA,SAAW,EAAA;AAAA,IACT,IAAA,EAAM,CAAC,OAAA,EAAS,MAAM,CAAA;AAAA,IACtB,QAAQ,CAAC,IAAA,EAAM,KAAO,EAAA,QAAA,EAAU,SAAS,OAAO,CAAA;AAAA,IAChD,OAAS,EAAA,KAAA,CAAA;AAAA,GACX;AAAA,EAIA,QAAU,EAAA,OAAA;AAAA,EAIV,IAAM,EAAA,EAAE,IAAM,EAAA,MAAA,EAAQ,SAAS,EAAG,EAAA;AAAA,EAIlC,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,OAAA;AAAA,GACX;AAAA,EAIA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,YAAA;AAAA,GACR;AACF,CAAU,EAAA;AAIH,MAAM,SAAY,GAAA;AAAA,EACvB,KAAA,EAAO,CAAC,GAAA,KAAoB,GAAe,YAAA,UAAA;AAC7C;;;;"}