UNPKG

zent

Version:

一套前端设计语言和基于React的实现

16 lines (15 loc) 509 B
import { formatDateRange } from './index'; export function getRangeValuesWithValueType(valueType, format, value) { var _a, _b; switch (valueType) { case 'string': { return formatDateRange(value, format); } case 'number': { return [((_a = value[0]) === null || _a === void 0 ? void 0 : _a.getTime()) || 0, ((_b = value[1]) === null || _b === void 0 ? void 0 : _b.getTime()) || 0]; } default: { return value; } } }