beforeScrollStart 这个事件是不是从头到尾没有用到过?
来源:8-3 -基础类-代理模式 MScroll 类和 Options 配置处理类
秋得法
2024-02-26
import { EventEmitter } from './shared-utils/event'
import Scroller from './scroller/Scroller'
import { OptionsConstructor, type Options } from './Options'
import { ease } from './shared-utils/ease'
export class MScrollConstructor extends EventEmitter {
content!: HTMLElement
options!: OptionsConstructor
scroller!: Scroller
constructor(el: HTMLElement, options?: Options) {
super(['beforeScrollStart', 'scrollStart', 'scroll', 'scrollEnd'])
我自己看到吗没有看到则这个事件的注册和使用,我看的对吗?beforeScrollStart 这个事件是不是从头到尾没有用到过?
写回答
1回答
-
同学你好,确实是没用,但只是我们现在这个场景没用,作为通用组件,我们还是要把可能用到的参数加上去的,当然对于本次课程的项目,你删掉也没关系
00
相似问题