im-ui-mobile 0.0.26 → 0.0.27

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "im-ui-mobile",
3
- "version": "0.0.26",
3
+ "version": "0.0.27",
4
4
  "description": "A Vue3.0 + typescript instant messaging component library for Uniapp",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/types/index.d.ts CHANGED
@@ -2,38 +2,5 @@
2
2
  declare module 'im-ui-mobile' {
3
3
  export function install(): void
4
4
 
5
- /**
6
- * 日期时间工具模块
7
- */
8
- export const datetime: {
9
- /**
10
- * 将时间戳转换为相对时间文本
11
- */
12
- toTimeText: (timeStamp: number | string | Date, simple?: boolean) => string;
13
-
14
- /**
15
- * 判断日期是否是昨天
16
- */
17
- isYesterday: (date: Date) => boolean;
18
-
19
- /**
20
- * 判断日期是否在今年
21
- */
22
- isYear: (date: Date) => boolean;
23
-
24
- /**
25
- * 格式化日期时间为字符串
26
- */
27
- formatDateTime: (date: string | Date) => string;
28
-
29
- /**
30
- * 获取更精确的相对时间描述
31
- */
32
- toPreciseTimeText: (timeStamp: number | string | Date) => string;
33
-
34
- /**
35
- * 获取聊天界面常用的时间显示格式
36
- */
37
- toChatTimeText: (timeStamp: number | string | Date) => string;
38
- };
5
+ export * from './utils/datetime'
39
6
  }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * 日期时间工具模块
3
+ */
4
+ declare const datetime: {
5
+ /**
6
+ * 将时间戳转换为相对时间文本
7
+ */
8
+ toTimeText: (timeStamp: number | string | Date, simple?: boolean) => string;
9
+
10
+ /**
11
+ * 判断日期是否是昨天
12
+ */
13
+ isYesterday: (date: Date) => boolean;
14
+
15
+ /**
16
+ * 判断日期是否在今年
17
+ */
18
+ isYear: (date: Date) => boolean;
19
+
20
+ /**
21
+ * 格式化日期时间为字符串
22
+ */
23
+ formatDateTime: (date: string | Date) => string;
24
+
25
+ /**
26
+ * 获取更精确的相对时间描述
27
+ */
28
+ toPreciseTimeText: (timeStamp: number | string | Date) => string;
29
+
30
+ /**
31
+ * 获取聊天界面常用的时间显示格式
32
+ */
33
+ toChatTimeText: (timeStamp: number | string | Date) => string;
34
+ };
35
+
36
+ export default datetime;