@peng_kai/kit 0.2.0-beta.4 → 0.2.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import isNil from 'lodash-es/isNil';
|
|
3
3
|
import isFinite from 'lodash-es/isFinite';
|
|
4
4
|
import bignumber from 'bignumber.js';
|
|
5
|
-
import
|
|
5
|
+
import dayjs from '../../../../libs/dayjs';
|
|
6
6
|
|
|
7
7
|
export const paramTypes = { numberRange, datetimeRange, options };
|
|
8
8
|
|
package/libs/dayjs.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import dayjs from 'dayjs';
|
|
2
|
+
import relativeTime from 'dayjs/plugin/relativeTime';
|
|
3
|
+
import 'dayjs/locale/zh';
|
|
4
|
+
import 'dayjs/locale/en';
|
|
2
5
|
|
|
3
6
|
export { isDayjs, unix, locale, extend } from 'dayjs';
|
|
4
7
|
export type { Dayjs, PluginFunc, UnitType, UnitTypeLong, UnitTypeLongPlural, UnitTypeShort, QUnitType, ConfigType, ConfigTypeMap, OpUnitType, OptionType, ManipulateType } from 'dayjs';
|
|
5
8
|
export default dayjs;
|
|
9
|
+
|
|
10
|
+
dayjs.locale('zh');
|
|
11
|
+
dayjs.extend(relativeTime);
|
package/package.json
CHANGED
package/utils/date.ts
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
import dayjs from 'dayjs';
|
|
2
|
-
import * as relativeTime from 'dayjs/plugin/relativeTime';
|
|
3
|
-
import 'dayjs/locale/zh';
|
|
4
|
-
import 'dayjs/locale/en';
|
|
5
|
-
|
|
6
|
-
export { default as dayjs } from 'dayjs';
|
|
7
|
-
|
|
8
|
-
dayjs.locale('zh');
|
|
9
|
-
dayjs.extend(relativeTime.default);
|
|
1
|
+
import dayjs from '../libs/dayjs';
|
|
10
2
|
|
|
11
3
|
/**
|
|
12
4
|
* 返回给定日期的一天的开始时间。
|