mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
[improvement] extract padZero utils
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
import { use, range } from '../utils';
|
||||
import { use, range, padZero } from '../utils';
|
||||
import Picker from '../picker';
|
||||
import { pickerProps } from '../picker/shared';
|
||||
import {
|
||||
times,
|
||||
padZero,
|
||||
isValidDate,
|
||||
getTrueValue,
|
||||
getMonthEndDay
|
||||
|
@@ -2,10 +2,6 @@ export function isValidDate(date) {
|
||||
return Object.prototype.toString.call(date) === '[object Date]' && !isNaN(date.getTime());
|
||||
}
|
||||
|
||||
export function padZero(val) {
|
||||
return `00${val}`.slice(-2);
|
||||
}
|
||||
|
||||
export function times(n, iteratee) {
|
||||
let index = -1;
|
||||
const result = Array(n);
|
||||
|
Reference in New Issue
Block a user