zydx-plus 1.35.607 → 1.35.609

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.609",
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'))
@@ -8,6 +8,7 @@
8
8
  :placeholder="placeholder"
9
9
  :readonly="true"
10
10
  @click.stop="toggleDropDown"
11
+ :class="{'select-css-focus': isOpen}"
11
12
  class="select-css" />
12
13
 
13
14
  <span class="custom-select-icons" v-if="!readonly" @click.stop="toggleDropDown">
@@ -25,13 +26,19 @@
25
26
  <template v-if="!readonly">
26
27
  <template v-if="options.length">
27
28
  <ul v-if="isOpen"
29
+ @mouseleave="mouseleave"
28
30
  class="custom-select-options scroll"
29
31
  ref="dropdown"
30
32
  :style="{position: 'fixed', 'z-index': '30000', left: x + 'px', top: y + 'px', width: width + 'px', maxHeight: height + 'px'}">
31
33
  <li v-for="(option, idx) in options"
32
34
  :key="idx"
33
35
  :class="option.disable ? 'disable': ''"
34
- @click.stop="handleClick(option)">{{ option.label }}</li>
36
+ @click.stop="handleClick(option)">
37
+ <div class="countersign-image" v-if="multiple">
38
+ <img v-if="option.active" :src="countersign" alt=""/>
39
+ </div>
40
+ <span>{{ option.label }}</span>
41
+ </li>
35
42
  </ul>
36
43
  </template>
37
44
  </template>
@@ -59,6 +66,10 @@ export default defineComponent({
59
66
  type: String,
60
67
  default: ''
61
68
  },
69
+ multiple: {
70
+ type: Boolean,
71
+ default: false
72
+ },
62
73
  placeholder: {
63
74
  type: String,
64
75
  default: ''
@@ -87,11 +98,16 @@ export default defineComponent({
87
98
  x: 0,
88
99
  y: 0,
89
100
  width: 0,
90
- height: 300
101
+ height: 300,
102
+ countersign: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAAAXNSR0IArs4c6QAACQ9JREFUeF7tnX1SGzkQRzXevUfITZyTZEhtUtxi4RYspMzcBG6yzkFiL1/ZfIEttbo1mu6X/1KWWur361eDwQVD4h8EIPAqgQE2EIDA6wQQhOmAwAECCMJ4QABBmAEIyAjwBJFxY1cQAggSJGjalBFAEBk3dgUhgCBBgqZNGQEEkXFjVxACCBIkaNqUEUAQGTd2BSGAIEGCpk0ZAQSRcWNXEAIIEiRo2pQRQBAZN3YFIYAgQYKmTRkBBJFxY1cQAggSJGjalBFAEBk3dgUhgCBBgqZNGQEEkXFjVxACCBIkaNqUEUAQGTd2BSGAIEGCpk0ZAQSRcWNXEAIIEiRo2pQRQBAZN3YFIYAgQYKmTRkBBJFxY1cQAggSJGjalBFA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NMaEHUJUGONlPb8JTwgqhJghwNx7bdUQjyzHocz07Sancr+kg7crSb2MYnIcgPwEWSIEfjkW17HIL8wvtRkuHrTRqGdUYU59Pm6iJjHUsWSgBBXgju+Uny/v6l81dy3abV6nT6fHm30Ny5diYBBDkA6lGUP9NJ2n09SWl4k9L+y7S5njLZsswBAQRxECIt2BFAEDu2VHZAAEEchEgLdgQQxI4tlR0QQBAHIdKCHQEEsWNLZQcEEMRBiLRgRwBB7NhS2QEBBHEQIi3YEUAQO7ZUdkAAQRyESAt2BBDEji2VHRBAEAch0oIdAQSxY0tlBwQQxEGItGBHAEHs2FLZAQEEcRAiLdgRQBA7tlR2QABBHIRIC3YEEMSOLZUdEEAQByHSgh0BBLFjS2UHBBDEQYi0YEcAQezYUtkBAQRxECIt2BFAEDu2VHZAAEEchEgLdgQQxI4tlR0QQBAHIdKCHQEEsWNLZQcEEMRBiLRgRwBB7NhS2QEBBHEQIi3YEUAQO7ZUdkAAQRyESAt2BBDEji2VHRBAEAch0oIdAQSxY0tlBwQQxEGItGBH4D+fO44FzoWiMAAAAABJRU5ErkJggg=='
91
103
  }
92
104
  },
93
105
  emits: ['update:value', 'select'],
94
106
  methods: {
107
+ mouseleave() {
108
+ this.isOpen = false
109
+ window.removeEventListener('scroll', this.handler)
110
+ },
95
111
  toggleDropDown: function () {
96
112
  const winHeight = window.innerHeight
97
113
  const { x, y, width, height } = this.$refs.selectRef.getBoundingClientRect()
@@ -108,10 +124,19 @@ export default defineComponent({
108
124
  },
109
125
  handleClick: function (option) {
110
126
  if(option.disable) return
111
- this.$emit('update:value', option.value)
112
- this.$emit('select', option)
113
- this.selected = option.label
114
- this.isOpen = false
127
+ if(this.multiple) {
128
+ option.active = !option.active
129
+ let value = ''
130
+ this.options.forEach(x => {
131
+ if(x.active) value += `${x.value},`
132
+ })
133
+ this.$emit('update:value', value.slice(0, -1))
134
+ this.$emit('select', option)
135
+ }else {
136
+ this.$emit('update:value', option.value)
137
+ this.$emit('select', option)
138
+ this.isOpen = false
139
+ }
115
140
  },
116
141
  handler: function () {
117
142
  if (this.isOpen) {
@@ -136,8 +161,17 @@ export default defineComponent({
136
161
  this.selected = ''
137
162
  return
138
163
  }
139
- const { label } = this.options.find(option => option.value === v) || { label: '' }
140
- this.selected = label
164
+ const data = this.multiple? v.split(',') : v.split(',')[0]
165
+ let label = ''
166
+ this.options.forEach(x => {
167
+ if(data.includes(x.value)) {
168
+ x.active = true
169
+ label += `${x.label}、`
170
+ }else {
171
+ x.active = false
172
+ }
173
+ })
174
+ this.selected = label.slice(0, -1)
141
175
  },
142
176
  immediate: true,
143
177
  deep: true
@@ -169,6 +203,19 @@ export default defineComponent({
169
203
  margin-bottom: 1em;
170
204
  }
171
205
 
206
+ .countersign-image{
207
+ width: 14px;
208
+ height: 14px;
209
+ margin-right: 5px;
210
+ position: relative;
211
+ top: 2px;
212
+ display: inline-block;
213
+ }
214
+ .countersign-image>img{
215
+ width: 100%;
216
+ height: 100%;
217
+ }
218
+
172
219
  .custom-select {
173
220
  position: relative;
174
221
  }
@@ -213,7 +260,7 @@ export default defineComponent({
213
260
  border-color: #888;
214
261
  }
215
262
 
216
- .select-css:focus {
263
+ .select-css-focus {
217
264
  border-color: v-bind(hover);
218
265
  }
219
266
 
@@ -1,7 +1,8 @@
1
1
  <template>
2
2
  <div class="tagging" @click="leftClick">
3
3
  <div id="htmlText"></div>
4
- <div class="link" v-for="item in linkData"
4
+ <div class="link" v-for="(item,index) in linkData"
5
+ :key="index"
5
6
  :style="{width: item.width + 'px',
6
7
  top: item.leftY + 'px',
7
8
  left: item.leftX + 'px',
@@ -30,7 +31,7 @@
30
31
  <div class="tagging-right">
31
32
  <div class="tagging-title">批注指导</div>
32
33
  <div class="annotation" ref="scrollBox">
33
- <div class="annotation-list" @click="guidance(item.id,index)" :id="item.id" v-for="(item, index) in annotationsArr">
34
+ <div class="annotation-list" @click="guidance(item.id,index)" :id="item.id" v-for="(item, index) in annotationsArr" :key="index">
34
35
  <div class="list-title">
35
36
  <div class="list-left">
36
37
  <span>{{ teacher }}</span>
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.609',
91
91
  install,
92
92
  Calendar,
93
93
  Message,