zydx-plus 1.35.606 → 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.606",
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,7 +197,7 @@ 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
202
  // 监听滚动
202
203
  window.onscroll = () => {
@@ -224,9 +225,9 @@ export default {
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,22 +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]).style.zIndex = '9999'
278
- document.getElementById(pop[i]).classList.add('zIndex9999')
279
- // 获取所有具有指定class的元素并删除它们
280
- }
281
- if(document.getElementById(this.id)){
282
- // document.getElementById(this.id).style.zIndex = '10000'
283
- document.getElementById(this.id).classList.remove('zIndex9999')
284
- 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
285
284
  }
285
+ sessionStorage.setItem('pop', JSON.stringify(pop))
286
286
  },
287
287
  clean() {
288
288
  let pop = JSON.parse(sessionStorage.getItem('pop'))
289
289
  pop.forEach((x,i) => {
290
- if(x === this.id) {
290
+ if(x.id === this.id) {
291
291
  pop.splice(i, 1);
292
292
  }
293
293
  })
@@ -590,11 +590,8 @@ export default {
590
590
 
591
591
  .drag-pop {
592
592
  position: fixed;
593
- /* top: 0;
594
- left: 0; */
595
593
  background-color: #fff;
596
594
  border-radius: 3px;
597
- z-index: 9999;
598
595
  animation: linkDown .3s linear forwards;
599
596
  opacity: 0;
600
597
  }
@@ -634,6 +631,9 @@ export default {
634
631
  .zIndex10000{
635
632
  z-index: 10000;
636
633
  }
634
+ .zIndex10001{
635
+ z-index: 10001;
636
+ }
637
637
  .zIndexSlot{
638
638
  position: absolute;
639
639
  top: 0;
@@ -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.606',
90
+ version: '1.35.608',
91
91
  install,
92
92
  Calendar,
93
93
  Message,