tdesign-mobile-vue
Version:
tdesign-mobile-vue
39 lines (35 loc) • 1.11 kB
JavaScript
/**
* tdesign v1.9.3
* (c) 2025 TDesign Group
* @license MIT
*/
import { _ as _toConsumableArray } from '../_chunks/dep-fb4113ef.mjs';
import { _ as _slicedToArray } from '../_chunks/dep-26b97ced.mjs';
import { isArray } from 'lodash-es';
import '../_chunks/dep-a953013f.mjs';
var getMeaningColumn = function getMeaningColumn(mode) {
var arr = ["year", "month", "date", "hour", "minute", "second"];
if (isArray(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