UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 2.81 kB
{"version":3,"file":"alert.mjs","sources":["../../../../../../packages/components/alert/src/alert.ts"],"sourcesContent":["import { TypeComponentsMap, buildProps, keysOf } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes } from 'vue'\n\nexport const alertEffects = ['light', 'dark'] as const\n\nexport const alertProps = buildProps({\n /**\n * @description alert title.\n */\n title: {\n type: String,\n default: '',\n },\n description: {\n type: String,\n default: '',\n },\n /**\n * @description alert type.\n */\n type: {\n type: String,\n values: keysOf(TypeComponentsMap),\n default: 'info',\n },\n /**\n * @description whether alert can be dismissed.\n */\n closable: {\n type: Boolean,\n default: true,\n },\n /**\n * @description text for replacing x button\n */\n closeText: {\n type: String,\n default: '',\n },\n /**\n * @description whether show icon\n */\n showIcon: Boolean,\n /**\n * @description should content be placed in center.\n */\n center: Boolean,\n effect: {\n type: String,\n values: alertEffects,\n default: 'light',\n },\n /**\n * @deprecated Removed after 2.11.8.\n * @description delay of appearance, in millisecond, not valid in controlled mode\n */\n showAfter: Number,\n /**\n * @deprecated Removed after 2.11.8.\n * @description delay of disappear, in millisecond, not valid in controlled mode\n */\n hideAfter: Number,\n /**\n * @deprecated Removed after 2.11.8.\n * @description disappear automatically, in millisecond, not valid in controlled mode\n */\n autoClose: Number,\n} as const)\nexport type AlertProps = ExtractPropTypes<typeof alertProps>\nexport type AlertPropsPublic = ExtractPublicPropTypes<typeof alertProps>\n\nexport const alertEmits = {\n close: (evt: MouseEvent) => evt instanceof MouseEvent,\n}\nexport type AlertEmits = typeof alertEmits\n"],"names":[],"mappings":";;;;AAIa,MAAA,YAAA,GAAe,CAAC,OAAA,EAAS,MAAM,EAAA;AAErC,MAAM,aAAa,UAAW,CAAA;AAAA,EAInC,KAAO,EAAA;AAAA,IACL,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EACA,WAAa,EAAA;AAAA,IACX,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,MAAA,EAAQ,OAAO,iBAAiB,CAAA;AAAA,IAChC,OAAS,EAAA,MAAA;AAAA,GACX;AAAA,EAIA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EAIA,SAAW,EAAA;AAAA,IACT,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,QAAU,EAAA,OAAA;AAAA,EAIV,MAAQ,EAAA,OAAA;AAAA,EACR,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,MAAA;AAAA,IACN,MAAQ,EAAA,YAAA;AAAA,IACR,OAAS,EAAA,OAAA;AAAA,GACX;AAAA,EAKA,SAAW,EAAA,MAAA;AAAA,EAKX,SAAW,EAAA,MAAA;AAAA,EAKX,SAAW,EAAA,MAAA;AACb,CAAU,EAAA;AAIH,MAAM,UAAa,GAAA;AAAA,EACxB,KAAA,EAAO,CAAC,GAAA,KAAoB,GAAe,YAAA,UAAA;AAC7C;;;;"}