element-plus
Version:
A Component Library for Vue 3
1 lines • 2.52 kB
Source Map (JSON)
{"version":3,"file":"result.mjs","sources":["../../../../../../packages/components/result/src/result.ts"],"sourcesContent":["import { buildProps } from '@element-plus/utils'\nimport {\n CircleCheckFilled,\n CircleCloseFilled,\n InfoFilled,\n WarningFilled,\n} from '@element-plus/icons-vue'\n\nimport type { Component, ExtractPublicPropTypes } from 'vue'\nimport type Result from './result.vue'\n\nexport const IconMap = {\n primary: 'icon-primary',\n success: 'icon-success',\n warning: 'icon-warning',\n error: 'icon-error',\n info: 'icon-info',\n} as const\n\nexport const IconComponentMap: Record<\n (typeof IconMap)[keyof typeof IconMap],\n Component\n> = {\n [IconMap.primary]: InfoFilled,\n [IconMap.success]: CircleCheckFilled,\n [IconMap.warning]: WarningFilled,\n [IconMap.error]: CircleCloseFilled,\n [IconMap.info]: InfoFilled,\n}\n\nexport interface ResultProps {\n /**\n * @description title of result\n */\n title?: string\n /**\n * @description sub title of result\n */\n subTitle?: string\n /**\n * @description icon type of result\n */\n icon?: 'primary' | 'success' | 'warning' | 'info' | 'error'\n}\n\nexport const resultProps = buildProps({\n /**\n * @description title of result\n */\n title: {\n type: String,\n default: '',\n },\n /**\n * @description sub title of result\n */\n subTitle: {\n type: String,\n default: '',\n },\n /**\n * @description icon type of result\n */\n icon: {\n type: String,\n values: ['primary', 'success', 'warning', 'info', 'error'],\n default: 'info',\n },\n} as const)\n\nexport type ResultPropsPublic = ExtractPublicPropTypes<typeof resultProps>\n\nexport type ResultInstance = InstanceType<typeof Result> & unknown\n"],"names":[],"mappings":";;;AAWO,MAAM,OAAA,GAAU;AAAA,EACrB,OAAA,EAAS,cAAA;AAAA,EACT,OAAA,EAAS,cAAA;AAAA,EACT,OAAA,EAAS,cAAA;AAAA,EACT,KAAA,EAAO,YAAA;AAAA,EACP,IAAA,EAAM;AACR;AAEO,MAAM,gBAAA,GAGT;AAAA,EACF,CAAC,OAAA,CAAQ,OAAO,GAAG,UAAA;AAAA,EACnB,CAAC,OAAA,CAAQ,OAAO,GAAG,iBAAA;AAAA,EACnB,CAAC,OAAA,CAAQ,OAAO,GAAG,aAAA;AAAA,EACnB,CAAC,OAAA,CAAQ,KAAK,GAAG,iBAAA;AAAA,EACjB,CAAC,OAAA,CAAQ,IAAI,GAAG;AAClB;AAiBO,MAAM,cAAc,UAAA,CAAW;AAAA;AAAA;AAAA;AAAA,EAIpC,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,MAAA;AAAA,IACN,OAAA,EAAS;AAAA,GACX;AAAA;AAAA;AAAA;AAAA,EAIA,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,MAAA;AAAA,IACN,QAAQ,CAAC,SAAA,EAAW,SAAA,EAAW,SAAA,EAAW,QAAQ,OAAO,CAAA;AAAA,IACzD,OAAA,EAAS;AAAA;AAEb,CAAU;;;;"}