config.mjs 884 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import { computed } from 'vue';
  2. import { buildProps, definePropType } from '../../../utils/vue/props/runtime.mjs';
  3. import { NOOP } from '@vue/shared';
  4. const CommonProps = buildProps({
  5. modelValue: {
  6. type: definePropType([Number, String, Array])
  7. },
  8. options: {
  9. type: definePropType(Array),
  10. default: () => []
  11. },
  12. props: {
  13. type: definePropType(Object),
  14. default: () => ({})
  15. }
  16. });
  17. const DefaultProps = {
  18. expandTrigger: "click",
  19. multiple: false,
  20. checkStrictly: false,
  21. emitPath: true,
  22. lazy: false,
  23. lazyLoad: NOOP,
  24. value: "value",
  25. label: "label",
  26. children: "children",
  27. leaf: "leaf",
  28. disabled: "disabled",
  29. hoverThreshold: 500
  30. };
  31. const useCascaderConfig = (props) => {
  32. return computed(() => ({
  33. ...DefaultProps,
  34. ...props.props
  35. }));
  36. };
  37. export { CommonProps, DefaultProps, useCascaderConfig };
  38. //# sourceMappingURL=config.mjs.map