Commit eb682d1f authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

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