From 03a32f1309ef7a18a69c2fd6f94b41414ac72d11 Mon Sep 17 00:00:00 2001 From: konbai <1527468660@qq.com> Date: Sat, 12 Aug 2023 12:41:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20=E5=9C=A8=E7=BA=BF?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=20=E7=BC=96=E8=BE=91=E5=99=A8=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E6=97=A0=E6=B3=95=E4=BD=BF=E7=94=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/assets/icons/svg/rich-text.svg | 1 + ruoyi-ui/src/utils/generator/html.js | 6 ++++++ ruoyi-ui/src/views/tool/build/index.vue | 2 ++ 3 files changed, 9 insertions(+) create mode 100644 ruoyi-ui/src/assets/icons/svg/rich-text.svg diff --git a/ruoyi-ui/src/assets/icons/svg/rich-text.svg b/ruoyi-ui/src/assets/icons/svg/rich-text.svg new file mode 100644 index 00000000..76c45bfe --- /dev/null +++ b/ruoyi-ui/src/assets/icons/svg/rich-text.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ruoyi-ui/src/utils/generator/html.js b/ruoyi-ui/src/utils/generator/html.js index ac7846cd..7b55ecd5 100644 --- a/ruoyi-ui/src/utils/generator/html.js +++ b/ruoyi-ui/src/utils/generator/html.js @@ -271,6 +271,12 @@ const tags = { if (child) child = `\n${child}\n` // 换行 return `<${el.__config__.tag} ${ref} ${fileList} ${action} ${autoUpload} ${multiple} ${beforeUpload} ${listType} ${accept} ${name} ${disabled}>${child}` + }, + tinymce: el => { + const { tag, vModel, placeholder } = attrBuilder(el) + const height = el.height ? `:height="${el.height}"` : '' + const branding = el.branding ? `:branding="${el.branding}"` : '' + return `<${tag} ${vModel} ${placeholder} ${height} ${branding}>` } } diff --git a/ruoyi-ui/src/views/tool/build/index.vue b/ruoyi-ui/src/views/tool/build/index.vue index fb6c0c56..8a279a8a 100644 --- a/ruoyi-ui/src/views/tool/build/index.vue +++ b/ruoyi-ui/src/views/tool/build/index.vue @@ -154,6 +154,7 @@ import CodeTypeDialog from './CodeTypeDialog' import DraggableItem from './DraggableItem' import { getDrawingList, saveDrawingList, getIdGlobal, saveIdGlobal, getFormConf } from '@/utils/db' import loadBeautifier from '@/utils/loadBeautifier' +import Tinymce from '@/components/tinymce/index.vue' import { getForm, addForm, updateForm } from '@/api/workflow/form' import axios from 'axios' import Vue from 'vue'; @@ -165,6 +166,7 @@ let tempActiveData const drawingListInDB = getDrawingList() const formConfInDB = getFormConf() const idGlobal = getIdGlobal() +Vue.component('tinymce', Tinymce) Vue.prototype.$axios = axios export default {