address-book-shell 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "address-book-shell",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "private": false,
5
5
  "author": "侯大建",
6
6
  "main": "lib/address-book-shell.umd.js",
@@ -270,6 +270,7 @@ export default {
270
270
  },
271
271
 
272
272
  myFriengInput: '',
273
+ loadingTimer: null,
273
274
  }
274
275
  },
275
276
 
@@ -706,6 +707,7 @@ export default {
706
707
  this.table.tableDataList = [...this.robotList]
707
708
  },
708
709
  async asideChange(data) {
710
+ if (this.table.loading) return
709
711
  if (!data) {
710
712
  this.table.tableDataList = []
711
713
  this.emptySelect()
@@ -867,6 +869,23 @@ export default {
867
869
  handlename() {
868
870
  this.queryData()
869
871
  },
872
+ 'table.loading'(newVal, oldVal) {
873
+ if (newVal) {
874
+ if (this.loadingTimer) {
875
+ clearTimeout(this.loadingTimer)
876
+ this.loadingTimer = null
877
+ }
878
+ this.loadingTimer = setTimeout(() => {
879
+ if (newVal) {
880
+ console.log('强行关闭')
881
+ this.table.loading = false
882
+ }
883
+ }, 4000)
884
+ } else {
885
+ clearTimeout(this.loadingTimer)
886
+ this.loadingTimer = null
887
+ }
888
+ },
870
889
  },
871
890
  destroyed() {
872
891
  this.table.tableDom.removeEventListener('scroll', this.tableScroll)