hongluan-ui
Version:
Hongluan Component Library for Vue 3
103 lines (100 loc) • 2.42 kB
JavaScript
import '../../cascader-panel/index.mjs';
import '../../../utils/index.mjs';
import '../../../hooks/index.mjs';
import '../../tooltip/index.mjs';
import '../../../constants/index.mjs';
import { CommonProps } from '../../cascader-panel/src/config.mjs';
import { isValidComponentSize } from '../../../utils/vue/validator.mjs';
import { useTooltipContentProps } from '../../tooltip/src/content2.mjs';
import { useEmptyValuesProps } from '../../../hooks/use-empty-values/index.mjs';
import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
import { isBoolean } from '../../../utils/types.mjs';
const cascaderProps = {
...CommonProps,
size: {
type: String,
validator: isValidComponentSize
},
placeholder: String,
disabled: Boolean,
clearable: Boolean,
filterable: Boolean,
filterMethod: {
type: Function,
default: (node, keyword) => node.text.includes(keyword)
},
separator: {
type: String,
default: " / "
},
showAllLevels: {
type: Boolean,
default: true
},
collapseTags: Boolean,
maxCollapseTags: {
type: Number,
default: 1
},
collapseTagsTooltip: {
type: Boolean,
default: false
},
debounce: {
type: Number,
default: 300
},
beforeFilter: {
type: Function,
default: () => true
},
placement: {
type: String,
default: "bottom-start"
},
fallbackPlacements: {
type: Array,
default: ["bottom-start", "bottom", "top-start", "top", "right", "left"]
},
popperClass: {
type: String,
default: ""
},
block: {
type: Boolean,
default: false
},
popperAppendToBody: {
type: Boolean,
default: void 0
},
teleported: useTooltipContentProps.teleported,
fill: Boolean,
popperOffset: {
type: Number,
default: 4
},
tagType: { type: String, default: "" },
tagEffect: { type: String, default: "" },
validateEvent: {
type: Boolean,
default: true
},
persistent: {
type: Boolean,
default: true
},
...useEmptyValuesProps
};
const cascaderEmits = {
[UPDATE_MODEL_EVENT]: (_) => true,
[CHANGE_EVENT]: (_) => true,
focus: (evt) => evt instanceof FocusEvent,
blur: (evt) => evt instanceof FocusEvent,
clear: () => true,
visibleChange: (val) => isBoolean(val),
expandChange: (val) => !!val,
removeTag: (val) => !!val
};
export { cascaderEmits, cascaderProps };
//# sourceMappingURL=cascader.mjs.map