BUG 26948

This commit is contained in:
aixianling
2022-01-25 16:08:27 +08:00
parent b34bd79df7
commit 1c26780400
2 changed files with 17 additions and 17 deletions

View File

@@ -1,9 +1,10 @@
<template>
<div class="add" v-if="isShow">
<div class="add">
<div class="header-description">
<u-form :model="forms" ref="uForm" label-width="auto">
<u-form-item label="标题" prop="title" required label-position="top">
<u-input v-model="forms.title" :focus="true" placeholder="请输入标题(30字以内)" type="textarea" auto-height height="60"
<u-input v-model="forms.title" :focus="true" placeholder="请输入标题(30字以内)" type="textarea" auto-height
height="60"
maxlength="30"/>
</u-form-item>
@@ -54,7 +55,6 @@ export default {
id: '',
forms: {
title: '',
content: '',
areaId: '',
selectIndex: '',
files: []
@@ -66,7 +66,6 @@ export default {
listName: '',
selectList: [],
isHideCoverimg: false,
isShow: false
}
},
computed: {...mapState(['user'])},
@@ -78,7 +77,6 @@ export default {
}
if (!o.id) {
this.forms.areaId = this.user.areaId
this.isShow = true
}
this.listName = o.listName
this.getType()
@@ -86,9 +84,6 @@ export default {
onShow() {
document.title = this.listName
},
mounted() {
},
methods: {
getModuleInfo() {
this.$http.post(`/app/appcontentmoduleinfo/queryDetailById?id=${this.moduleId}`).then(res => {
@@ -100,7 +95,7 @@ export default {
getDetail() {
this.$http.post(`/app/appcontentinfo/queryDetailById?id=${this.id}`).then((res) => {
if (res?.data) {
this.forms = {...res.data}
this.forms = res.data
if (this.selectList.length) {
this.selectList.map((item, index) => {
if (item.id == res.data.categoryId) {
@@ -111,13 +106,12 @@ export default {
if (res.data.images) {
this.forms.images = JSON.parse(res.data.images || '[]')
}
this.isShow = true
}
})
},
getType() {
this.$http.post(`/app/appcontentmoduleinfo/listByName?names=${this.listName}`).then((res) => {
if (res.code == 0) {
if (res?.code == 0) {
if (res.data && res.data.length) {
this.selectList = res.data[0].categoryList
this.selectList.map((item, index) => {

View File

@@ -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;