提交 10e3d9e3 编写于 作者: changdi.hao's avatar changdi.hao

优化font-size

上级 284b7985
流水线 #37075 已失败 于阶段
...@@ -9,7 +9,7 @@ export const envConfig = { ...@@ -9,7 +9,7 @@ export const envConfig = {
// baseUrl: 'https://test1-sc.yunqueyi.com/', // baseUrl: 'https://test1-sc.yunqueyi.com/',
//baseUrl: 'https://uat-sc.yunqueyi.com/', //baseUrl: 'https://uat-sc.yunqueyi.com/',
baseUrl: 'https://uat-sc.yunqueyi.com/', baseUrl: 'https://dev-sc.yunqueyi.com/',
qiniuFileUrl: "https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1", qiniuFileUrl: "https://dev-sc.yunqueyi.com/contents/admin/qiniu/token1",
qiniuResourceUrl: "https://test1-videos.yunqueyi.com", qiniuResourceUrl: "https://test1-videos.yunqueyi.com",
qiniuImgUrl: "https://test1-file.yunqueyi.com", qiniuImgUrl: "https://test1-file.yunqueyi.com",
......
...@@ -116,7 +116,7 @@ export default { ...@@ -116,7 +116,7 @@ export default {
height: 400 height: 400
} ); } );
if(this.isUpdate) { // 只在修改时监听富文本的Ready事件 if(this.isUpdate) { // 只在修改时监听富文本的Ready事件
CKEDITOR.on('instanceReady', function (event) { CKEDITOR.once('instanceReady', function (event) {
editor = event.editor; editor = event.editor;
// editor.execCommand("toolbarCollapse"); // editor.execCommand("toolbarCollapse");
// editor.setReadOnly(true); //只读 // editor.setReadOnly(true); //只读
...@@ -153,11 +153,12 @@ export default { ...@@ -153,11 +153,12 @@ export default {
} }
if (valid) { if (valid) {
this.ruleForm.content = val; this.ruleForm.content = this.setContent(val);
if(this.isUpdate) { // 修改协议时传协议ID(protocolId) if(this.isUpdate) { // 修改协议时传协议ID(protocolId)
this.ruleForm.protocolId = this.protocolId this.ruleForm.protocolId = this.protocolId
this.ruleForm.protocolType = this.protocolType this.ruleForm.protocolType = this.protocolType
} }
this.addOrUpdateProtocol(this.ruleForm) this.addOrUpdateProtocol(this.ruleForm)
} else { } else {
console.log('error submit!!'); console.log('error submit!!');
...@@ -165,7 +166,14 @@ export default { ...@@ -165,7 +166,14 @@ export default {
} }
}); });
}, },
// 设置上传的协议样式
setContent(content) {
if (content.trim().startsWith('<html>')) {
return content
} else {
return `<html><body style="font-size:36px;margin:40px;padding-bottom:40px;text-align:justfy;word-break:break-all;">${content}</body></html>`
}
},
// 新增或修改协议 // 新增或修改协议
addOrUpdateProtocol(params) { addOrUpdateProtocol(params) {
openLoading(this); openLoading(this);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册