zydx-plus 1.35.607 → 1.35.608

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": "zydx-plus",
3
- "version": "1.35.607",
3
+ "version": "1.35.608",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -62,7 +62,8 @@ export default {
62
62
  fixedStart: false,
63
63
  initWidth: 1280,
64
64
  draggableState: null,
65
- draggableMove: false
65
+ draggableMove: false,
66
+ zIndex: 10000
66
67
  }
67
68
  },
68
69
  props: {
@@ -196,9 +197,8 @@ export default {
196
197
  let popArr = []
197
198
  const pop = sessionStorage.getItem('pop')
198
199
  popArr = (pop === null)? [] : JSON.parse(pop)
199
- popArr.push(this.id)
200
+ popArr.push({id: this.id, zIndex: 10000})
200
201
  sessionStorage.setItem('pop', JSON.stringify(popArr))
201
- document.getElementById(this.id).classList.add('zIndex10001')
202
202
  // 监听滚动
203
203
  window.onscroll = () => {
204
204
  const scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
@@ -220,13 +220,14 @@ export default {
220
220
  document.onmouseup = () => {
221
221
  this.isMove = false;
222
222
  }
223
+ this.dragTap()
223
224
  },
224
225
  computed: {
225
226
  position() {
226
227
  if(this.autoHeight) {
227
- return `top:${this.y}px;left:${this.x}px;width:${this.footRightOffset}px;min-height:${this.footDownOffset}px;`;
228
+ return `top:${this.y}px;left:${this.x}px;width:${this.footRightOffset}px;min-height:${this.footDownOffset}px;z-index:${this.zIndex}`;
228
229
  } else {
229
- return `top:${this.y}px;left:${this.x}px;width:${this.footRightOffset}px;height:${this.footDownOffset}px;`;
230
+ return `top:${this.y}px;left:${this.x}px;width:${this.footRightOffset}px;height:${this.footDownOffset}px;z-index:${this.zIndex}`;
230
231
  }
231
232
  },
232
233
  },
@@ -272,21 +273,21 @@ export default {
272
273
  dragTap() {
273
274
  let pop = JSON.parse(sessionStorage.getItem('pop'))
274
275
  for(let i = 0; i< pop.length; i++) {
275
- if(document.getElementById(pop[i]) === null) continue
276
- document.getElementById(pop[i]).classList.remove('zIndex10000')
277
- document.getElementById(pop[i]).classList.remove('zIndex10001')
278
- document.getElementById(pop[i]).classList.add('zIndex9999')
279
- // 获取所有具有指定class的元素并删除它们
280
- }
281
- if(document.getElementById(this.id)){
282
- document.getElementById(this.id).classList.remove('zIndex9999')
283
- document.getElementById(this.id).classList.add('zIndex10000')
276
+ if(!document.getElementById(pop[i].id)) continue
277
+ if(pop[i].id === this.id) {
278
+ pop[i].zIndex = 10000
279
+ this.zIndex = pop[i].zIndex
280
+ }else {
281
+ pop[i].zIndex = 9999
282
+ }
283
+ document.getElementById(pop[i].id).style.zIndex = pop[i].zIndex
284
284
  }
285
+ sessionStorage.setItem('pop', JSON.stringify(pop))
285
286
  },
286
287
  clean() {
287
288
  let pop = JSON.parse(sessionStorage.getItem('pop'))
288
289
  pop.forEach((x,i) => {
289
- if(x === this.id) {
290
+ if(x.id === this.id) {
290
291
  pop.splice(i, 1);
291
292
  }
292
293
  })
@@ -589,11 +590,8 @@ export default {
589
590
 
590
591
  .drag-pop {
591
592
  position: fixed;
592
- /* top: 0;
593
- left: 0; */
594
593
  background-color: #fff;
595
594
  border-radius: 3px;
596
- z-index: 9999;
597
595
  animation: linkDown .3s linear forwards;
598
596
  opacity: 0;
599
597
  }
@@ -59,7 +59,8 @@ export default {
59
59
  fixedStart: false,
60
60
  initWidth: 1280,
61
61
  draggableState: null,
62
- draggableMove: false
62
+ draggableMove: false,
63
+ zIndex: 10000
63
64
  }
64
65
  },
65
66
  props: {
@@ -141,10 +142,6 @@ export default {
141
142
  type: Boolean,
142
143
  default: false
143
144
  },
144
- zIndex: {
145
- type: Number,
146
- default: 0
147
- },
148
145
  share: {
149
146
  type: Boolean,
150
147
  default: false
@@ -199,7 +196,7 @@ export default {
199
196
  let popArr = []
200
197
  const pop = sessionStorage.getItem('pop')
201
198
  popArr = (pop === null)? [] : JSON.parse(pop)
202
- popArr.push(this.id)
199
+ popArr.push({id: this.id, zIndex: 10000})
203
200
  sessionStorage.setItem('pop', JSON.stringify(popArr))
204
201
  // 监听滚动
205
202
  window.onscroll = () => {
@@ -220,9 +217,7 @@ export default {
220
217
  this.footRightOffset = wid
221
218
  }
222
219
  });
223
- setTimeout(() => {
224
- document.getElementById(this.id).classList.add('zIndex10000')
225
- },0)
220
+ this.dragTap()
226
221
  },
227
222
  computed: {
228
223
  position() {
@@ -281,20 +276,18 @@ export default {
281
276
  this.state = false
282
277
  },
283
278
  dragTap() {
284
- if(this.zIndex > 0) return
285
279
  let pop = JSON.parse(sessionStorage.getItem('pop'))
286
280
  for(let i = 0; i< pop.length; i++) {
287
- if(document.getElementById(pop[i]) === null) continue
288
- document.getElementById(pop[i]).classList.remove('zIndex10000')
289
- // document.getElementById(pop[i]).style.zIndex = '9999'
290
- document.getElementById(pop[i]).classList.add('zIndex9999')
291
- // 获取所有具有指定class的元素并删除它们
292
- }
293
- if(document.getElementById(this.id)){
294
- // document.getElementById(this.id).style.zIndex = '10000'
295
- document.getElementById(this.id).classList.remove('zIndex9999')
296
- document.getElementById(this.id).classList.add('zIndex10000')
281
+ if(!document.getElementById(pop[i].id)) continue
282
+ if(pop[i].id === this.id) {
283
+ pop[i].zIndex = 10000
284
+ this.zIndex = pop[i].zIndex
285
+ }else {
286
+ pop[i].zIndex = 9999
287
+ }
288
+ document.getElementById(pop[i].id).style.zIndex = pop[i].zIndex
297
289
  }
290
+ sessionStorage.setItem('pop', JSON.stringify(pop))
298
291
  },
299
292
  clean() {
300
293
  let pop = JSON.parse(sessionStorage.getItem('pop'))
package/src/index.js CHANGED
@@ -87,7 +87,7 @@ function install(app) {
87
87
  }
88
88
 
89
89
  export default {
90
- version: '1.35.607',
90
+ version: '1.35.608',
91
91
  install,
92
92
  Calendar,
93
93
  Message,