zydx-plus 1.35.545 → 1.35.546

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.545",
3
+ "version": "1.35.546",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -773,9 +773,18 @@ export default {
773
773
  } else {
774
774
  this.uploadFile(file, (v === 'uploadAtt') ? this.uploadAttachment : this.uploadImage).then(r => {
775
775
  if (v === 'uploadAtt') {
776
- r.data.annex.active = true
777
- this.uploadAttData.push(r.data.annex)
778
- this.$emit('enclosureSuccess', r.data.annex, html2json(this.editor.getHTML()).child)
776
+ if (r.data.annex) {
777
+ r.data.annex.active = true
778
+ this.uploadAttData.push(r.data.annex)
779
+ this.$emit('enclosureSuccess', r.data.annex, html2json(this.editor.getHTML()).child)
780
+ } else {
781
+ file.active = true
782
+ this.uploadAttData.push(file)
783
+ this.$emit('updateData', {
784
+ html: html2json(this.editor.getHTML()).child,
785
+ enclosure: this.uploadAttData
786
+ })
787
+ }
779
788
  } else {
780
789
  this.imgHtml(r.data)
781
790
  }
@@ -0,0 +1 @@
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750386274453" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="14208" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M783.530667 740.864L512 1012.394667l-271.530667-271.530667a384 384 0 1 1 543.061334 0zM512 640a170.666667 170.666667 0 1 0 0-341.333333 170.666667 170.666667 0 0 0 0 341.333333z m0-85.333333a85.333333 85.333333 0 1 1 0-170.666667 85.333333 85.333333 0 0 1 0 170.666667z" fill="#4B0C77" p-id="14209"></path></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750386430720" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="14817" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M896.85645653 772.26033067L896.92194773 772.26033067 896.92194773 771.86628907Z" fill="#ffffff" p-id="14818"></path><path d="M955.56967253 511.99781653c0-244.60347307-199.00494827-443.56257813-443.56148586-443.56257813-244.61766293 0-443.576768 198.95910507-443.576768 443.56257813 0 244.58709973 198.95910507 443.56366933 443.576768 443.56366934C756.563632 955.56148587 955.56967253 756.58491733 955.56967253 511.99781653M512.00818667 891.916752c-209.46723093 0-379.91784427-170.48226667-379.91784427-379.91893547 0-209.46613973 170.45061227-379.90147093 379.91784427-379.90147093 209.43448533 0 379.88728107 170.4353312 379.88728106 379.90147093C891.89546773 721.43448533 721.442672 891.916752 512.00818667 891.916752" fill="#ffffff" p-id="14819"></path><path d="M693.73754347 650.9098592L556.58394987 513.3491264 693.61201813 377.84482987c12.4390368-12.28185707 12.5329088-32.35503147 0.24995947-44.79516054-12.28185707-12.45541013-32.38668587-12.55037333-44.82790613-0.2368608L511.88156907 468.475376 376.77131413 332.93942507c-12.37572907-12.37682027-32.41943147-12.4390368-44.82681493-0.0633088-12.37682027 12.3931936-12.37682027 32.4347136-0.0633088 44.81262506l134.9530752 135.3471168L330.81367787 647.57852053c-12.44012907 12.31351147-12.5656544 32.32556053-0.25105067 44.767872 6.21951893 6.28282667 14.32519573 9.4220576 22.49199787 9.4220576 8.042368 0 16.14586133-3.07701333 22.30425493-9.14044373l136.20833173-134.73258773L648.84632853 695.6755488c6.18895573 6.18677333 14.32410347 9.29871573 22.46034347 9.29871573 8.1056768 0 16.17642453-3.1119424 22.36647147-9.23649813C706.05105493 683.39369173 706.08052693 663.34889707 693.73754347 650.9098592" fill="#ffffff" p-id="14820"></path></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750386362780" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="14614" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M902.8 192.9c-36.8-39-86.9-60.8-139.1-60.7h-0.2c-52-0.1-102 21.6-138.7 60.4l-0.1 0.1-362.3 381.2c-33.7 35.6-43.7 89-25.4 135.4 18.3 46.4 61.4 76.6 109.2 76.5 30.2 0 60.3-12 83.2-36.2l362.3-381.2c15.4-16.2 15.4-42.4 0-58.6-15.4-16.2-40.3-16.2-55.7 0L373.8 691c-7.4 7.7-17.4 12-27.8 12-10.4 0-20.4-4.4-27.7-12.2-7.5-7.6-11.7-18.1-11.8-29.1 0-11 4.1-21.5 11.5-29.2l362.3-381.2c22-23.3 52-36.3 83.2-36.2h0.1c31.3-0.1 61.4 13.1 83.5 36.4 22.3 23.4 34.6 54.7 34.6 87.8 0.1 32.9-12.3 64.5-34.4 87.7l-97.8 102.9-0.6 0.6-271.1 285.4c-76.9 80.8-201.5 80.9-278.5 0.1-37-38.8-57.7-91.5-57.5-146.4 0-55.4 20.5-107.5 57.7-146.6l369.4-388.7c15.4-16.2 15.4-42.4 0-58.6-15.4-16.2-40.3-16.2-55.7 0L143.8 464.4c-51.9 54.3-81 128.2-80.8 205.2 0 77.5 28.6 150.4 80.6 205 51.6 54.4 121.7 84.9 194.8 84.7 73.2 0.1 143.4-30.4 195.1-84.9l383.1-403.1c3.8-4.1 6.8-9 8.7-14.3 22.8-34.4 35.2-75 35.2-117.8 0.1-54.9-20.7-107.6-57.7-146.3" p-id="14615" fill="#ffffff"></path></svg>
@@ -0,0 +1 @@
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750386795145" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="30056" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M358.925672 596.814688v30.450522c0 17.248849 13.985526 31.233352 31.233352 31.233352 17.248849 0 31.233352-13.985526 31.233352-31.233352v-30.450522c0-17.248849-13.985526-31.233352-31.233352-31.233352-17.248849 0-31.233352 13.985526-31.233352 31.233352zM602.506317 596.814688v30.450522c0 17.248849 13.985526 31.233352 31.233352 31.233352s31.233352-13.985526 31.233351-31.233352v-30.450522c0-17.248849-13.984503-31.233352-31.233351-31.233352s-31.233352 13.985526-31.233352 31.233352zM437.047937 699.686636c-14.650675 9.104355-19.155269 28.360931-10.04989 43.01263 11.015891 17.73185 41.238216 47.740304 84.651982 47.740304 43.195801 0 73.79368-29.780257 85.059258-47.379077 9.216919-14.391778 5.03262-33.338293-9.237385-42.742477-14.270005-9.393951-33.576723-5.409197-43.159985 8.739035-0.12689 0.188288-13.049201 18.915815-32.661888 18.915815-19.028379 0-30.93864-17.274432-31.772634-18.530028-9.175987-14.412244-28.259624-18.788925-42.829458-9.756202zM907.576407 160.082952H699.352015v-26.882254c0-40.145325-32.692586-72.807213-72.878844-72.807213h-229.046626c-40.186258 0-72.878844 32.661887-72.878844 72.807213v26.882254H116.323309c-17.248849 0-31.233352 13.984503-31.233352 31.233352s13.984503 31.233352 31.233352 31.233351h791.253098c17.248849 0 31.233352-13.984503 31.233352-31.233351s-13.985526-31.233352-31.233352-31.233352z m-270.692119 0H387.014404v-26.882254c0-5.607718 4.768607-10.340509 10.411117-10.340509h229.046627c5.64251 0 10.411117 4.732791 10.411117 10.340509v26.882254z" fill="#ffffff" p-id="30057"></path><path d="M824.286446 259.279185c-17.248849 0-31.233352 13.984503-31.233352 31.233352v530.07261c0 40.089044-32.692586 72.705905-72.878844 72.705906H303.725466c-40.186258 0-72.878844-32.616862-72.878844-72.705906v-530.07261c0-17.248849-13.984503-31.233352-31.233352-31.233352s-31.233352 13.984503-31.233352 31.233352v530.07261c0 74.535577 60.71378 135.172609 135.345548 135.172609h416.448784c74.632791 0 135.345548-60.637032 135.345548-135.172609v-530.07261c0-17.248849-13.984503-31.233352-31.233352-31.233352z" fill="#ffffff" p-id="30058"></path><path d="M355.781052 259.279185c-17.248849 0-31.233352 13.984503-31.233351 31.233352v167.494758c0 17.248849 13.985526 31.233352 31.233351 31.233352 17.248849 0 31.233352-13.985526 31.233352-31.233352v-167.494758c0-17.248849-13.984503-31.233352-31.233352-31.233352zM699.352015 458.007295v-167.494758c0-17.248849-13.984503-31.233352-31.233351-31.233352s-31.233352 13.984503-31.233352 31.233352v167.494758c0 17.248849 13.985526 31.233352 31.233352 31.233352s31.233352-13.984503 31.233351-31.233352zM511.949858 489.240647c17.248849 0 31.233352-13.985526 31.233352-31.233352v-167.494758c0-17.248849-13.985526-31.233352-31.233352-31.233352s-31.233352 13.984503-31.233352 31.233352v167.494758c-0.001023 17.248849 13.984503 31.233352 31.233352 31.233352z" fill="#ffffff" p-id="30059"></path></svg>
@@ -25,7 +25,10 @@
25
25
  <div class="wrap wrap-block" :ref="`wrap-${item.id}`" v-for="(item,index) in pageInfoArr" :key="index">
26
26
  <div class="wrap-can" v-show="!loading" ref="wrapCanBox">
27
27
  <div class="extend-right" v-if="rightMenuShow" :style="extendStyle">
28
- <p @click.stop="extendRight(index)">链接扩展</p>
28
+ <div class="extend-right-cont">
29
+ <img src="../img/qubiezhen.svg" alt="">
30
+ <p @click.stop="extendRight(null)">链接扩展</p>
31
+ </div>
29
32
  </div>
30
33
  <div class="textLayer" ref="textLayer">
31
34
  <span :dir="item2.dir" :style="styleText(item2,item.styles, item.id)" v-for="(item2) in item.items">{{ item2.str }}</span>
@@ -33,10 +36,16 @@
33
36
  <div class="annotationLayer" ref="annotationLayer">
34
37
  <template v-for="(item,index) in annotations">
35
38
  <div :style="styleAnnotation(item)" class="magnifier" v-if="item.type === 'tag'">
36
- <img @click.stop="magnifierTap($event,item)" src="../img/fangdajing.png" alt="" />
37
- <div class="magnifier-list" v-if="item.show" :style="item.style">
39
+ <div class="magnifier-head">
40
+ <div class="magnifier-title">拓展阅读</div>
41
+ <div class="magnifier-icon">
42
+ <img @click.stop="annotationTap(item,'add')" src="../img/qubiezhen.svg" alt="" />
43
+ <img @click.stop="annEmpty(item.list)" src="../img/shanchu.svg" alt="" />
44
+ <img @click.stop="extendRightDel" src="../img/guanbi.svg" alt="" />
45
+ </div>
46
+ </div>
47
+ <div class="magnifier-cont">
38
48
  <div class="magnifier-list-item" @click="annotationTap(item2)" v-for="(item2,index2) in item.list">{{ index2+1 }}.{{ item2?.title }}</div>
39
- <div class="magnifier-list-add" @click="annotationTap(item,'add')">添加扩展链接</div>
40
49
  </div>
41
50
  </div>
42
51
  <section v-else tabindex="1000" @click="annotationTap(item,item.id)" :style="styleAnnotation(item)">
@@ -68,7 +77,10 @@
68
77
  <div class="wrap" ref="wrap" v-show="!doublePage">
69
78
  <div class="wrap-can" v-show="!loading" ref="wrapCan">
70
79
  <div class="extend-right" v-if="rightMenuShow" :style="extendStyle">
71
- <p @click.stop="extendRight(null)">链接扩展</p>
80
+ <div class="extend-right-cont">
81
+ <img src="../img/qubiezhen.svg" alt="">
82
+ <p @click.stop="extendRight(null)">链接扩展</p>
83
+ </div>
72
84
  </div>
73
85
  <div class="textLayer" ref="textLayer">
74
86
  <span :dir="item.dir" :style="styleText(item,styles)" v-for="(item,index) in items">{{ item.str }}</span>
@@ -76,10 +88,19 @@
76
88
  <div class="annotationLayer" ref="annotationLayer">
77
89
  <template v-for="(item,index) in annotations">
78
90
  <div :style="styleAnnotation(item)" class="magnifier" v-if="item.type === 'tag'">
79
- <img @click.stop="magnifierTap($event,item)" src="../img/fangdajing.png" alt="" />
91
+ <img @click.stop="magnifierTap($event,item)" src="../img/dingwei.svg" alt="" />
80
92
  <div class="magnifier-list" v-if="item.show" :style="item.style">
81
- <div class="magnifier-list-item" @click="annotationTap(item2)" v-for="(item2,index2) in item.list">{{ index2+1 }}.{{ item2?.title }}</div>
82
- <div class="magnifier-list-add" @click="annotationTap(item,'add')">添加扩展链接</div>
93
+ <div class="magnifier-head">
94
+ <div class="magnifier-title">拓展阅读</div>
95
+ <div class="magnifier-icon">
96
+ <img @click.stop="annotationTap(item,'add')" src="../img/qubiezhen.svg" alt="" />
97
+ <img @click.stop="annEmpty(item.list)" src="../img/shanchu.svg" alt="" />
98
+ <img @click.stop="extendRightDel" src="../img/guanbi.svg" alt="" />
99
+ </div>
100
+ </div>
101
+ <div class="magnifier-cont">
102
+ <div class="magnifier-list-item" @click="annotationTap(item2)" v-for="(item2,index2) in item.list">{{ index2+1 }}.{{ item2?.title }}</div>
103
+ </div>
83
104
  </div>
84
105
  </div>
85
106
  <section v-else tabindex="1000" @click="annotationTap(item)" :style="styleAnnotation(item)">
@@ -277,6 +298,10 @@ export default {
277
298
  annotationsData: {
278
299
  type: Array,
279
300
  default: () => []
301
+ },
302
+ rightClick: {
303
+ type: Boolean,
304
+ default: true
280
305
  }
281
306
  },
282
307
  watch: {
@@ -376,7 +401,7 @@ export default {
376
401
  immediate: true
377
402
  }
378
403
  },
379
- emits: ['flip','annotationTap', 'annotationsSend'],
404
+ emits: ['flip','annotationTap', 'annotationsSend', 'empty'],
380
405
  mounted() {
381
406
  if (!this.doublePage) {
382
407
  this.id = 'canvas-wrap' + this.generateUniqueKey()
@@ -394,17 +419,19 @@ export default {
394
419
  this.cancelResizeObserver()
395
420
  },
396
421
  methods: {
422
+ annEmpty(v) {
423
+ this.$emit('empty',v)
424
+ },
397
425
  magnifierTap(e,v) {
398
426
  if(!v.show) this.extendRightDel()
399
427
  v.show = !v.show
400
428
  setTimeout(() => {
401
- const w = e.target.nextSibling.offsetWidth
402
429
  const x = (v.rect[0] * this.scales / this.viewport?.width) * 100
403
430
  const y = ((this.viewport?.height - (v.rect[1] * this.scales)) / this.viewport?.height) * 100
404
431
  if(x > 50) {
405
- v.style.left = `-${w?w + 5:0}px`
432
+ v.style.left = `-205px`
406
433
  }else {
407
- v.style.right = `-${w?w + 5:0}px`
434
+ v.style.right = `-205px`
408
435
  }
409
436
  if(y > 40) {
410
437
  v.style.bottom = '0px'
@@ -446,6 +473,7 @@ export default {
446
473
  // 右键菜单
447
474
  rightMenu(e) {
448
475
  e.preventDefault()
476
+ if(!this.rightClick) return;
449
477
  if(this.doublePage) return;
450
478
  if(e.target.nodeName === 'SPAN') {
451
479
  const wid = this.$refs.wrap.offsetWidth - 10
@@ -454,7 +482,7 @@ export default {
454
482
  const style = e.target.attributes.style.value
455
483
  const size = style.match(/font-size:\s*([^;]+)/)[1].trim().replace(/px/g, "")
456
484
  const topMatch = style.match(/top:\s*([^;]+)/)[1].trim().replace(/%/g, "");
457
- const x1 = this.viewport.width * (e.target.offsetLeft + (endOffset * Number(size)))/wid
485
+ const x1 = (this.viewport.width * (e.target.offsetLeft + (endOffset * Number(size)))/wid) - 3
458
486
  const y1 = this.viewport.height * (1 - (Number(topMatch/100))) - 3
459
487
  const x2 = x1 + 15
460
488
  const y2 = y1 + 15
@@ -462,7 +490,7 @@ export default {
462
490
  this.rightMenuShow = true
463
491
  this.extendStyle = {
464
492
  left: left + 'px',
465
- top: Number(topMatch) + ((size/hei)*100) + '%'
493
+ top: Number(topMatch) - ((size/hei)*240) + '%'
466
494
  }
467
495
  this.annData = {
468
496
  rect: [x1/this.scales,y1/this.scales,x2/this.scales,y2/this.scales],
@@ -1658,51 +1686,95 @@ export default {
1658
1686
  }
1659
1687
  .magnifier-list{
1660
1688
  position: absolute;
1661
- max-width: 300px;
1689
+ width: 200px;
1662
1690
  background-color: #fff;
1663
- border-radius: 5px;
1691
+ border-radius: 6px;
1664
1692
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
1665
- padding: 10px 20px;
1666
1693
  font-size: 14px;
1667
1694
  z-index: 1;
1668
1695
  animation: linkDown .4s linear forwards;
1669
1696
  opacity: 0;
1697
+ overflow: hidden;
1698
+ }
1699
+ .magnifier-head{
1700
+ height: 30px;
1701
+ width: 100%;
1702
+ background: #4B0C77;
1703
+ line-height: 30px;
1704
+ display: flex;
1705
+ justify-content: space-between;
1706
+ padding: 0 5px;
1707
+ box-sizing: border-box;
1708
+ }
1709
+ .magnifier-icon>img{
1710
+ width: 16px !important;
1711
+ height: 16px !important;
1712
+ margin-left: 10px;
1713
+ position: relative;
1714
+ top: 2px;
1715
+ }
1716
+ .magnifier-title{
1717
+ font-size: 14px;
1718
+ color: #fff;
1719
+ }
1720
+ .magnifier-cont{
1721
+ padding: 5px;
1670
1722
  }
1671
1723
  .magnifier-list-item{
1724
+ border-bottom: 1px dashed #ccc;
1725
+ font-size: 12px;
1672
1726
  line-height: 24px;
1673
- overflow: hidden;
1674
- text-overflow: ellipsis;
1675
- white-space: nowrap;
1727
+ }
1728
+ .magnifier-list-item:last-child{
1729
+ border-bottom: 0;
1676
1730
  }
1677
1731
  .magnifier-list-item:hover{
1678
1732
  color: #4B0C77 !important;
1733
+ background: #eeeeee;
1679
1734
  }
1680
1735
  @keyframes linkDown {
1681
1736
  0% {
1682
1737
  opacity: 0;
1683
1738
  }
1684
- 50% {
1685
- opacity: 0;
1686
- }
1687
1739
  100% {
1688
1740
  opacity: 1;
1689
1741
  }
1690
1742
  }
1691
- .magnifier-list-add{
1692
- color: #666;
1693
- font-size: 12px;
1694
- padding: 5px 0;
1695
- }
1696
1743
  .extend-right{
1697
1744
  position: absolute;
1698
1745
  z-index: 5;
1699
- background-color: #fff;
1700
- border-radius: 5px;
1746
+ border-radius: 20px;
1701
1747
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
1702
- padding: 10px 20px;
1703
- }
1704
- .extend-right>p{
1748
+ padding: 10px;
1749
+ background-color: #4B0C77;
1705
1750
  cursor: pointer;
1751
+ transform: scaleX(-1);
1752
+ }
1753
+ .extend-right-cont{
1754
+ display: flex;
1755
+ transform: scaleX(-1);
1756
+ }
1757
+ .extend-right:after {
1758
+ content: '';
1759
+ position: absolute;
1760
+ top: 54%;
1761
+ right: 0;
1762
+ width: 30px;
1763
+ height: 30px;
1764
+ background: url("../img/sanjiao.png") no-repeat 0 0;
1765
+ background-size: 100% 100%;
1766
+ transform: rotate(-85deg) scaleY(-1);
1767
+ }
1768
+ .extend-right-cont>img{
1769
+ width: 14px !important;
1770
+ height: 14px !important;
1771
+ position: relative;
1772
+ top: 2px;
1773
+ }
1774
+ .extend-right-cont>p{
1775
+ font-size: 12px;
1776
+ color: #fff;
1777
+ padding-left: 5px;
1706
1778
  }
1707
1779
  .isPointer{
1708
1780
  pointer-events: none;
package/src/index.js CHANGED
@@ -89,7 +89,7 @@ function install(app) {
89
89
  }
90
90
 
91
91
  export default {
92
- version: '1.35.545',
92
+ version: '1.35.546',
93
93
  install,
94
94
  Calendar,
95
95
  Message,