From a95b1f6e57354b0798c0043f986a44f523723d32 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 04 七月 2025 11:19:59 +0800
Subject: [PATCH] ss
---
admin/src/components/common/RichEditor.vue | 25 +++++++++++++++++++++----
1 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/admin/src/components/common/RichEditor.vue b/admin/src/components/common/RichEditor.vue
index d144c66..33b44f0 100644
--- a/admin/src/components/common/RichEditor.vue
+++ b/admin/src/components/common/RichEditor.vue
@@ -1,7 +1,7 @@
<template>
<div :style="styleEditor">
<Toolbar style="border-bottom: 1px solid #ccc" :editor="editor" :defaultConfig="toolbarConfig" :mode="mode" />
- <Editor style="max-height: 300px;min-height: 100px; overflow-y: hidden;" v-model="html" :defaultConfig="editorConfig" :mode="mode"
+ <Editor style="min-height: 80px; overflow-y: hidden;" v-model="html" :defaultConfig="editorConfig" :mode="mode"
@onCreated="onCreated" @onChange="onChange" />
</div>
</template>
@@ -129,7 +129,7 @@
MENU_CONF: {
// 鍥剧墖涓婁紶
uploadImage: {
- server: process.env.VUE_APP_API_PREFIX + '/visitsAdmin/cloudService/public/upload?folder=richeditor',
+ server: process.env.VUE_APP_API_PREFIX + '/public/uploadLocal?folder=',
fieldName: 'file',
// 鍗曚釜鏂囦欢鐨勬渶澶т綋绉檺鍒讹紝榛樿涓� 2M
maxFileSize: 10 * 1024 * 1024, // 10M
@@ -281,6 +281,10 @@
watch: {
richData: function (value) {
this.html = value
+ console.log("onChange123", value); // onChange 鏃惰幏鍙栫紪杈戝櫒鏈�鏂板唴瀹�
+ this.$nextTick(()=>{
+ this.html = value
+ })
},
readonly: function (value) {
this.readonly = value
@@ -298,7 +302,12 @@
methods: {
// 缂栬緫鍣ㄥ垱寤哄畬姣曟椂鐨勫洖璋冨嚱鏁�
onCreated(editor) {
+ var that =this
this.editor = Object.seal(editor) // 涓�瀹氳鐢� Object.seal() 锛屽惁鍒欎細鎶ラ敊
+ setTimeout(function (){
+ that.html = that.richData
+ // alert(that.html)
+ },15000)
},
// 缂栬緫鍣ㄥ唴瀹广�侀�夊尯鍙樺寲鏃剁殑鍥炶皟鍑芥暟
onChange(editor) {
@@ -314,5 +323,13 @@
}
})
</script>
-<style lang="scss">
-</style>>
+<style>
+::v-deep .w-e-text-container {
+ height: 420px !important;
+}
+.w-e-text-container .w-e-scroll {
+ height: 500px !important;
+ -webkit-overflow-scrolling: touch;
+}
+</style>
+
--
Gitblit v1.9.3