@leafer/watcher
Advanced tools
+5
-5
| { | ||
| "name": "@leafer/watcher", | ||
| "version": "1.6.2", | ||
| "version": "1.6.3", | ||
| "description": "@leafer/watcher", | ||
@@ -25,9 +25,9 @@ "author": "Chao (Leafer) Wan", | ||
| "dependencies": { | ||
| "@leafer/event": "1.6.2", | ||
| "@leafer/data": "1.6.2", | ||
| "@leafer/list": "1.6.2" | ||
| "@leafer/event": "1.6.3", | ||
| "@leafer/data": "1.6.3", | ||
| "@leafer/list": "1.6.3" | ||
| }, | ||
| "devDependencies": { | ||
| "@leafer/interface": "1.6.2" | ||
| "@leafer/interface": "1.6.3" | ||
| } | ||
| } |
+7
-10
@@ -91,14 +91,12 @@ import { ILeaf, IWatcher, IEventListenerId, ILeafList, IWatcherConfig } from '@leafer/interface' | ||
| this.totalTimes++ | ||
| this.changed = false | ||
| this.hasVisible = false | ||
| this.hasRemove = false | ||
| this.hasAdd = false | ||
| this.changed = this.hasVisible = this.hasRemove = this.hasAdd = false | ||
| } | ||
| protected __listenEvents(): void { | ||
| const { target } = this | ||
| this.__eventIds = [ | ||
| target.on_(PropertyEvent.CHANGE, this.__onAttrChange, this), | ||
| target.on_([ChildEvent.ADD, ChildEvent.REMOVE], this.__onChildEvent, this), | ||
| target.on_(WatchEvent.REQUEST, this.__onRquestData, this) | ||
| this.target.on_([ | ||
| [PropertyEvent.CHANGE, this.__onAttrChange, this], | ||
| [[ChildEvent.ADD, ChildEvent.REMOVE], this.__onChildEvent, this], | ||
| [WatchEvent.REQUEST, this.__onRquestData, this] | ||
| ]) | ||
| ] | ||
@@ -115,4 +113,3 @@ } | ||
| this.__removeListenEvents() | ||
| this.target = null | ||
| this.__updatedList = null | ||
| this.target = this.__updatedList = null | ||
| } | ||
@@ -119,0 +116,0 @@ } |
6283
-1.01%124
-2.36%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated