@cc-component/cc-guide 1.0.4 → 1.0.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.
@@ -190,13 +190,21 @@ export class GuideViewComp extends Component {
190
190
  });
191
191
 
192
192
  } else {
193
- button.clickEvents.forEach((e, index) => {
194
- if (button.interactable)
195
- e.emit([event]);
196
- if (index === 0) {
197
- this.onClick()
198
- }
199
- });
193
+ //@ts-ignore
194
+ const event = button.onClick;//自定义事件
195
+ if (event) {
196
+ event.dispatch()
197
+ this.onClick()
198
+ }
199
+ else {
200
+ button.clickEvents.forEach((e, index) => {
201
+ if (button.interactable)
202
+ e.emit([event]);
203
+ if (index === 0) {
204
+ this.onClick()
205
+ }
206
+ });
207
+ }
200
208
  }
201
209
  } else {
202
210
  const item = this.model.current
@@ -10,10 +10,11 @@ import { Toggle } from "cc";
10
10
  import { CCInteger, Component, _decorator } from "cc";
11
11
  import { Log } from "../../common/Log";
12
12
 
13
- const { ccclass, property } = _decorator;
13
+ const { ccclass, property, menu } = _decorator;
14
14
 
15
15
  /** 新手引导数据(绑定到引导节点上) */
16
16
  @ccclass('GuideViewItem')
17
+ @menu("引导组件/GuideViewItem")
17
18
  export class GuideViewItem extends Component {
18
19
  @property({
19
20
  type: [CCInteger],