tijiao 数字公式不实时渲染
This commit is contained in:
@@ -148,6 +148,19 @@
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="Figure Title :">
|
||||
<common-content
|
||||
:isAutomaticUpdate="true"
|
||||
:value="picStyle.title"
|
||||
@getContent="getContent"
|
||||
@openLatexEditor="openLatexEditor"
|
||||
v-if="pictVisible"
|
||||
@updateChange="(res) => updateChange(res, 'imgTitle')"
|
||||
:height="200"
|
||||
ref="tinymceChildImgTitle"
|
||||
style="margin-left: -115px"
|
||||
></common-content>
|
||||
</el-form-item>
|
||||
<el-form-item label="Figure Describe :">
|
||||
<common-content
|
||||
:isAutomaticUpdate="true"
|
||||
@@ -761,7 +774,7 @@ export default {
|
||||
|
||||
setTimeout(() => {
|
||||
if (typeof renderMathJax === 'function') {
|
||||
this.window.renderMathJax(editorId);
|
||||
// this.window.renderMathJax(editorId);
|
||||
}
|
||||
}, 10);
|
||||
}
|
||||
@@ -1117,7 +1130,7 @@ export default {
|
||||
},
|
||||
handleFileChange(event) {
|
||||
var that = this;
|
||||
|
||||
|
||||
// 处理文件上传并传递回调函数
|
||||
this.$commonJS.handleFileUpload(event, function (tables) {
|
||||
console.log('tables at line 786:', tables);
|
||||
@@ -1238,7 +1251,7 @@ export default {
|
||||
});
|
||||
},
|
||||
handleImageAdd(type) {
|
||||
this.picStyle = { note: '', picUrl: '' };
|
||||
this.picStyle = { note: '', picUrl: '', title: '' };
|
||||
this.picStyle.visiTitle = 'Add Figure';
|
||||
this.pictVisible = true;
|
||||
},
|
||||
@@ -1286,6 +1299,8 @@ export default {
|
||||
var str = this.$commonJS.transformHtmlString(content);
|
||||
if (type == 'imgNote') {
|
||||
this.picStyle.note = str;
|
||||
} else if (type == 'imgTitle') {
|
||||
this.picStyle.title = str;
|
||||
} else {
|
||||
this.lineStyle[type] = str;
|
||||
}
|
||||
@@ -1310,7 +1325,7 @@ export default {
|
||||
} else {
|
||||
}
|
||||
this.currentContent = { ...data, extension: extension };
|
||||
this.picStyle = { ...data, extension: extension, picUrl: data.image.url, note: data.image.note };
|
||||
this.picStyle = { ...data, extension: extension, picUrl: data.image.url, note: data.image.note, title: data.image.title };
|
||||
this.picStyle.visiTitle = 'Edit Figure';
|
||||
this.pictVisible = true;
|
||||
} else if (data.type == 2) {
|
||||
@@ -1658,14 +1673,16 @@ export default {
|
||||
// 确定保存图片
|
||||
async savePic() {
|
||||
this.picStyle.picUrl;
|
||||
var str = this.picStyle.note;
|
||||
str = await this.$commonJS.decodeHtml(str);
|
||||
|
||||
var str = this.picStyle.note?await this.$commonJS.decodeHtml(this.picStyle.note):'';
|
||||
var titleStr = this.picStyle.title?await this.$commonJS.decodeHtml(this.picStyle.title):"";
|
||||
if (this.picStyle.visiTitle == 'Edit Figure') {
|
||||
this.$api
|
||||
.post(this.urlList.editImage, {
|
||||
ami_id: this.picStyle.ami_id,
|
||||
url: this.picStyle.picUrl,
|
||||
note: str
|
||||
note: str,
|
||||
title: titleStr
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
@@ -1690,7 +1707,8 @@ export default {
|
||||
.post(this.urlList.addImage, {
|
||||
article_id: this.articleId,
|
||||
url: this.picStyle.picUrl,
|
||||
note: this.picStyle.note
|
||||
note: str,
|
||||
title: titleStr
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.code == 0) {
|
||||
|
||||
Reference in New Issue
Block a user