UNPKG

tdesign-vue-next

Version:
79 lines (75 loc) 2.62 kB
/** * tdesign v1.13.2 * (c) 2025 tdesign * @license MIT */ import '../../_chunks/dep-9c4aef07.mjs'; import { g as getWeeks, d as getQuarters, f as getMonths, h as getYears, j as flagActive } from '../../_chunks/dep-087caa16.mjs'; import { useConfig } from '../../config-provider/hooks/useConfig.mjs'; import 'vue'; import 'lodash-es'; import '../../_chunks/dep-b981148e.mjs'; import '../../_chunks/dep-f1895f5a.mjs'; import '../../_chunks/dep-a81129ec.mjs'; import '../../utils/render-tnode.mjs'; import '../../_chunks/dep-98cd1e2d.mjs'; import '../../_chunks/dep-23a929e8.mjs'; import '../../_chunks/dep-48e13ca0.mjs'; import '../../_chunks/dep-033df8e6.mjs'; import '../../config-provider/utils/context.mjs'; import '../../_chunks/dep-466a0666.mjs'; import '../../_chunks/dep-24ce1cec.mjs'; import '../../_chunks/dep-160caab6.mjs'; import '../../_chunks/dep-e497214e.mjs'; import '../../utils/dom.mjs'; import '../../_chunks/dep-20550dcc.mjs'; import '../../_chunks/dep-0bb39574.mjs'; import '../../_chunks/dep-a7dc00e7.mjs'; import '../../_chunks/dep-587dbae3.mjs'; import '../../_chunks/dep-624e30a3.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