You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

0 lines
5.7 KiB

3 months ago
  1. {"ast":null,"code":"import { Loading } from '@element-plus/icons-vue';\nimport { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';\nimport { useSizeProp } from '../../../hooks/use-size/index.mjs';\nimport { iconPropType } from '../../../utils/vue/icon.mjs';\nconst buttonTypes = [\"default\", \"primary\", \"success\", \"warning\", \"info\", \"danger\", \"text\", \"\"];\nconst buttonNativeTypes = [\"button\", \"submit\", \"reset\"];\nconst buttonProps = buildProps({\n size: useSizeProp,\n disabled: Boolean,\n type: {\n type: String,\n values: buttonTypes,\n default: \"\"\n },\n icon: {\n type: iconPropType\n },\n nativeType: {\n type: String,\n values: buttonNativeTypes,\n default: \"button\"\n },\n loading: Boolean,\n loadingIcon: {\n type: iconPropType,\n default: () => Loading\n },\n plain: Boolean,\n text: Boolean,\n link: Boolean,\n bg: Boolean,\n autofocus: Boolean,\n round: Boolean,\n circle: Boolean,\n color: String,\n dark: Boolean,\n autoInsertSpace: {\n type: Boolean,\n default: void 0\n },\n tag: {\n type: definePropType([String, Object]),\n default: \"button\"\n }\n});\nconst buttonEmits = {\n click: evt => evt instanceof MouseEvent\n};\nexport { buttonEmits, buttonNativeTypes, buttonProps, buttonTypes };","map":{"version":3,"names":["buttonTypes","buttonNativeTypes","buttonProps","buildProps","size","useSizeProp","disabled","Boolean","type","String","values","default","icon","iconPropType","nativeType","loading","loadingIcon","Loading","plain","text","link","bg","autofocus","round","circle","color","dark","autoInsertSpace","tag","definePropType","Object","buttonEmits","click","evt","MouseEvent"],"sources":["../../../../../../packages/components/button/src/button.ts"],"sourcesContent":["import { useSizeProp } from '@element-plus/hooks'\nimport { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { Loading } from '@element-plus/icons-vue'\nimport type { Component, ExtractPropTypes } from 'vue'\n\nexport const buttonTypes = [\n 'default',\n 'primary',\n 'success',\n 'warning',\n 'info',\n 'danger',\n /**\n * @deprecated\n * Text type will be deprecated in the next major version (3.0.0)\n */\n 'text',\n '',\n] as const\nexport const buttonNativeTypes = ['button', 'submit', 'reset'] as const\n\nexport const buttonProps = buildProps({\n /**\n * @description button size\n */\n size: useSizeProp,\n /**\n * @description disable the button\n */\n disabled: Boolean,\n /**\n * @description button type\n */\n type: {\n type: String,\n values: buttonTypes,\n default: '',\n },\n /**\n * @description icon component\n */\n icon: {\n type: iconPropType,\n },\n /**\n * @description native button type\n */\n nativeType: {\n type: String,\n values: buttonNativeTypes,\n default: 'button',\n },\n /**\n * @description determine whether it's loading\n */\n loading: Boolean,\n /**\n * @description customize loading icon component\n */\n loadingIcon: {\n type: iconPropType,\n default: () => Loading,\n },\n /**\n * @description determine whether it's a plain button\n */\n plain: Boolean,\n /**\n * @description determine whether it's a text button\n */\n text: Boolean,\n /**\n * @description determine whether it's a link button\n */\n link: Boolean,\n /**\n * @description determine whether the text button background color is always on\n */\n bg: Boolean,\n /**\n * @description native button autofocus\n */\n autofocus: Boolean,\n /**\n * @description determine whether it's a round button\n */\n round: Boolean,\n /**\n * @description determine whether it's a circle button\n */\n circle: Boolean,\n /**\n * @description custom button color, automatically calculate `hover` and `active` color\n */\n color: String,\n /**\n * @description dark mode, which automatically converts `color` to dark mode colors\n */\n dark: Boolean,\n /**\n * @description automatically insert a space between two