UNPKG

tdesign-mobile-vue

Version:
40 lines (36 loc) 1.17 kB
/** * tdesign v1.7.0 * (c) 2024 TDesign Group * @license MIT */ import { _ as _toConsumableArray } from '../_chunks/dep-f0f403be.mjs'; import { _ as _slicedToArray } from '../_chunks/dep-cd74809c.mjs'; import { i as isArray_1 } from '../_chunks/dep-019e292f.mjs'; import '../_chunks/dep-8d37dbf8.mjs'; import '../_chunks/dep-8bf3054e.mjs'; var getMeaningColumn = function getMeaningColumn(mode) { var arr = ["year", "month", "date", "hour", "minute", "second"]; if (isArray_1(mode)) { var ans = []; var _mode = _slicedToArray(mode, 2), dateMode = _mode[0], timeMode = _mode[1]; if (dateMode != null) { var cutIndex2 = arr.indexOf(dateMode); if (cutIndex2 <= 2 && cutIndex2 > -1) { ans.push.apply(ans, _toConsumableArray(arr.slice(0, cutIndex2 + 1))); } } if (timeMode != null) { var _cutIndex = arr.indexOf(timeMode); if (_cutIndex > 2) { ans.push.apply(ans, _toConsumableArray(arr.slice(3, _cutIndex + 1))); } } return ans; } var cutIndex = arr.indexOf(mode); return arr.slice(0, cutIndex + 1); }; export { getMeaningColumn }; //# sourceMappingURL=shared.mjs.map