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.

1 line
12 KiB

{"ast":null,"code":"import { placements } from '@popperjs/core';\nimport '../../../hooks/index.mjs';\nimport '../../../utils/index.mjs';\nimport '../../tooltip/index.mjs';\nimport { CircleClose, ArrowDown } from '@element-plus/icons-vue';\nimport '../../tag/index.mjs';\nimport { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';\nimport { useSizeProp } from '../../../hooks/use-size/index.mjs';\nimport { useTooltipContentProps } from '../../tooltip/src/content.mjs';\nimport { iconPropType } from '../../../utils/vue/icon.mjs';\nimport { tagProps } from '../../tag/src/tag.mjs';\nimport { useEmptyValuesProps } from '../../../hooks/use-empty-values/index.mjs';\nimport { useAriaProps } from '../../../hooks/use-aria/index.mjs';\nconst SelectProps = buildProps({\n name: String,\n id: String,\n modelValue: {\n type: [Array, String, Number, Boolean, Object],\n default: void 0\n },\n autocomplete: {\n type: String,\n default: \"off\"\n },\n automaticDropdown: Boolean,\n size: useSizeProp,\n effect: {\n type: definePropType(String),\n default: \"light\"\n },\n disabled: Boolean,\n clearable: Boolean,\n filterable: Boolean,\n allowCreate: Boolean,\n loading: Boolean,\n popperClass: {\n type: String,\n default: \"\"\n },\n popperOptions: {\n type: definePropType(Object),\n default: () => ({})\n },\n remote: Boolean,\n loadingText: String,\n noMatchText: String,\n noDataText: String,\n remoteMethod: Function,\n filterMethod: Function,\n multiple: Boolean,\n multipleLimit: {\n type: Number,\n default: 0\n },\n placeholder: {\n type: String\n },\n defaultFirstOption: Boolean,\n reserveKeyword: {\n type: Boolean,\n default: true\n },\n valueKey: {\n type: String,\n default: \"value\"\n },\n collapseTags: Boolean,\n collapseTagsTooltip: Boolean,\n maxCollapseTags: {\n type: Number,\n default: 1\n },\n teleported: useTooltipContentProps.teleported,\n persistent: {\n type: Boolean,\n default: true\n },\n clearIcon: {\n type: iconPropType,\n default: CircleClose\n },\n fitInputWidth: Boolean,\n suffixIcon: {\n type: iconPropType,\n default: ArrowDown\n },\n tagType: {\n ...tagProps.type,\n default: \"info\"\n },\n tagEffect: {\n ...tagProps.effect,\n default: \"light\"\n },\n validateEvent: {\n type: Boolean,\n default: true\n },\n remoteShowSuffix: Boolean,\n placement: {\n type: definePropType(String),\n values: placements,\n default: \"bottom-start\"\n },\n fallbackPlacements: {\n type: definePropType(Array),\n default: [\"bottom-start\", \"top-start\", \"right\", \"left\"]\n },\n appendTo: String,\n ...useEmptyValuesProps,\n ...useAriaProps([\"ariaLabel\"])\n});\nexport { SelectProps };","map":{"version":3,"names":["SelectProps","buildProps","name","String","id","modelValue","type","Array","Number","Boolean","Object","default","autocomplete","automaticDropdown","size","useSizeProp","effect","definePropType","disabled","clearable","filterable","allowCreate","loading","popperClass","popperOptions","remote","loadingText","noMatchText","noDataText","remoteMethod","Function","filterMethod","multiple","multipleLimit","placeholder","defaultFirstOption","reserveKeyword","valueKey","collapseTags","collapseTagsTooltip","maxCollapseTags","teleported","useTooltipContentProps","persistent","clearIcon","iconPropType","CircleClose","fitInputWidth","suffixIcon","ArrowDown","tagType","tagProps","tagEffect","validateEvent","remoteShowSuffix","placement","values","placements","fallbackPlacements","appendTo","useEmptyValuesProps","useAriaProps"],"sources":["../../../../../../packages/components/select/src/select.ts"],"sourcesContent":["import { placements } from '@popperjs/core'\nimport {\n useAriaProps,\n useEmptyValuesProps,\n useSizeProp,\n} from '@element-plus/hooks'\nimport { buildProps, definePropType, iconPropType } from '@element-plus/utils'\nimport { useTooltipContentProps } from '@element-plus/components/tooltip'\nimport { ArrowDown, CircleClose } from '@element-plus/icons-vue'\nimport { tagProps } from '@element-plus/components/tag'\nimport type {\n Options,\n Placement,\n PopperEffect,\n} from '@element-plus/components/popper'\n\nexport const SelectProps = buildProps({\n /**\n * @description the name attribute of select input\n */\n name: String,\n /**\n * @description native input id\n */\n id: String,\n /**\n * @description binding value\n */\n modelValue: {\n type: [Array, String, Number, Boolean, Object],\n default: undefined,\n },\n /**\n * @description the autocomplete attribute of select input\n */\n autocomplete: {\n type: String,\n default: 'off',\n },\n /**\n * @description for non-filterable Select, this prop decides if the option menu pops up when the input is focused\n */\n automaticDropdown: Boolean,\n /**\n * @description size of Input\n */\n size: useSizeProp,\n /**\n * @description tooltip theme, built-in theme: `dark` / `light`\n */\n effect: {\n type: definePropType<PopperEffect | string>(String),\n default: 'light',\n },\n /**\n * @description whether Select is disabled\n */\n disabled: Boolean,\n /**\n * @description whether select can be cleared\n */\n clearable: Boolean,\n /**\n * @description whether Select is filterable\n */\n filterable: Boolean,\n /**\n * @description whether creating new items is allowed. To use this, `filterable` must be true\n */\n allowCreate: Boolean,\n /**\n * @description whether Select is loading data from server\n */\n loading: Boolean,\n /**\n * @description custom class name for Select's dropdown\n */\n popperClass: {\n type: String,\n default: '',\n },\n /**\n * @description [popper.js](https://popper.js.org/docs/v2/) parameters\n */\n popperOptions: {\n type: definePropType<Partial<Options>>(Object),\n default: () => ({} as Partial<Options>),\n },\n /**\n * @description whether options are loaded from server\n */\n remote: Boolean,\n /**\n * @description displayed text while loading data from server, default is 'Loading'\n */\n loadingText: String,\n /**\n * @description displayed text when no data matches the filtering query, you can also use slot `empty`, default is 'No matching data'\n */\n noMatchText: String,\n /**\n * @description displayed text when there is no options, you can also use slot `empty`, default is 'No data'\n */\n noDataText: String,\n /**\n * @description custom remote search method\n */\n remoteMethod: Function,\n /**\n * @description custom filter method\n */\n filterMethod: Function,\n /**\n * @description whether multiple-select is activated\n */\n multiple: Boolean,\n /**\n * @description maximum number of options user can select when `multiple` is `true`. No limit when set to 0\n */\n multipleLimit: {\n type: Number,\n default: 0,\n },\n /**\n * @description placeholder, default is 'Select'\n */\n placeholder: {\n type: String,\n },\n /**\n * @description select first matching option on enter key. Use with `filterable` or `remote`\n */\n defaultFirstOption: Boolean,\n /**\n * @description when `multiple` and `filter` is true, whether to reserve current keyword after selecting an option\n */\n reserveKeyword: {\n type: Boolean,\n default: true,\n },\n /**\n * @description unique identity key name for value, required when value is an object\n */\n valueKey: {\n type: String,\n default: 'value',\n },\n /**\n * @description whether to collapse tags to a text when multiple selecting\n */\n collapseTags: Boolean,\n /**\n * @description whether show all selected tags when mouse hover text of collapse-tags. To use this, `collapse-tags` must be true\n */\n collapseTagsTooltip: Boolean,\n /**\n * @description the max tags number to be shown. To use this, `collapse-tags` must be true\n */\n maxCollapseTags: {\n type: Number,\n default: 1,\n },\n /**\n * @description whether select dropdown is teleported to the body\n */\n teleported: useTooltipContentProps.teleported,\n /**\n * @description when select dropdown is inactive and `persistent` is `false`, select dropdown will be destroyed\n */\n persistent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description custom clear icon component\n */\n clearIcon: {\n type: iconPropType,\n default: CircleClose,\n },\n /**\n * @description whether the width of the dropdown is the same as the input\n */\n fitInputWidth: Boolean,\n /**\n * @description custom suffix icon component\n */\n suffixIcon: {\n type: iconPropType,\n default: ArrowDown,\n },\n /**\n * @description tag type\n */\n // eslint-disable-next-line vue/require-prop-types\n tagType: { ...tagProps.type, default: 'info' },\n /**\n * @description tag effect\n */\n tagEffect: { ...tagProps.effect, default: 'light' },\n /**\n * @description whether to trigger form validation\n */\n validateEvent: {\n type: Boolean,\n default: true,\n },\n /**\n * @description in remote search method show suffix icon\n */\n remoteShowSuffix: Boolean,\n /**\n * @description position of dropdown\n */\n placement: {\n type: definePropType<Placement>(String),\n values: placements,\n default: 'bottom-start',\n },\n /**\n * @description list of possible positions for dropdown\n */\n fallbackPlacements: {\n type: definePropType<Placement[]>(Array),\n default: ['bottom-start', 'top-start', 'right', 'left'],\n },\n /**\n * @description which element the selection dropdown appends to\n */\n appendTo: String,\n ...useEmptyValuesProps,\n ...useAriaProps(['ariaLabel']),\n})\n"],"mappings":";;;;;;;;;;;;;AAUY,MAACA,WAAW,GAAGC,UAAU,CAAC;EACpCC,IAAI,EAAEC,MAAM;EACZC,EAAE,EAAED,MAAM;EACVE,UAAU,EAAE;IACVC,IAAI,EAAE,CAACC,KAAK,EAAEJ,MAAM,EAAEK,MAAM,EAAEC,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