Commit 28f86b73 authored by “yiyousong”'s avatar “yiyousong”

fix:修改富文本样式

parent 5f3b0684
......@@ -13,8 +13,8 @@
</a-upload>
<!-- 富文本 -->
<quill-editor
class="editor"
v-model="content"
class="editor ql-editor"
v-model="value"
ref="myQuillEditor"
:options="editorOption"
@blur="onEditorBlur($event)"
......@@ -105,8 +105,10 @@ export default {
data() {
return {
content: this.value,
quillUpdateImg: false, // 根据图片上传状态来确定是否显示loading动画,刚开始是false,不显示
api: process.env.VUE_APP_API_BASE_URL.includes("base")
? process.env.VUE_APP_API_BASE_URL.replace("base", "")
: process.env.VUE_APP_API_BASE_URL + "/",
editorOption: {
theme: "snow", // or 'bubble'
placeholder: "请输入文本......",
......@@ -143,7 +145,7 @@ export default {
},
},
},
serverUrl: process.env.VUE_APP_API_BASE_URL + "/eas/file/upload", // 这里写你要上传的图片服务器地址
serverUrl: process.env.VUE_APP_API_BASE_URL + "/file/commonupload", // 这里写你要上传的图片服务器地址
headers: {
Authorization: local.getLocal("token"),
},
......@@ -159,7 +161,7 @@ export default {
},
onEditorChange() {
//内容改变事件
this.$emit("input", this.content);
this.$emit("input", this.value);
},
// 富文本图片上传前
......@@ -178,11 +180,7 @@ export default {
// 获取光标所在位置
let length = quill.getSelection().index;
// 插入图片 res.url为服务器返回的图片地址
quill.insertEmbed(
length,
"image",
process.env.VUE_APP_API_BASE_URL + "/" + url
);
quill.insertEmbed(length, "image", this.api + url);
// 调整光标到最后
quill.setSelection(length + 1);
} else {
......@@ -197,7 +195,7 @@ export default {
<style>
.editor {
line-height: normal !important;
height: 90%;
height: 90% !important;
}
.SizeTiShi {
font-size: 12px;
......@@ -206,6 +204,10 @@ export default {
/* margin-right: 20px; */
margin-top: 60px;
}
.ql-editor {
padding: 0px !important;
overflow: visible;
}
.ql-snow .ql-tooltip[data-mode="link"]::before {
content: "请输入链接地址:";
}
......
......@@ -64,7 +64,23 @@
import AddField from "../modal/AddField.vue";
import { getTempleteList, deleteTemplete } from "@/services/market";
import { mapMutations } from "vuex";
const columns = [
export default {
props: {
// 应用信息
appInfo: {
type: Object,
required: true,
default: () => {
return {};
},
},
},
components: {
AddField,
},
data() {
const columns = [
{
title: "序号",
width: "65px",
......@@ -75,6 +91,7 @@ const columns = [
{
title: "字段名称",
dataIndex: "fieldName",
ellipsis: true,
},
{
title: "字段编码",
......@@ -83,11 +100,12 @@ const columns = [
{
title: "字段类型",
dataIndex: "fieldType",
ellipsis: true,
},
{
title: "数据类型",
dataIndex: "dataType",
customRender: (text) => {
return <span>{text.dataType ? text.dataType : "--"}</span>;
},
},
{
title: "数据长度",
......@@ -102,22 +120,7 @@ const columns = [
width: "10%",
scopedSlots: { customRender: "action" },
},
];
export default {
props: {
// 应用信息
appInfo: {
type: Object,
required: true,
default: () => {
return {};
},
},
},
components: {
AddField,
},
data() {
];
return {
appId: this.$route.query.id,
columns,
......
......@@ -18,7 +18,7 @@
v-for="(v, i) in form.appInfoFieldList"
:key="v.fieldCode"
:label="v.fieldName"
class="content"
:class="{ content: v.fieldType == 'text' }"
:prop="`appInfoFieldList.${i}.fieldValue`"
:rules="{
required: v.fieldNull ? false : true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment