zydx-plus 1.34.453 → 1.34.454
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
|
@@ -204,8 +204,8 @@ export default {
|
|
|
204
204
|
},
|
|
205
205
|
chatMousedown(event) {
|
|
206
206
|
event.preventDefault()
|
|
207
|
-
//鼠标按下事件
|
|
208
|
-
this.left = event.offsetX;
|
|
207
|
+
//鼠标按下事件 左侧有10px的padding
|
|
208
|
+
this.left = event.offsetX + 10;
|
|
209
209
|
this.top = event.offsetY;
|
|
210
210
|
this.isMove = true
|
|
211
211
|
},
|
|
@@ -572,4 +572,4 @@ export default {
|
|
|
572
572
|
background: rgba(67, 207, 124, 0.8);
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
|
-
</style>
|
|
575
|
+
</style>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
</label>
|
|
16
16
|
<button v-else class="buts" @click="toolTap(item.key)">{{ item.title }}</button>
|
|
17
17
|
</div>
|
|
18
|
-
<button class="buts" @click="toolTap('paint')">插入白板</button>
|
|
18
|
+
<button v-if='isShowWhiteboarde' class="buts" @click="toolTap('paint')">插入白板</button>
|
|
19
19
|
<button v-if="voiceShow" class="buts" @mousedown.stop="speechDown" @click="voice()"
|
|
20
20
|
:style="{color: (voiceStatus)? '#4B0C77' :'#000'}">{{ voiceStatus ? '关闭语音' : '语音输入' }}
|
|
21
21
|
</button>
|
|
@@ -209,6 +209,7 @@ export default {
|
|
|
209
209
|
currentImgDom: {},
|
|
210
210
|
paintShow: false,
|
|
211
211
|
isShowAi: false,
|
|
212
|
+
lastSelectedText: '',
|
|
212
213
|
}
|
|
213
214
|
},
|
|
214
215
|
beforeUnmount() {
|
|
@@ -217,6 +218,8 @@ export default {
|
|
|
217
218
|
this.ws?.send(JSON.stringify({"type":"CANCEL"}))
|
|
218
219
|
this.ws?.close()
|
|
219
220
|
this.ws = null
|
|
221
|
+
// document.removeEventListener('selectstart', this.selectstartfn);
|
|
222
|
+
// document.removeEventListener('mouseup', this.getSelectedText)
|
|
220
223
|
},
|
|
221
224
|
props: {
|
|
222
225
|
isShowAiTool: {
|
|
@@ -349,6 +352,7 @@ export default {
|
|
|
349
352
|
}
|
|
350
353
|
},
|
|
351
354
|
mounted() {
|
|
355
|
+
// document.addEventListener('mouseup', this.getSelectedText)
|
|
352
356
|
let _this = this
|
|
353
357
|
this.uploadAttData = (this.data.enclosure === undefined || this.data.enclosure === null || this.data.enclosure === 'null') ? [] : this.enclosureAction(this.data.enclosure)
|
|
354
358
|
this.heightStyle = (this.height === '100%') ? {height: '100%'} : {'min-height': this.height}
|
|
@@ -429,6 +433,15 @@ export default {
|
|
|
429
433
|
})
|
|
430
434
|
},
|
|
431
435
|
methods: {
|
|
436
|
+
getSelectedText(e) {
|
|
437
|
+
const selection = window.getSelection();
|
|
438
|
+
const selectedText = selection.toString()
|
|
439
|
+
if (!selectedText || this.lastSelectedText === selectedText) return
|
|
440
|
+
const clientX = e.clientX
|
|
441
|
+
const clientY = e.clientX
|
|
442
|
+
this.lastSelectedText = selectedText
|
|
443
|
+
console.log('selectedText', selectedText)
|
|
444
|
+
},
|
|
432
445
|
showAi() {
|
|
433
446
|
this.isShowAi = !this.isShowAi
|
|
434
447
|
},
|