UNPKG

element-plus

Version:

A Component Library for Vue 3

1 lines 2.48 kB
{"version":3,"file":"badge2.mjs","sources":["../../../../../../packages/components/badge/src/badge.ts"],"sourcesContent":["import { buildProps, definePropType } from '@element-plus/utils'\n\nimport type { ExtractPropTypes, ExtractPublicPropTypes, StyleValue } from 'vue'\n\nexport const badgeProps = buildProps({\n /**\n * @description display value.\n */\n value: {\n type: [String, Number],\n default: '',\n },\n /**\n * @description maximum value, shows `{max}+` when exceeded. Only works if value is a number.\n */\n max: {\n type: Number,\n default: 99,\n },\n /**\n * @description if a little dot is displayed.\n */\n isDot: Boolean,\n /**\n * @description hidden badge.\n */\n hidden: Boolean,\n /**\n * @description badge type.\n */\n type: {\n type: String,\n values: ['primary', 'success', 'warning', 'info', 'danger'],\n default: 'danger',\n },\n /**\n * @description whether to show badge when value is zero.\n */\n showZero: {\n type: Boolean,\n default: true,\n },\n /**\n * @description customize dot background color\n */\n color: String,\n /**\n * @description CSS style of badge\n */\n badgeStyle: {\n type: definePropType<StyleValue>([String, Object, Array]),\n },\n /**\n * @description set offset of the badge\n */\n offset: {\n type: definePropType<[number, number]>(Array),\n default: [0, 0],\n },\n /**\n * @description custom class name of badge\n */\n badgeClass: {\n type: String,\n },\n} as const)\nexport type BadgeProps = ExtractPropTypes<typeof badgeProps>\nexport type BadgePropsPublic = ExtractPublicPropTypes<typeof badgeProps>\n"],"names":[],"mappings":";;AAIO,MAAM,aAAa,UAAW,CAAA;AAAA,EAInC,KAAO,EAAA;AAAA,IACL,IAAA,EAAM,CAAC,MAAA,EAAQ,MAAM,CAAA;AAAA,IACrB,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,GAAK,EAAA;AAAA,IACH,IAAM,EAAA,MAAA;AAAA,IACN,OAAS,EAAA,EAAA;AAAA,GACX;AAAA,EAIA,KAAO,EAAA,OAAA;AAAA,EAIP,MAAQ,EAAA,OAAA;AAAA,EAIR,IAAM,EAAA;AAAA,IACJ,IAAM,EAAA,MAAA;AAAA,IACN,QAAQ,CAAC,SAAA,EAAW,SAAW,EAAA,SAAA,EAAW,QAAQ,QAAQ,CAAA;AAAA,IAC1D,OAAS,EAAA,QAAA;AAAA,GACX;AAAA,EAIA,QAAU,EAAA;AAAA,IACR,IAAM,EAAA,OAAA;AAAA,IACN,OAAS,EAAA,IAAA;AAAA,GACX;AAAA,EAIA,KAAO,EAAA,MAAA;AAAA,EAIP,UAAY,EAAA;AAAA,IACV,MAAM,cAA2B,CAAA,CAAC,MAAQ,EAAA,MAAA,EAAQ,KAAK,CAAC,CAAA;AAAA,GAC1D;AAAA,EAIA,MAAQ,EAAA;AAAA,IACN,IAAA,EAAM,eAAiC,KAAK,CAAA;AAAA,IAC5C,OAAA,EAAS,CAAC,CAAA,EAAG,CAAC,CAAA;AAAA,GAChB;AAAA,EAIA,UAAY,EAAA;AAAA,IACV,IAAM,EAAA,MAAA;AAAA,GACR;AACF,CAAU;;;;"}