BUG 26948
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="AiEditor" @click="editing=true">
|
||||
<div class="AiEditor" :class="{noBorder}" @click="editing=true">
|
||||
<div ref="AiEditorInstance" style="-webkit-user-select:text;"/>
|
||||
<div class="bottomPanel" :class="{fixed:isFullScreen}">
|
||||
<slot v-if="$slots.bottom" name="bottom"/>
|
||||
@@ -31,7 +31,8 @@ export default {
|
||||
conf: Object,
|
||||
instance: {type: Function},
|
||||
maxlength: Number,
|
||||
valid: {type: Boolean, default: true}
|
||||
valid: {type: Boolean, default: true},
|
||||
noBorder: Boolean
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -130,7 +131,6 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
initEditor() {
|
||||
let {placeholder, customConfig} = this
|
||||
@@ -138,6 +138,8 @@ export default {
|
||||
this.ins.config = {...this.ins.config, ...customConfig, placeholder}
|
||||
this.ins.create()
|
||||
customConfig.init.map(e => this.extra?.[e]?.(this))
|
||||
this.value && this.setContent(this.value)
|
||||
|
||||
},
|
||||
setContent(data) {
|
||||
if (this.ins) {
|
||||
@@ -193,8 +195,6 @@ export default {
|
||||
document.querySelector('.AiEditor .placeholder').innerHTML = v
|
||||
}
|
||||
},
|
||||
editing(v) {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
!this.ins && this.initEditor()
|
||||
@@ -207,6 +207,12 @@ export default {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
|
||||
&.noBorder {
|
||||
.w-e-toolbar, .w-e-text-container {
|
||||
border-color: transparent !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* 菜单区 */
|
||||
.w-e-toolbar {
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user