zydx-plus 1.32.213 → 1.32.214

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.32.213",
3
+ "version": "1.32.214",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -33,7 +33,7 @@
33
33
  <div class="annotation-list" @click="guidance(item.id,index)" :id="item.id" v-for="(item, index) in annotationsArr">
34
34
  <div class="list-title">
35
35
  <div class="list-left">
36
- <span>刘秀芮老师</span>
36
+ <span>{{ teacher }}</span>
37
37
  <em>{{ item.time === '' ? '' : '(' + item.time + ')' }}</em>
38
38
  </div>
39
39
  <div class="list-right">
@@ -91,6 +91,10 @@ export default {
91
91
  html: '',
92
92
  annotations: []
93
93
  }
94
+ },
95
+ teacher: {
96
+ type: String,
97
+ default: ''
94
98
  }
95
99
  },
96
100
  watch: {
@@ -108,6 +112,7 @@ export default {
108
112
  immediate: true
109
113
  }
110
114
  },
115
+ emits: ["del","preservation"],
111
116
  methods: {
112
117
  last() {
113
118
  if (this.page <= 0) return
@@ -214,11 +219,17 @@ export default {
214
219
  },
215
220
  // 保存批注
216
221
  preservation(id,index) {
222
+ let html = ''
217
223
  const text = this.$refs[`${id}ref`][0].getContent()
218
224
  this.annotationsArr[index].readable = false
219
225
  this.annotationsArr[index].more = true
220
226
  this.annotationsArr[index].text = text
221
227
  this.linkFor()
228
+ this.htmlArr.forEach(item => html += item)
229
+ this.$emit('preservation', {
230
+ html: html2json(html),
231
+ annotations: this.annotationsData
232
+ })
222
233
  },
223
234
  // 取消批注
224
235
  cancel(id,index) {
@@ -233,6 +244,7 @@ export default {
233
244
  // 删除批注
234
245
  del(id,index) {
235
246
  // 删除数组
247
+ let html = ''
236
248
  const className2 = document.getElementsByClassName(`${id}s`)
237
249
  this.annotationsArr.splice(index,1) // 删除批注
238
250
  this.annotationsData.forEach((item,index2) => {
@@ -241,6 +253,11 @@ export default {
241
253
  this.classBackDel(className2) // 删除批注对应的样式
242
254
  this.linkFor()
243
255
  this.htmlArr[this.page] = this.$refs.tagging.innerHTML
256
+ this.htmlArr.forEach(item => html += item)
257
+ this.$emit('del', {
258
+ html: html2json(html),
259
+ annotations: this.annotationsData
260
+ })
244
261
  },
245
262
  linkFor() { // 计算线的位置
246
263
  this.linkData = []
package/src/index.js CHANGED
@@ -79,7 +79,7 @@ function install(app) {
79
79
  }
80
80
 
81
81
  export default {
82
- version: '1.32.213',
82
+ version: '1.32.214',
83
83
  install,
84
84
  Calendar,
85
85
  Message,