import { BehaviorCatcher } from './common'; import { BehaviorCatcherConfig } from '../types'; export type HoverTargetConfig = BehaviorCatcherConfig; function noop() {} export class ClickTarget extends BehaviorCatcher { constructor(config: HoverTargetConfig) { super(config); // liteapp 事件代理,需要给元素自身添加空的事件监听 https://iwiki.woa.com/pages/viewpage.action?pageId=1292258354 this.el?.addEventListener('click', noop); } updateConfig() {} destroy() { this.el?.removeEventListener('click', noop); } }