mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
a6fc30c63f
fix click event name.
40 lines
845 B
JavaScript
40 lines
845 B
JavaScript
/**
|
|
* Component will register a event to target component's handler.
|
|
* And it will trigger the handler when a certain event occurs.
|
|
*
|
|
* @class Component.EventHandler
|
|
*/
|
|
cc.Component.EventHandler = cc.Class({
|
|
name: 'cc.ClickEvent',
|
|
properties: {
|
|
/**
|
|
* Event target
|
|
* @property target
|
|
* @type cc.Node
|
|
* @default null
|
|
*/
|
|
target: {
|
|
default: null,
|
|
type: cc.Node,
|
|
},
|
|
/**
|
|
* Component name
|
|
* @property component
|
|
* @type {String}
|
|
* @default ''
|
|
*/
|
|
component: {
|
|
default: '',
|
|
},
|
|
/**
|
|
* Event handler
|
|
* @property handler
|
|
* @type {String}
|
|
* @default ''
|
|
*/
|
|
handler: {
|
|
default: '',
|
|
}
|
|
}
|
|
});
|