BUG 26948
This commit is contained in:
@@ -1,9 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="add" v-if="isShow">
|
<div class="add">
|
||||||
<div class="header-description">
|
<div class="header-description">
|
||||||
<u-form :model="forms" ref="uForm" label-width="auto">
|
<u-form :model="forms" ref="uForm" label-width="auto">
|
||||||
<u-form-item label="标题" prop="title" required label-position="top">
|
<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"/>
|
maxlength="30"/>
|
||||||
</u-form-item>
|
</u-form-item>
|
||||||
|
|
||||||
@@ -54,7 +55,6 @@ export default {
|
|||||||
id: '',
|
id: '',
|
||||||
forms: {
|
forms: {
|
||||||
title: '',
|
title: '',
|
||||||
content: '',
|
|
||||||
areaId: '',
|
areaId: '',
|
||||||
selectIndex: '',
|
selectIndex: '',
|
||||||
files: []
|
files: []
|
||||||
@@ -66,7 +66,6 @@ export default {
|
|||||||
listName: '',
|
listName: '',
|
||||||
selectList: [],
|
selectList: [],
|
||||||
isHideCoverimg: false,
|
isHideCoverimg: false,
|
||||||
isShow: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {...mapState(['user'])},
|
computed: {...mapState(['user'])},
|
||||||
@@ -78,7 +77,6 @@ export default {
|
|||||||
}
|
}
|
||||||
if (!o.id) {
|
if (!o.id) {
|
||||||
this.forms.areaId = this.user.areaId
|
this.forms.areaId = this.user.areaId
|
||||||
this.isShow = true
|
|
||||||
}
|
}
|
||||||
this.listName = o.listName
|
this.listName = o.listName
|
||||||
this.getType()
|
this.getType()
|
||||||
@@ -86,9 +84,6 @@ export default {
|
|||||||
onShow() {
|
onShow() {
|
||||||
document.title = this.listName
|
document.title = this.listName
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
getModuleInfo() {
|
getModuleInfo() {
|
||||||
this.$http.post(`/app/appcontentmoduleinfo/queryDetailById?id=${this.moduleId}`).then(res => {
|
this.$http.post(`/app/appcontentmoduleinfo/queryDetailById?id=${this.moduleId}`).then(res => {
|
||||||
@@ -100,7 +95,7 @@ export default {
|
|||||||
getDetail() {
|
getDetail() {
|
||||||
this.$http.post(`/app/appcontentinfo/queryDetailById?id=${this.id}`).then((res) => {
|
this.$http.post(`/app/appcontentinfo/queryDetailById?id=${this.id}`).then((res) => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
this.forms = {...res.data}
|
this.forms = res.data
|
||||||
if (this.selectList.length) {
|
if (this.selectList.length) {
|
||||||
this.selectList.map((item, index) => {
|
this.selectList.map((item, index) => {
|
||||||
if (item.id == res.data.categoryId) {
|
if (item.id == res.data.categoryId) {
|
||||||
@@ -111,13 +106,12 @@ export default {
|
|||||||
if (res.data.images) {
|
if (res.data.images) {
|
||||||
this.forms.images = JSON.parse(res.data.images || '[]')
|
this.forms.images = JSON.parse(res.data.images || '[]')
|
||||||
}
|
}
|
||||||
this.isShow = true
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getType() {
|
getType() {
|
||||||
this.$http.post(`/app/appcontentmoduleinfo/listByName?names=${this.listName}`).then((res) => {
|
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) {
|
if (res.data && res.data.length) {
|
||||||
this.selectList = res.data[0].categoryList
|
this.selectList = res.data[0].categoryList
|
||||||
this.selectList.map((item, index) => {
|
this.selectList.map((item, index) => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="AiEditor" @click="editing=true">
|
<div class="AiEditor" :class="{noBorder}" @click="editing=true">
|
||||||
<div ref="AiEditorInstance" style="-webkit-user-select:text;"/>
|
<div ref="AiEditorInstance" style="-webkit-user-select:text;"/>
|
||||||
<div class="bottomPanel" :class="{fixed:isFullScreen}">
|
<div class="bottomPanel" :class="{fixed:isFullScreen}">
|
||||||
<slot v-if="$slots.bottom" name="bottom"/>
|
<slot v-if="$slots.bottom" name="bottom"/>
|
||||||
@@ -31,7 +31,8 @@ export default {
|
|||||||
conf: Object,
|
conf: Object,
|
||||||
instance: {type: Function},
|
instance: {type: Function},
|
||||||
maxlength: Number,
|
maxlength: Number,
|
||||||
valid: {type: Boolean, default: true}
|
valid: {type: Boolean, default: true},
|
||||||
|
noBorder: Boolean
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -130,7 +131,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
initEditor() {
|
initEditor() {
|
||||||
let {placeholder, customConfig} = this
|
let {placeholder, customConfig} = this
|
||||||
@@ -138,6 +138,8 @@ export default {
|
|||||||
this.ins.config = {...this.ins.config, ...customConfig, placeholder}
|
this.ins.config = {...this.ins.config, ...customConfig, placeholder}
|
||||||
this.ins.create()
|
this.ins.create()
|
||||||
customConfig.init.map(e => this.extra?.[e]?.(this))
|
customConfig.init.map(e => this.extra?.[e]?.(this))
|
||||||
|
this.value && this.setContent(this.value)
|
||||||
|
|
||||||
},
|
},
|
||||||
setContent(data) {
|
setContent(data) {
|
||||||
if (this.ins) {
|
if (this.ins) {
|
||||||
@@ -193,8 +195,6 @@ export default {
|
|||||||
document.querySelector('.AiEditor .placeholder').innerHTML = v
|
document.querySelector('.AiEditor .placeholder').innerHTML = v
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
editing(v) {
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
!this.ins && this.initEditor()
|
!this.ins && this.initEditor()
|
||||||
@@ -207,6 +207,12 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
&.noBorder {
|
||||||
|
.w-e-toolbar, .w-e-text-container {
|
||||||
|
border-color: transparent !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* 菜单区 */
|
/* 菜单区 */
|
||||||
.w-e-toolbar {
|
.w-e-toolbar {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user