UNPKG

tdesign-vue-next

Version:
73 lines (69 loc) 2.38 kB
/** * tdesign v1.11.5 * (c) 2025 tdesign * @license MIT */ import '../../hooks/useConfig.mjs'; import { g as getWeeks, d as getQuarters, f as getMonths, h as getYears, j as flagActive } from '../../_chunks/dep-9ae97283.mjs'; import { useConfig } from '../../config-provider/hooks/useConfig.mjs'; import 'vue'; import 'lodash-es'; import '../../config-provider/utils/context.mjs'; import '../../_chunks/dep-a5ae2f3f.mjs'; import '../../_chunks/dep-4ed7019e.mjs'; import '../../_chunks/dep-82d2a14f.mjs'; import '../../_chunks/dep-37fa6ccb.mjs'; import '../../_chunks/dep-7fb24b17.mjs'; import '../../_chunks/dep-6d9c1bfc.mjs'; import '../../_chunks/dep-9f375e51.mjs'; import '../../_chunks/dep-da95471f.mjs'; import '../../_chunks/dep-b59283d0.mjs'; import '../../_chunks/dep-748f1828.mjs'; import '../../_chunks/dep-198540b0.mjs'; import '../../_chunks/dep-88187fb2.mjs'; function useTableData(props) { var _props$firstDayOfWeek; var _useConfig = useConfig("datePicker"), globalConfig = _useConfig.globalConfig; var options = { minDate: props.minDate, maxDate: props.maxDate, disableDate: props.disableDate, firstDayOfWeek: (_props$firstDayOfWeek = props.firstDayOfWeek) !== null && _props$firstDayOfWeek !== void 0 ? _props$firstDayOfWeek : globalConfig.value.firstDayOfWeek, monthLocal: globalConfig.value.months, quarterLocal: globalConfig.value.quarters, showWeekOfYear: props.mode === "week", dayjsLocale: globalConfig.value.dayjsLocale, cancelRangeSelectLimit: props.cancelRangeSelectLimit }; var data = []; if (props.mode === "date") { data = getWeeks({ year: props.year, month: props.month }, options); } else if (props.mode === "week") { data = getWeeks({ year: props.year, month: props.month }, options); } else if (props.mode === "quarter") { data = getQuarters(props.year, options); } else if (props.mode === "month") { data = getMonths(props.year, options); } else if (props.mode === "year") { data = getYears(props.year, options); } return flagActive(data, { start: props.start, end: props.end, hoverStart: props.hoverStart, hoverEnd: props.hoverEnd, type: props.mode, isRange: props.isRange, value: props.value, multiple: props.multiple }); } export { useTableData }; //# sourceMappingURL=useTableData.mjs.map