zydx-plus 1.35.595 → 1.35.597

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.595",
3
+ "version": "1.35.597",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -24,6 +24,10 @@ export default defineComponent({
24
24
  type: String,
25
25
  default: '#00ff00'
26
26
  },
27
+ isHide: {// 按钮能否收起 true能 false 否
28
+ type: Boolean,
29
+ default: true
30
+ }
27
31
  },
28
32
  data() {
29
33
  return {
@@ -38,10 +42,18 @@ export default defineComponent({
38
42
  trackClick(idx) {
39
43
  if (this.accordian) {
40
44
  this.active_state = this.active_state.map((_, i) => {
41
- if (i === idx) {
42
- return this.active_state[i] = !this.active_state[i]
45
+ if (this.isHide) {
46
+ if (i === idx) {
47
+ return this.active_state[i] = !this.active_state[i]
48
+ } else {
49
+ return false
50
+ }
43
51
  } else {
44
- return false
52
+ if (i === idx) {
53
+ return this.active_state[i] = true
54
+ } else {
55
+ return false
56
+ }
45
57
  }
46
58
  })
47
59
  } else {
@@ -47,7 +47,7 @@ export default defineComponent({
47
47
  methods: {
48
48
  sticky: function ({ level, column, row, idx }) {
49
49
  const left = row.slice(0, idx).reduce((acc, cur) => (cur.column.width + acc), 0)
50
- return ` background: white;
50
+ return ` background: transparent;
51
51
  position: sticky;
52
52
  z-index: 5;
53
53
  min-width: ${column.width}px;
@@ -82,7 +82,7 @@ export default defineComponent({
82
82
  .table_head {
83
83
  position: relative;
84
84
  z-index: 5;
85
- background: white
85
+ background: transparent;
86
86
  }
87
87
 
88
88
  th,
@@ -105,7 +105,7 @@ td {
105
105
  }
106
106
 
107
107
  th {
108
- background: white;
108
+ background: transparent;
109
109
  position: sticky;
110
110
  z-index: 5;
111
111
  top: 0;
@@ -319,6 +319,7 @@ export default {
319
319
  this.draggableState = interact(`#draggable${that.id}`)
320
320
  this.draggableState.draggable({
321
321
  enabled: true,
322
+ touch: true,
322
323
  listeners: {
323
324
  start (event) {
324
325
  that.draggableMove = true
@@ -606,7 +607,7 @@ export default {
606
607
  .drag-head {
607
608
  height: 30px;
608
609
  line-height: 30px;
609
- padding: 0 10px;
610
+ padding: 0 5px;
610
611
  color: #fff;
611
612
  border-top-left-radius: 3px;
612
613
  border-top-right-radius: 3px;
@@ -328,6 +328,7 @@ export default {
328
328
  this.draggableState = interact(`#draggable${that.id}`)
329
329
  this.draggableState.draggable({
330
330
  enabled: true,
331
+ touch: true,
331
332
  listeners: {
332
333
  start (event) {
333
334
  that.draggableMove = true
@@ -612,7 +613,7 @@ export default {
612
613
  .drag-head {
613
614
  height: 30px;
614
615
  line-height: 30px;
615
- padding: 0 10px;
616
+ padding: 0 5px;
616
617
  color: #fff;
617
618
  border-top-left-radius: 3px;
618
619
  border-top-right-radius: 3px;
@@ -4415,7 +4415,9 @@ export default {
4415
4415
  margin-bottom: 10px;
4416
4416
  /*box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);*/
4417
4417
  }
4418
-
4418
+ .read-only-page :deep(img) {
4419
+ padding: 3px;
4420
+ }
4419
4421
  .read-only-page:last-child {
4420
4422
  margin-bottom: 0;
4421
4423
  }
@@ -86,9 +86,9 @@
86
86
  <svg style="cursor: pointer" @click="close" t="1698630749910" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4415" width="20" height="20"><path d="M726.976 274.432a16 16 0 0 0-22.656 0L512 466.752l-192.32-192.32a16 16 0 0 0-22.624 0l-22.656 22.624a16 16 0 0 0 0 22.624l192.32 192.32-192.32 192.32a16 16 0 0 0 0 22.656l22.656 22.624a16 16 0 0 0 22.624 0l192.32-192.32 192.32 192.32a16 16 0 0 0 22.656 0l22.624-22.624a16 16 0 0 0 0-22.624L557.28 512l192.32-192.352a16 16 0 0 0 0-22.624l-22.624-22.624z" fill="#fff" p-id="4416"></path></svg>
87
87
  </div>
88
88
  </div>
89
- <!-- <div class="editor-but" v-if="butText !== '' && readOnly">-->
90
- <!-- <button class="buts" @click="complete">{{ butText }}</button>-->
91
- <!-- </div>-->
89
+ <!-- <div class="editor-but" v-if="butText !== '' && readOnly">-->
90
+ <!-- <button class="buts" @click="complete">{{ butText }}</button>-->
91
+ <!-- </div>-->
92
92
  <div class="enclosure" v-if="uploadAttData.length > 0 && enclosureShow">
93
93
  <p :style="enclosureStyle">{{ enclosureText }}</p>
94
94
  <div class="enclosure-list" v-for="(item,index) in uploadAttData">
@@ -366,8 +366,8 @@ export default {
366
366
  handler: function (e, oldVal) {
367
367
  if(this.updateInit) return
368
368
  if(this.updateStatus) this.updateInit = true
369
- this.editor?.commands.setContent(json2html({node: "root", child: (e.html === undefined || e.html === null || e.html === 'null') ? [] : e.html}))
370
- this.uploadAttData = (e.enclosure === undefined || e.enclosure === null || e.html === 'null') ? [] : this.enclosureAction(e.enclosure)
369
+ this.editor?.commands.setContent(json2html({node: "root", child: this.dataChange(e).html}))
370
+ this.uploadAttData = this.dataChange(e).enclosure
371
371
  },
372
372
  deep: true
373
373
  },
@@ -382,17 +382,21 @@ export default {
382
382
  toolbar: {
383
383
  handler: function (e, oldVal) {
384
384
  let status = null
385
+ let upload = null
385
386
  this.toolbars = []
386
387
  e.forEach(x => {
387
388
  if(x.key === 'but') {
388
389
  status = x
390
+ } if (x.key === 'uploadAtt') {
391
+ upload = x
389
392
  }else {
390
393
  this.toolbars.push(x)
391
394
  }
392
395
  })
393
396
  if(this.isShowWhiteboarde) this.toolbars.push({key: 'paint', title: '插入手写'})
397
+ if(upload) this.toolbars.push(upload) // 上传附件
394
398
  if(this.voiceShow) this.toolbars.push({key: 'voice', title: '语音输入'})
395
- if(status) this.toolbars.push(status)
399
+ if(status) this.toolbars.push(status) // 之定义按钮
396
400
  if(this.isShowAiTool) this.toolbars.push({key: 'ai', title: 'AI助手'})
397
401
  },
398
402
  immediate: true
@@ -400,12 +404,12 @@ export default {
400
404
  },
401
405
  mounted() {
402
406
  let _this = this
403
- this.uploadAttData = (this.data.enclosure === undefined || this.data.enclosure === null || this.data.enclosure === 'null') ? [] : this.enclosureAction(this.data.enclosure)
407
+ this.uploadAttData = this.dataChange(this.data).enclosure
404
408
  this.heightStyle = (this.height === '100%') ? {height: '100%'} : {'min-height': this.height}
405
409
  const height = this.height.split('px')[0] - 44
406
410
  this.heightStyleCont = (this.height === '100%') ? {height: 'calc(100% - 44px)'} : {'min-height': `${height}px`}
407
411
  this.editor = new Editor({
408
- content: json2html({node: "root", child: (this.data.html === undefined || this.data.html === null || this.data.html.html === 'null') ? [] : this.data.html}),
412
+ content: json2html({node: "root", child: this.dataChange(this.data).html }),
409
413
  editable: this.readOnly,
410
414
  enablePasteRules: true,
411
415
  extensions: [
@@ -451,7 +455,7 @@ export default {
451
455
  },
452
456
  // 获取焦点
453
457
  onFocus: (e) => {
454
- this.limits = true
458
+ this.limits = true
455
459
  },
456
460
  })
457
461
  document.addEventListener('keydown', function (e) {
@@ -486,6 +490,12 @@ export default {
486
490
  })
487
491
  },
488
492
  methods: {
493
+ dataChange(e) {
494
+ if(!e) return {html: [], enclosure: []}
495
+ const html = e.html === undefined || e.html === null || e.html === 'null' ? [] : e.html
496
+ const enclosure = (e.enclosure === undefined || e.enclosure === null || e.enclosure === 'null') ? [] : this.enclosureAction(e.enclosure)
497
+ return {html: html, enclosure: enclosure}
498
+ },
489
499
  getSelectedText(e) {
490
500
  const selection = window.getSelection();
491
501
  const selectedText = selection.toString()
@@ -514,36 +524,36 @@ export default {
514
524
  this.paintShow = false
515
525
  },
516
526
  changeAlign(tag) {
517
- // 图片对齐方式
518
- this.editor.chain().setTextAlign(tag).run()
527
+ // 图片对齐方式
528
+ this.editor.chain().setTextAlign(tag).run()
519
529
  },
520
530
  changePercent(e) {
521
- // 改变图片百分比
522
- if(parseInt(e.target.value) > 100) {
523
- this.imgSizeVal = 100
524
- this.editor.chain().setImageWidth('100%').focus().run()
525
- } else if(parseInt(e.target.value) < 10) {
526
- } else {
527
- if(this.lock) {
528
- this.lock = false
529
- setTimeout(() => {
530
- this.editor.chain().setImageWidth(e.target.value + '%').focus().run()
531
- this.lock = true
532
- }, 500)
533
- }
531
+ // 改变图片百分比
532
+ if(parseInt(e.target.value) > 100) {
533
+ this.imgSizeVal = 100
534
+ this.editor.chain().setImageWidth('100%').focus().run()
535
+ } else if(parseInt(e.target.value) < 10) {
536
+ } else {
537
+ if(this.lock) {
538
+ this.lock = false
539
+ setTimeout(() => {
540
+ this.editor.chain().setImageWidth(e.target.value + '%').focus().run()
541
+ this.lock = true
542
+ }, 500)
534
543
  }
544
+ }
535
545
  },
536
546
  shouldShowFn({ editor, view, state, oldState, from, to }) {
537
- // BubbleMenu是否显示
538
- this.$nextTick(() => {
539
- this.showBubble = editor.isActive('image')
540
- if(editor.isActive('image')) {
541
- this.imgSizeVal = parseInt(this.editor.getAttributes('image').width)
542
- } else {
543
- this.imgSizeVal = ''
544
- }
545
- })
546
- return editor.isActive('image')
547
+ // BubbleMenu是否显示
548
+ this.$nextTick(() => {
549
+ this.showBubble = editor.isActive('image')
550
+ if(editor.isActive('image')) {
551
+ this.imgSizeVal = parseInt(this.editor.getAttributes('image').width)
552
+ } else {
553
+ this.imgSizeVal = ''
554
+ }
555
+ })
556
+ return editor.isActive('image')
547
557
  },
548
558
  speechDown(e) {
549
559
  this.speech = {
@@ -750,11 +760,11 @@ export default {
750
760
  },
751
761
  del(index) {
752
762
  let that = this
753
- // that.data.html = html2json(that.editor.getHTML()).child
754
- if (this.uploadAttData[index].name === undefined) {
763
+ that.data.html = html2json(that.editor.getHTML()).child
764
+ if (!this.uploadAttData[index].name) {
755
765
  that.uploadAttData[index].active = false
756
766
  that.$emit('del', that.uploadAttData[index], (e) => {
757
- if (e === undefined) {
767
+ if (!e) {
758
768
  that.uploadAttData.splice(index, 1)
759
769
  } else {
760
770
  if (e) {
@@ -806,7 +816,7 @@ export default {
806
816
  })
807
817
  },
808
818
  upload(e, v) { // 上传文件
809
- const file = e.target.files[0]
819
+ const file = e.target.files[0]
810
820
  if (this.uploadType) {
811
821
  if (v === 'uploadAtt') {
812
822
  file.active = true
@@ -858,7 +868,7 @@ export default {
858
868
  this.editor.chain().focus().insertContentAt(this.selection(), html).run()
859
869
  if (this.selection() <= 6 && this.selection() > 2) this.selectionClass2(cla)
860
870
  if (this.selectionClass(cla)) {
861
- this.editor.chain().focus().insertContentAt(this.selection(), '<p></p>').run()
871
+ this.editor.chain().focus().insertContentAt(this.selection(), '<p></p>').run()
862
872
  }
863
873
  }, 100)
864
874
  },
@@ -1008,18 +1018,18 @@ export default {
1008
1018
 
1009
1019
  <style scoped>
1010
1020
 
1011
- :deep(.w_100) {
1012
- width: 100% !important;
1013
- }
1014
- :deep(.w_75 ){
1015
- width: 75% !important;
1016
- }
1017
- :deep(.w_50 ){
1018
- width: 50% !important;
1019
- }
1020
- :deep(.w_25 ){
1021
- width: 25% !important;
1022
- }
1021
+ :deep(.w_100) {
1022
+ width: 100% !important;
1023
+ }
1024
+ :deep(.w_75 ){
1025
+ width: 75% !important;
1026
+ }
1027
+ :deep(.w_50 ){
1028
+ width: 50% !important;
1029
+ }
1030
+ :deep(.w_25 ){
1031
+ width: 25% !important;
1032
+ }
1023
1033
  :deep(p[data-sid="prohibit"]) {
1024
1034
  -webkit-user-select: none;
1025
1035
  -moz-user-select: none;
@@ -1235,11 +1245,10 @@ export default {
1235
1245
  padding: 2px 5px;
1236
1246
  cursor: pointer;
1237
1247
  min-width: 60px;
1238
- height: 20px;
1248
+ height: 21px;
1239
1249
  display: inline-block;
1240
1250
  line-height: 16px;
1241
1251
  box-sizing: border-box;
1242
- font-family: Arial;
1243
1252
  -moz-text-align-last: justify;
1244
1253
  text-align-last: justify;
1245
1254
  word-break: break-all;
@@ -1272,68 +1281,68 @@ export default {
1272
1281
  line-height: 14px !important;
1273
1282
  }
1274
1283
  }
1275
- .bubbleMenu {
1276
- position: relative;
1277
- padding: 15px;
1278
- background-color: #fff;
1279
- border-radius: 5px;
1280
- box-shadow: 0 1px 6px #d2d2d2;
1281
- }
1282
- .line {
1283
- display: flex;
1284
- align-items: center;
1285
- padding-bottom: 10px;
1286
- }
1287
- .line:last-child {
1288
- padding-bottom: 0
1289
- }
1290
- .percent {
1291
- position: relative;
1292
- }
1293
- .percent input{
1294
- border-radius: 4px;
1295
- width: 68px;
1296
- }
1297
- .percent input::-webkit-outer-spin-button,
1298
- .percent input::-webkit-inner-spin-button {
1299
- -webkit-appearance: none !important;
1300
- }
1301
- .percent input[type='number']{
1302
- -moz-appearance: textfield;
1303
- box-shadow: none;
1304
- border: 1px solid #8c939d;
1305
- padding: 5px 15px 5px 5px;
1306
- }
1307
- .symbol {
1308
- position: absolute;
1309
- right: 5px;
1310
- top: 5px
1311
- }
1284
+ .bubbleMenu {
1285
+ position: relative;
1286
+ padding: 15px;
1287
+ background-color: #fff;
1288
+ border-radius: 5px;
1289
+ box-shadow: 0 1px 6px #d2d2d2;
1290
+ }
1291
+ .line {
1292
+ display: flex;
1293
+ align-items: center;
1294
+ padding-bottom: 10px;
1295
+ }
1296
+ .line:last-child {
1297
+ padding-bottom: 0
1298
+ }
1299
+ .percent {
1300
+ position: relative;
1301
+ }
1302
+ .percent input{
1303
+ border-radius: 4px;
1304
+ width: 68px;
1305
+ }
1306
+ .percent input::-webkit-outer-spin-button,
1307
+ .percent input::-webkit-inner-spin-button {
1308
+ -webkit-appearance: none !important;
1309
+ }
1310
+ .percent input[type='number']{
1311
+ -moz-appearance: textfield;
1312
+ box-shadow: none;
1313
+ border: 1px solid #8c939d;
1314
+ padding: 5px 15px 5px 5px;
1315
+ }
1316
+ .symbol {
1317
+ position: absolute;
1318
+ right: 5px;
1319
+ top: 5px
1320
+ }
1312
1321
 
1313
- .alignmentMode {
1314
- display: flex;
1315
- justify-content: center;
1316
- align-items: center;
1317
- }
1318
- .segmentation {
1319
- height: 13px;
1320
- width: 1px;
1321
- margin: 0 5px;
1322
- background-color: #565656;
1323
- }
1324
- .imgBgc {
1325
- border-radius: 3px;
1326
- width: 20px;
1327
- height: 20px;
1328
- background-color: #CCCCCC;
1329
- }
1330
- .imgBgcAction {
1331
- background-color: #2A82E4;
1332
- }
1333
- .imgBgc > img {
1334
- padding: 1px;
1335
- width: 100%;
1336
- height: 100%;
1337
- }
1322
+ .alignmentMode {
1323
+ display: flex;
1324
+ justify-content: center;
1325
+ align-items: center;
1326
+ }
1327
+ .segmentation {
1328
+ height: 13px;
1329
+ width: 1px;
1330
+ margin: 0 5px;
1331
+ background-color: #565656;
1332
+ }
1333
+ .imgBgc {
1334
+ border-radius: 3px;
1335
+ width: 20px;
1336
+ height: 20px;
1337
+ background-color: #CCCCCC;
1338
+ }
1339
+ .imgBgcAction {
1340
+ background-color: #2A82E4;
1341
+ }
1342
+ .imgBgc > img {
1343
+ padding: 1px;
1344
+ width: 100%;
1345
+ height: 100%;
1346
+ }
1338
1347
 
1339
1348
  </style>
@@ -0,0 +1 @@
1
+ [data-main-rotation="90"]{transform:rotate(90deg) translateY(-100%)}[data-main-rotation="180"]{transform:rotate(180deg) translate(-100%,-100%)}[data-main-rotation="270"]{transform:rotate(270deg) translateX(-100%)}.annotationLayer{--annotation-unfocused-field-background:url("data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>");--input-focus-border-color:Highlight;--input-focus-outline:1px solid Canvas;--input-unfocused-border-color:transparent;--input-disabled-border-color:transparent;--input-hover-border-color:black;--link-outline:none}@media screen and (forced-colors:active){.annotationLayer{--input-focus-border-color:CanvasText;--input-unfocused-border-color:ActiveText;--input-disabled-border-color:GrayText;--input-hover-border-color:Highlight;--link-outline:1.5px solid LinkText}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .textWidgetAnnotation :is(input,textarea):required{outline:1.5px solid selectedItem}.annotationLayer .linkAnnotation{outline:var(--link-outline)}:is(.annotationLayer .linkAnnotation):hover{-webkit-backdrop-filter:var(--hcm-highlight-filter);backdrop-filter:var(--hcm-highlight-filter)}:is(.annotationLayer .linkAnnotation)>a:hover{opacity:0!important;background:0 0!important;box-shadow:none}.annotationLayer .popupAnnotation .popup{outline:calc(1.5px * var(--scale-factor)) solid CanvasText!important;background-color:ButtonFace!important;color:ButtonText!important}.annotationLayer .highlightArea:hover::after{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-backdrop-filter:var(--hcm-highlight-filter);backdrop-filter:var(--hcm-highlight-filter);content:"";pointer-events:none}.annotationLayer .popupAnnotation.focused .popup{outline:calc(3px * var(--scale-factor)) solid Highlight!important}}.annotationLayer{position:absolute;top:0;left:0;pointer-events:none;transform-origin:0 0}.annotationLayer[data-main-rotation="90"] .norotate{transform:rotate(270deg) translateX(-100%)}.annotationLayer[data-main-rotation="180"] .norotate{transform:rotate(180deg) translate(-100%,-100%)}.annotationLayer[data-main-rotation="270"] .norotate{transform:rotate(90deg) translateY(-100%)}.annotationLayer.disabled .popup,.annotationLayer.disabled section{pointer-events:none}.annotationLayer .annotationContent{position:absolute;width:100%;height:100%;pointer-events:none}.freetext:is(.annotationLayer .annotationContent){background:0 0;border:none;inset:0;overflow:visible;white-space:nowrap;font:10px sans-serif;line-height:1.35;-webkit-user-select:none;-moz-user-select:none;user-select:none}.annotationLayer section{position:absolute;text-align:initial;pointer-events:auto;box-sizing:border-box;transform-origin:0 0}:is(.annotationLayer section):has(div.annotationContent) canvas.annotationContent{display:none}.textLayer.selecting~.annotationLayer section{pointer-events:none}.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton)>a{position:absolute;font-size:1em;top:0;left:0;width:100%;height:100%}.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton):not(.hasBorder)>a:hover{opacity:.2;background-color:rgb(255 255 0);box-shadow:0 2px 10px rgb(255 255 0)}.annotationLayer .linkAnnotation.hasBorder:hover{background-color:rgb(255 255 0 / .2)}.annotationLayer .hasBorder{background-size:100% 100%}.annotationLayer .textAnnotation img{position:absolute;cursor:pointer;width:100%;height:100%;top:0;left:0}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input,.annotationLayer .choiceWidgetAnnotation select,.annotationLayer .textWidgetAnnotation :is(input,textarea){background-image:var(--annotation-unfocused-field-background);border:2px solid var(--input-unfocused-border-color);box-sizing:border-box;font:calc(9px * var(--scale-factor)) sans-serif;height:100%;margin:0;vertical-align:top;width:100%}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .textWidgetAnnotation :is(input,textarea):required{outline:1.5px solid red}.annotationLayer .choiceWidgetAnnotation select option{padding:0}.annotationLayer .buttonWidgetAnnotation.radioButton input{border-radius:50%}.annotationLayer .textWidgetAnnotation textarea{resize:none}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input[disabled],.annotationLayer .choiceWidgetAnnotation select[disabled],.annotationLayer .textWidgetAnnotation [disabled]:is(input,textarea){background:0 0;border:2px solid var(--input-disabled-border-color);cursor:not-allowed}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .textWidgetAnnotation :is(input,textarea):hover{border:2px solid var(--input-hover-border-color)}.annotationLayer .buttonWidgetAnnotation.checkBox input:hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .textWidgetAnnotation :is(input,textarea):hover{border-radius:2px}.annotationLayer .choiceWidgetAnnotation select:focus,.annotationLayer .textWidgetAnnotation :is(input,textarea):focus{background:0 0;border:2px solid var(--input-focus-border-color);border-radius:2px;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) :focus{background-image:none;background-color:transparent}.annotationLayer .buttonWidgetAnnotation.checkBox :focus{border:2px solid var(--input-focus-border-color);border-radius:2px;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation.radioButton :focus{border:2px solid var(--input-focus-border-color);outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before,.annotationLayer .buttonWidgetAnnotation.radioButton input:checked::before{background-color:CanvasText;content:"";display:block;position:absolute}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before{height:80%;left:45%;width:1px}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before{transform:rotate(45deg)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after{transform:rotate(-45deg)}.annotationLayer .buttonWidgetAnnotation.radioButton input:checked::before{border-radius:50%;height:50%;left:25%;top:25%;width:50%}.annotationLayer .textWidgetAnnotation input.comb{font-family:monospace;padding-left:2px;padding-right:0}.annotationLayer .textWidgetAnnotation input.comb:focus{width:103%}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input{-webkit-appearance:none;-moz-appearance:none;appearance:none}.annotationLayer .fileAttachmentAnnotation .popupTriggerArea{height:100%;width:100%}.annotationLayer .popupAnnotation{position:absolute;font-size:calc(9px * var(--scale-factor));pointer-events:none;width:-moz-max-content;width:max-content;max-width:45%;height:auto}.annotationLayer .popup{background-color:rgb(255 255 153);box-shadow:0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor)) rgb(136 136 136);border-radius:calc(2px * var(--scale-factor));outline:1.5px solid rgb(255 255 74);padding:calc(6px * var(--scale-factor));cursor:pointer;font:message-box;white-space:normal;word-wrap:break-word;pointer-events:auto}.annotationLayer .popupAnnotation.focused .popup{outline-width:3px}.annotationLayer .popup *{font-size:calc(9px * var(--scale-factor))}.annotationLayer .popup>.header{display:inline-block}.annotationLayer .popup>.header h1{display:inline}.annotationLayer .popup>.header .popupDate{display:inline-block;margin-left:calc(5px * var(--scale-factor));width:-moz-fit-content;width:fit-content}.annotationLayer .popupContent{border-top:1px solid rgb(51 51 51);margin-top:calc(2px * var(--scale-factor));padding-top:calc(2px * var(--scale-factor))}.annotationLayer .richText>*{white-space:pre-wrap;font-size:calc(9px * var(--scale-factor))}.annotationLayer .popupTriggerArea{cursor:pointer}.annotationLayer section svg{position:absolute;width:100%;height:100%;top:0;left:0}.annotationLayer .annotationTextContent{position:absolute;width:100%;height:100%;opacity:0;color:transparent;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}:is(.annotationLayer .annotationTextContent) span{width:100%;display:inline-block}.annotationLayer svg.quadrilateralsContainer{contain:strict;width:0;height:0;position:absolute;top:0;left:0;z-index:-1}
@@ -27,8 +27,8 @@
27
27
  <div class="wrap-can" v-show="!loading" ref="wrapCanBox">
28
28
  <div class="extend-right" v-if="rightMenuShow" :style="extendStyle">
29
29
  <div class="extend-right-cont" @click.stop="extendRight(null)">
30
- <img src="../img/qubiezhen.svg" alt="">
31
- <p>链接扩展</p>
30
+ <!-- <img src="../img/qubiezhen.svg" alt=""> -->
31
+ <p>添加链接</p>
32
32
  </div>
33
33
  </div>
34
34
  <div class="textLayer" ref="textLayer">
@@ -79,8 +79,8 @@
79
79
  <div class="wrap-can" v-show="!loading" ref="wrapCan">
80
80
  <div class="extend-right" v-if="rightMenuShow" :style="extendStyle">
81
81
  <div class="extend-right-cont" @click.stop="extendRight(null)">
82
- <img src="../img/qubiezhen.svg" alt="">
83
- <p>链接扩展</p>
82
+ <!-- <img src="../img/qubiezhen.svg" alt=""> -->
83
+ <p>添加链接</p>
84
84
  </div>
85
85
  </div>
86
86
  <div class="textLayer" ref="textLayer">
@@ -253,6 +253,10 @@ export default {
253
253
  }
254
254
  },
255
255
  props: {
256
+ isDisableRightClick: {
257
+ type: Boolean,
258
+ default: false
259
+ },
256
260
  source: {
257
261
  type: String,
258
262
  default: ''
@@ -494,6 +498,9 @@ export default {
494
498
  },
495
499
  // 右键菜单
496
500
  rightMenu(e) {
501
+ if (this.isDisableRightClick) {
502
+ return
503
+ }
497
504
  e.preventDefault()
498
505
  if(this.readOnly) return;
499
506
  if(!this.rightClick) return;
@@ -512,7 +519,8 @@ export default {
512
519
  this.rightMenuShow = true
513
520
  this.extendStyle = {
514
521
  left: left + 'px',
515
- top: `calc(${Number(topMatch) + '%'} - 50px)`
522
+ // top: `calc(${Number(topMatch) + '%'} - 50px)`
523
+ top: `calc(${Number(topMatch) + '%'} - 30px)`
516
524
  }
517
525
  this.annData = {
518
526
  rect: [x1/this.scales,y1/this.scales,x2/this.scales,y2/this.scales],
@@ -1701,9 +1709,9 @@ export default {
1701
1709
 
1702
1710
  <style scoped>
1703
1711
 
1704
- @import '../icon.css';
1705
- @import '../annotationLayer.css';
1706
- @import '../textLayer.css';
1712
+ @import './icon.css';
1713
+ @import './annotationLayer.css';
1714
+ @import './textLayer.css';
1707
1715
  .magnifier{
1708
1716
  position: absolute;
1709
1717
  text-align: initial;
@@ -1777,18 +1785,20 @@ export default {
1777
1785
  .extend-right{
1778
1786
  position: absolute;
1779
1787
  z-index: 5;
1780
- border-radius: 20px;
1781
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
1782
- padding: 10px;
1788
+ /* border-radius: 20px; */
1789
+ /* box-shadow: 0 0 10px rgba(0, 0, 0, 0.25); */
1790
+ /* padding: 10px; */
1783
1791
  background-color: #DEDCDC;
1784
1792
  cursor: pointer;
1785
1793
  transform: scaleX(-1);
1794
+ padding: 2px 6px;
1795
+ border-radius: 3px;
1786
1796
  }
1787
1797
  .extend-right-cont{
1788
1798
  display: flex;
1789
1799
  transform: scaleX(-1);
1790
1800
  }
1791
- .extend-right:after {
1801
+ /* .extend-right:after {
1792
1802
  content: '';
1793
1803
  position: absolute;
1794
1804
  top: 54%;
@@ -1798,7 +1808,7 @@ export default {
1798
1808
  background: url("../img/sanjiao.png") no-repeat 0 0;
1799
1809
  background-size: 100% 100%;
1800
1810
  transform: rotate(-85deg) scaleY(-1);
1801
- }
1811
+ } */
1802
1812
  .extend-right-cont>img{
1803
1813
  width: 14px !important;
1804
1814
  height: 14px !important;
@@ -1806,9 +1816,10 @@ export default {
1806
1816
  top: 2px;
1807
1817
  }
1808
1818
  .extend-right-cont>p{
1819
+ line-height: 20px;
1809
1820
  font-size: 12px;
1810
1821
  color: #fff;
1811
- padding-left: 5px;
1822
+ /* padding-left: 5px; */
1812
1823
  }
1813
1824
  .isPointer{
1814
1825
  pointer-events: none;