@hlw-uni/mp-vue 2.3.3 → 2.3.5

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.
@@ -0,0 +1,10 @@
1
+ export interface HlwRewardAdResult {
2
+ /** 是否播放成功 */
3
+ success: boolean;
4
+ /** 广告是否完整播放结束 */
5
+ isEnded: boolean;
6
+ /** 广告加载是否失败 */
7
+ loadFailed?: boolean;
8
+ /** 加载/播放失败时的错误对象 */
9
+ err?: any;
10
+ }
package/dist/index.d.ts CHANGED
@@ -11,6 +11,7 @@ export * from './core';
11
11
  export * from './utils';
12
12
  export type { HlwMenuItem } from './components/hlw-menu/types';
13
13
  export type { HlwPagingRef, HlwPagingInstance } from './components/hlw-paging/types';
14
+ export type { HlwRewardAdResult } from './components/hlw-reward-ad/types';
14
15
  export { useApp } from './app';
15
16
  export { hlw, type HlwInstance } from './hlw';
16
17
  export { vCopy } from './directives';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hlw-uni/mp-vue",
3
- "version": "2.3.3",
3
+ "version": "2.3.5",
4
4
  "description": "hlw-uni工具集",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -5,6 +5,7 @@
5
5
  <script setup lang="ts">
6
6
  import { ref, onUnmounted } from "vue";
7
7
  import { setRewardAd, showRewardAd, confirmRewardAd, destroyRewardAd } from "../../utils/ad";
8
+ import type { HlwRewardAdResult } from "./types";
8
9
 
9
10
  defineOptions({ name: "HlwRewardAd" });
10
11
 
@@ -16,7 +17,7 @@ interface Props {
16
17
  const props = defineProps<Props>();
17
18
 
18
19
  const emit = defineEmits<{
19
- (e: "onHandle", res: { success: boolean; isEnded: boolean; loadFailed?: boolean; err?: any }): void;
20
+ (e: "onHandle", res: HlwRewardAdResult): void;
20
21
  }>();
21
22
 
22
23
  // 点击锁定状态,防止连续多次点击重复触发广告
@@ -0,0 +1,10 @@
1
+ export interface HlwRewardAdResult {
2
+ /** 是否播放成功 */
3
+ success: boolean;
4
+ /** 广告是否完整播放结束 */
5
+ isEnded: boolean;
6
+ /** 广告加载是否失败 */
7
+ loadFailed?: boolean;
8
+ /** 加载/播放失败时的错误对象 */
9
+ err?: any;
10
+ }
package/src/index.ts CHANGED
@@ -15,6 +15,7 @@ export * from "./utils";
15
15
  // 类型
16
16
  export type { HlwMenuItem } from "./components/hlw-menu/types";
17
17
  export type { HlwPagingRef, HlwPagingInstance } from "./components/hlw-paging/types";
18
+ export type { HlwRewardAdResult } from "./components/hlw-reward-ad/types";
18
19
 
19
20
  // App 根上下文
20
21
  export { useApp } from "./app";