feat: 新增富文本本地引入

This commit is contained in:
Yer
2023-12-01 10:47:33 +08:00
parent 508a00d103
commit 3ec0e9d997
163 changed files with 119248 additions and 43 deletions

View File

@@ -111,12 +111,12 @@
/>
</FormItem>
<FormItem class="form-item-view-el" label="文章内容" prop="content">
<editor
ref="editor"
openXss
v-model="form.content"
:init="{ ...initEditor,height:'800px' }"
></editor>
<tinymec
ref="editor"
openXss
v-model="form.content"
v-if="modalVisible"
></tinymec>
</FormItem>
<FormItem label="是否展示" prop="openStatus">
<i-switch size="large" v-model="form.openStatus">
@@ -146,12 +146,10 @@ import {
seeArticle,
updateArticleStatus,
} from "@/api/pages";
import Editor from "@tinymce/tinymce-vue";
import { initEditor } from "@/components/editor/config";
import tinymec from "@/components/editor/index.vue";
export default {
components: {
editor: Editor,
tinymec: tinymec,
},
props: {
selected: {
@@ -161,7 +159,6 @@ export default {
},
data() {
return {
initEditor: initEditor,
selectedIndex: 99999, // 已选下标
loading: true, // 表单加载状态
modalType: 0, // 添加或编辑标识

View File

@@ -17,12 +17,12 @@
</FormItem>
<FormItem class="form-item-view-el" label="文章内容" prop="content">
<editor
ref="editor"
openXss
v-model="form.article.content"
:init="{ ...initEditor,height:'800px' }"
></editor>
<editor
ref="editor"
openXss
v-model="form.article.content"
v-if="modalVisible"
></editor>
</FormItem>
</Form>
<div slot="footer">
@@ -40,12 +40,12 @@ import {
updatePrivacy,
getPrivacy,
} from "@/api/pages";
import Editor from "@tinymce/tinymce-vue";
import { initEditor } from "@/components/editor/config";
import tinymec from "@/components/editor/index.vue";
export default {
name: "privacy",
components: {
editor: Editor,
editor: tinymec,
},
props: {
selected: {
@@ -55,7 +55,6 @@ export default {
},
data() {
return {
initEditor,
loading: false, // 表单加载状态
modalVisible: false, // 添加或编辑显示
treeDataDefault: [],

View File

@@ -1144,6 +1144,7 @@ export default {
size += item.fileSize * 1.0;
});
this.totalSize = ((size * 1.0) / (1024 * 1024)).toFixed(2) + " MB";
this.$emit("selected", e)
},
},
mounted() {