Merge branch 'main' of https://dev.azure.com/freeleaps/freeleaps2-frontend/_git/freeleaps2-frontend
This commit is contained in:
commit
9b43cc794a
@ -7,7 +7,8 @@
|
|||||||
ref="editor"
|
ref="editor"
|
||||||
v-html="content"
|
v-html="content"
|
||||||
@blur="updateAction"
|
@blur="updateAction"
|
||||||
@mouseup.stop="selectionChange"
|
@mousedown.stop="selectionStart"
|
||||||
|
@mouseup.stop="selectionEnd"
|
||||||
/>
|
/>
|
||||||
<div v-if="!disabled" class="editor-control" :style="editorCtrlStyle">
|
<div v-if="!disabled" class="editor-control" :style="editorCtrlStyle">
|
||||||
<div v-for="(item, index) in iconList" :key="index" class="editor-item">
|
<div v-for="(item, index) in iconList" :key="index" class="editor-item">
|
||||||
@ -186,7 +187,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
selectionChange(e) {
|
selectionStart() {
|
||||||
|
this.$refs.editor.blur()
|
||||||
|
},
|
||||||
|
selectionEnd(e) {
|
||||||
const sel = window.getSelection()
|
const sel = window.getSelection()
|
||||||
if (sel && sel.type === 'Range') {
|
if (sel && sel.type === 'Range') {
|
||||||
// this.selectedRange = sel.getRangeAt(0)
|
// this.selectedRange = sel.getRangeAt(0)
|
||||||
@ -307,11 +311,7 @@ export default {
|
|||||||
|
|
||||||
updateAction($event) {
|
updateAction($event) {
|
||||||
let html = $event.target.innerHTML || ''
|
let html = $event.target.innerHTML || ''
|
||||||
//TODO: need to revise afte confirming the timeout approach is working
|
|
||||||
this.$emit('update:content', html)
|
this.$emit('update:content', html)
|
||||||
// setTimeout(() => {
|
|
||||||
// this.$emit('update:content', html)
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,7 +36,6 @@ import {
|
|||||||
import { signinActionEnum } from '@/types/index'
|
import { signinActionEnum } from '@/types/index'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
|
||||||
name: 'FrontDoor',
|
name: 'FrontDoor',
|
||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user