You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export enum _cocos_ui_scroll_view__EventType {
/**
* @en
* The event emitted when ScrollView scroll to the top boundary of inner container.
*
* @zh
* 滚动视图滚动到顶部边界事件。
*/
SCROLL_TO_TOP = "scroll-to-top",
/**
* @en
* The event emitted when ScrollView scroll to the bottom boundary of inner container.
*
* @zh
* 滚动视图滚动到底部边界事件。
*/
SCROLL_TO_BOTTOM = "scroll-to-bottom",
/**
* @en
* The event emitted when ScrollView scroll to the left boundary of inner container.
*
* @zh
* 滚动视图滚动到左边界事件。
*/
SCROLL_TO_LEFT = "scroll-to-left",
/**
* @en
* The event emitted when ScrollView scroll to the right boundary of inner container.
*
* @zh
* 滚动视图滚动到右边界事件。
*/
SCROLL_TO_RIGHT = "scroll-to-right",
/**
* @en
* The event emitted when ScrollView scroll began.
*
* @zh
* 滚动视图滚动开始时发出的事件。
*/
SCROLL_BEGAN = "scroll-began",
/**
* @en
* The event emitted when ScrollView auto scroll ended.
*
* @zh
* 滚动视图滚动结束的时候发出的事件。
*/
SCROLL_ENDED = "scroll-ended",
/**
* @en
* The event emitted when ScrollView scroll to the top boundary of inner container and start bounce.
*
* @zh
* 滚动视图滚动到顶部边界并且开始回弹时发出的事件。
*/
BOUNCE_TOP = "bounce-top",
/**
* @en
* The event emitted when ScrollView scroll to the bottom boundary of inner container and start bounce.
*
* @zh
* 滚动视图滚动到底部边界并且开始回弹时发出的事件。
*/
BOUNCE_BOTTOM = "bounce-bottom",
/**
* @en
* The event emitted when ScrollView scroll to the left boundary of inner container and start bounce.
*
* @zh
* 滚动视图滚动到左边界并且开始回弹时发出的事件。
*/
BOUNCE_LEFT = "bounce-left",
/**
* @en
* The event emitted when ScrollView scroll to the right boundary of inner container and start bounce.
*
* @zh
* 滚动视图滚动到右边界并且开始回弹时发出的事件。
*/
BOUNCE_RIGHT = "bounce-right",
/**
* @en
* The event emitted when ScrollView is scrolling.
*
* @zh
* 滚动视图正在滚动时发出的事件。
*/
SCROLLING = "scrolling",
/**
* @en
* The event emitted when ScrollView auto scroll ended with a threshold.
*
* @zh
* 滚动视图自动滚动快要结束的时候发出的事件。
*/
SCROLL_ENG_WITH_THRESHOLD = "scroll-ended-with-threshold",
/**
* @en
* The event emitted when user release the touch.
*
* @zh
* 当用户松手的时候会发出一个事件。
*/
TOUCH_UP = "touch-up"
}
The text was updated successfully, but these errors were encountered:
URL : https://github.com/cocos-creator/creator-docs/blob/master/zh/ui-system/components/editor/scrollview.md
问题:ScrollView 滚动事件回调接收到的是数字,然而EventType里没有数字的,只有字符串的。
下面是查到的出问题的原代码:
// 发送的 eventMap[event] 是数字
// cc.d.ts 里 ScrollView 对应的 EventType enum 都是字符串的,没有数字的,所以匹配不上。
The text was updated successfully, but these errors were encountered: