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.
39 lines
781 B
39 lines
781 B
11 months ago
|
import { computed } from 'vue';
|
||
|
import { NOOP } from '@vue/shared';
|
||
|
import { ExpandTrigger } from './node.mjs';
|
||
|
|
||
|
const CommonProps = {
|
||
|
modelValue: [Number, String, Array],
|
||
|
options: {
|
||
|
type: Array,
|
||
|
default: () => []
|
||
|
},
|
||
|
props: {
|
||
|
type: Object,
|
||
|
default: () => ({})
|
||
|
}
|
||
|
};
|
||
|
const DefaultProps = {
|
||
|
expandTrigger: ExpandTrigger.CLICK,
|
||
|
multiple: false,
|
||
|
checkStrictly: false,
|
||
|
emitPath: true,
|
||
|
lazy: false,
|
||
|
lazyLoad: NOOP,
|
||
|
value: "value",
|
||
|
label: "label",
|
||
|
children: "children",
|
||
|
leaf: "leaf",
|
||
|
disabled: "disabled",
|
||
|
hoverThreshold: 500
|
||
|
};
|
||
|
const useCascaderConfig = (props) => {
|
||
|
return computed(() => ({
|
||
|
...DefaultProps,
|
||
|
...props.props
|
||
|
}));
|
||
|
};
|
||
|
|
||
|
export { CommonProps, DefaultProps, useCascaderConfig };
|
||
|
//# sourceMappingURL=config.mjs.map
|