/* tslint:disable */ /** * This file was automatically generated by json-schema-to-typescript. * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file, * and run json-schema-to-typescript to regenerate this file. */ export interface ScrollView { /** * 外部样式名。 */ class?: string; /** * 内联样式名。 */ style?: string; /** * 允许横向滚动。 */ "scroll-x"?: boolean; /** * 允许纵向滚动。 */ "scroll-y"?: boolean; /** * 距顶部/左边多远时(单位px),触发 scrolltoupper 事件。 */ "upper-threshold"?: number; /** * 距底部/右边多远时(单位px),触发 scrolltolower 事件。 */ "lower-threshold"?: number; /** * 设置竖向滚动条位置。 */ "scroll-top"?: number; /** * 设置横向滚动条位置。 */ "scroll-left"?: number; /** * 滚动到子元素,值应为某子元素的 id。当滚动到该元素时,元素顶部对齐滚动区域顶部。 * 说明:scroll-into-view 的优先级高于 scroll-top。 */ "scroll-into-view"?: string; /** * 在设置滚动条位置时使用动画过渡。 */ "scroll-with-animation"?: boolean; /** * 当 scroll-with-animation设置为 true 时,可以设置 scroll-animation-duration 来控制动画的执行时间,单位 ms。 */ "scroll-animation-duration"?: number; /** * 当点击 iOS 顶部状态栏或者双击 Android 标题栏时,滚动条返回顶部,只支持竖向。 */ "enable-back-to-top"?: boolean; /** * 纵向滚动时,当滚动到顶部或底部时,强制禁止触发页面滚动,仍然只触发 scroll-view 自身的滚动。 */ "trap-scroll"?: boolean; /** * 滚动到顶部/左边,会触发 scrolltoupper 事件。 */ onScrollToUpper?: () => void; /** * 滚动到底部/右边,会触发 scrolltolower事件。 */ onScrollToLower?: () => void; /** * 滚动时触发,event.detail = {scrollLeft, scrollTop, scrollHeight, scrollWidth}。 */ onScroll?: () => void; /** * 触摸动作开始。 */ onTouchStart?: () => void; /** * 触摸后移动。 */ onTouchMove?: () => void; /** * 触摸动作结束。 */ onTouchEnd?: () => void; /** * 触摸动作被打断,如来电提醒、弹窗。 */ onTouchCancel?: () => void; /** * 发生滚动前,对滚动方向进行判断,当方向是顶部/左边时,如果值为 always 将始终禁止滚动,如果值为 out-of-bounds 且当前已经滚动到顶部/左边,禁止滚动。 */ "disable-lower-scroll"?: string; /** * 发生滚动前,对滚动方向进行判断,当方向是底部/右边时,如果值为 always 将始终禁止滚动,如果值为 out-of-bounds 且当前已经滚动到底部/右边,禁止滚动。 */ "disable-upper-scroll"?: string; }