import { BehaviorCatcherConfig } from '../../types'; import { getElementKey } from '../../utils'; export default abstract class BehaviorCatcher { el: EL; extInfo?: Record; key: string; constructor(config: BehaviorCatcherConfig) { this.el = config.el; this.extInfo = config.extInfo; this.key = getElementKey(config.el); } updateExtInfo(info?: Record) { this.extInfo = info; } /** 更新除 extInfo 以外的字段 */ abstract updateConfig(config: Record); abstract destroy(); }