@cc-component/cc-guide 1.0.5 → 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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cc-component/cc-guide",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "engine": ">=3.8.6",
5
5
  "description": "系统组件添加常用扩展方法",
6
6
  "main": "index.ts",