123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- import { placements } from '@popperjs/core';
- import { CircleClose, ArrowDown } from '@element-plus/icons-vue';
- import { scrollbarEmits } from '../../scrollbar/src/scrollbar.mjs';
- import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
- import { useSizeProp } from '../../../hooks/use-size/index.mjs';
- import { useTooltipContentProps } from '../../tooltip/src/content.mjs';
- import { iconPropType } from '../../../utils/vue/icon.mjs';
- import { tagProps } from '../../tag/src/tag.mjs';
- import { useEmptyValuesProps } from '../../../hooks/use-empty-values/index.mjs';
- import { useAriaProps } from '../../../hooks/use-aria/index.mjs';
- import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
- const SelectProps = buildProps({
- name: String,
- id: String,
- modelValue: {
- type: definePropType([
- Array,
- String,
- Number,
- Boolean,
- Object
- ]),
- default: void 0
- },
- autocomplete: {
- type: String,
- default: "off"
- },
- automaticDropdown: Boolean,
- size: useSizeProp,
- effect: {
- type: definePropType(String),
- default: "light"
- },
- disabled: Boolean,
- clearable: Boolean,
- filterable: Boolean,
- allowCreate: Boolean,
- loading: Boolean,
- popperClass: {
- type: String,
- default: ""
- },
- popperOptions: {
- type: definePropType(Object),
- default: () => ({})
- },
- remote: Boolean,
- loadingText: String,
- noMatchText: String,
- noDataText: String,
- remoteMethod: Function,
- filterMethod: Function,
- multiple: Boolean,
- multipleLimit: {
- type: Number,
- default: 0
- },
- placeholder: {
- type: String
- },
- defaultFirstOption: Boolean,
- reserveKeyword: {
- type: Boolean,
- default: true
- },
- valueKey: {
- type: String,
- default: "value"
- },
- collapseTags: Boolean,
- collapseTagsTooltip: Boolean,
- maxCollapseTags: {
- type: Number,
- default: 1
- },
- teleported: useTooltipContentProps.teleported,
- persistent: {
- type: Boolean,
- default: true
- },
- clearIcon: {
- type: iconPropType,
- default: CircleClose
- },
- fitInputWidth: Boolean,
- suffixIcon: {
- type: iconPropType,
- default: ArrowDown
- },
- tagType: { ...tagProps.type, default: "info" },
- tagEffect: { ...tagProps.effect, default: "light" },
- validateEvent: {
- type: Boolean,
- default: true
- },
- remoteShowSuffix: Boolean,
- showArrow: {
- type: Boolean,
- default: true
- },
- offset: {
- type: Number,
- default: 12
- },
- placement: {
- type: definePropType(String),
- values: placements,
- default: "bottom-start"
- },
- fallbackPlacements: {
- type: definePropType(Array),
- default: ["bottom-start", "top-start", "right", "left"]
- },
- tabindex: {
- type: [String, Number],
- default: 0
- },
- appendTo: useTooltipContentProps.appendTo,
- ...useEmptyValuesProps,
- ...useAriaProps(["ariaLabel"])
- });
- const selectEmits = {
- [UPDATE_MODEL_EVENT]: (val) => true,
- [CHANGE_EVENT]: (val) => true,
- "popup-scroll": scrollbarEmits.scroll,
- "remove-tag": (val) => true,
- "visible-change": (visible) => true,
- focus: (evt) => evt instanceof FocusEvent,
- blur: (evt) => evt instanceof FocusEvent,
- clear: () => true
- };
- export { SelectProps, selectEmits };
- //# sourceMappingURL=select.mjs.map
|