@hlw-uni-mp/use 1.1.1 → 1.1.2
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/dist/index.d.mts +0 -5
- package/dist/index.d.ts +0 -5
- package/dist/index.js +5 -7
- package/dist/index.mjs +5 -7
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -12,12 +12,10 @@ interface ToastRes {
|
|
|
12
12
|
/** 模态弹窗配置 */
|
|
13
13
|
modalOptions?: UniApp.ShowModalOptions;
|
|
14
14
|
}
|
|
15
|
-
|
|
16
15
|
/**
|
|
17
16
|
* 提示回调函数类型 (confirm 为 true 表示确定,false 为取消)
|
|
18
17
|
*/
|
|
19
18
|
type ToastCallback = (confirm: boolean) => void;
|
|
20
|
-
|
|
21
19
|
/**
|
|
22
20
|
* 消息门面体
|
|
23
21
|
*/
|
|
@@ -37,7 +35,6 @@ interface HlwMsg {
|
|
|
37
35
|
/** 标题进度条 */
|
|
38
36
|
setLoadingBar(progress: number): void;
|
|
39
37
|
}
|
|
40
|
-
|
|
41
38
|
/**
|
|
42
39
|
* 统一的消息提示与弹窗能力 hook。
|
|
43
40
|
*
|
|
@@ -206,7 +203,6 @@ interface ShareConfig {
|
|
|
206
203
|
/** 分享卡片封面图 */
|
|
207
204
|
imageUrl?: string;
|
|
208
205
|
}
|
|
209
|
-
|
|
210
206
|
/**
|
|
211
207
|
* 分享操作句柄
|
|
212
208
|
*/
|
|
@@ -214,7 +210,6 @@ interface ShareHandlers {
|
|
|
214
210
|
/** 显式调起分享菜单 */
|
|
215
211
|
showShareMenu: () => void;
|
|
216
212
|
}
|
|
217
|
-
|
|
218
213
|
/**
|
|
219
214
|
* 显式调起分享菜单
|
|
220
215
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -12,12 +12,10 @@ interface ToastRes {
|
|
|
12
12
|
/** 模态弹窗配置 */
|
|
13
13
|
modalOptions?: UniApp.ShowModalOptions;
|
|
14
14
|
}
|
|
15
|
-
|
|
16
15
|
/**
|
|
17
16
|
* 提示回调函数类型 (confirm 为 true 表示确定,false 为取消)
|
|
18
17
|
*/
|
|
19
18
|
type ToastCallback = (confirm: boolean) => void;
|
|
20
|
-
|
|
21
19
|
/**
|
|
22
20
|
* 消息门面体
|
|
23
21
|
*/
|
|
@@ -37,7 +35,6 @@ interface HlwMsg {
|
|
|
37
35
|
/** 标题进度条 */
|
|
38
36
|
setLoadingBar(progress: number): void;
|
|
39
37
|
}
|
|
40
|
-
|
|
41
38
|
/**
|
|
42
39
|
* 统一的消息提示与弹窗能力 hook。
|
|
43
40
|
*
|
|
@@ -206,7 +203,6 @@ interface ShareConfig {
|
|
|
206
203
|
/** 分享卡片封面图 */
|
|
207
204
|
imageUrl?: string;
|
|
208
205
|
}
|
|
209
|
-
|
|
210
206
|
/**
|
|
211
207
|
* 分享操作句柄
|
|
212
208
|
*/
|
|
@@ -214,7 +210,6 @@ interface ShareHandlers {
|
|
|
214
210
|
/** 显式调起分享菜单 */
|
|
215
211
|
showShareMenu: () => void;
|
|
216
212
|
}
|
|
217
|
-
|
|
218
213
|
/**
|
|
219
214
|
* 显式调起分享菜单
|
|
220
215
|
*/
|
package/dist/index.js
CHANGED
|
@@ -318,13 +318,11 @@ function showShareMenu() {
|
|
|
318
318
|
function useShare(config = {}) {
|
|
319
319
|
showShareMenu();
|
|
320
320
|
(0, import_uni_app.onShareAppMessage)(() => ({ ...config }));
|
|
321
|
-
(0, import_uni_app.onShareTimeline)(() => {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
};
|
|
327
|
-
});
|
|
321
|
+
(0, import_uni_app.onShareTimeline)(() => ({
|
|
322
|
+
title: config.title,
|
|
323
|
+
query: config.path?.split("?")[1],
|
|
324
|
+
imageUrl: config.imageUrl
|
|
325
|
+
}));
|
|
328
326
|
return {
|
|
329
327
|
showShareMenu
|
|
330
328
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -279,13 +279,11 @@ function showShareMenu() {
|
|
|
279
279
|
function useShare(config = {}) {
|
|
280
280
|
showShareMenu();
|
|
281
281
|
onShareAppMessage(() => ({ ...config }));
|
|
282
|
-
onShareTimeline(() => {
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
};
|
|
288
|
-
});
|
|
282
|
+
onShareTimeline(() => ({
|
|
283
|
+
title: config.title,
|
|
284
|
+
query: config.path?.split("?")[1],
|
|
285
|
+
imageUrl: config.imageUrl
|
|
286
|
+
}));
|
|
289
287
|
return {
|
|
290
288
|
showShareMenu
|
|
291
289
|
};
|