@peng_kai/kit 0.1.6 → 0.1.7

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 { dayjs } from '../../../../utils/date';
5
+ import { getDependencies } from '../../../../kitDependencies';
6
6
 
7
7
  export const paramTypes = { numberRange, datetimeRange, options };
8
8
 
@@ -23,7 +23,9 @@ function numberRange(range?: [number, number], unit?: string) {
23
23
  * @param range 时间范围
24
24
  * @param template 格式化模板(文档:https://dayjs.gitee.io/docs/zh-CN/display/format )
25
25
  */
26
- function datetimeRange(range?: [string | dayjs.Dayjs, string | dayjs.Dayjs], template = 'YYYY-MM-DD') {
26
+ function datetimeRange(range?: [any, any], template = 'YYYY-MM-DD') {
27
+ const { dayjs } = getDependencies();
28
+
27
29
  if (!range?.every(v => dayjs(v).isValid()))
28
30
  return '';
29
31
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@peng_kai/kit",
3
3
  "type": "module",
4
- "version": "0.1.6",
4
+ "version": "0.1.7",
5
5
  "description": "",
6
6
  "author": "",
7
7
  "license": "ISC",