fix(测试跟踪): 评论富文本输入框展示过小
--bug=1009831 --user=李玉号 【测试跟踪】github#9728,测试用例执行页面,评论区富文本框展示过小 https://www.tapd.cn/55049933/s/1168907 Closes #9728
This commit is contained in:
parent
3756231d5b
commit
b66a63c6ec
|
@ -1,14 +1,16 @@
|
|||
<template>
|
||||
<mavon-editor :id="id" :editable="!disabled" @imgAdd="imgAdd" :default-open="defaultOpen" class="mavon-editor"
|
||||
:xss-options="xssOptions"
|
||||
@change="$emit('change')"
|
||||
:subfield="false" :toolbars="toolbars" :language="language" :toolbarsFlag="disabled ? false : true" @imgDel="imgDel" v-model="data[prop]" ref="md"/>
|
||||
<mavon-editor :id="id" :editable="!disabled" @imgAdd="imgAdd" :default-open="defaultOpen"
|
||||
:xss-options="xssOptions" :style="{'min-height': customMinHeight + 'px'}"
|
||||
@change="$emit('change')"
|
||||
:subfield="false" :toolbars="toolbars" :language="language" :toolbarsFlag="!disabled"
|
||||
@imgDel="imgDel" v-model="data[prop]" ref="md"/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getCurrentUser, getUUID} from "@/common/js/utils";
|
||||
import {deleteMarkDownImg, uploadMarkDownImg} from "@/network/image";
|
||||
import {DEFAULT_XSS_ATTR} from "@/common/js/constants";
|
||||
|
||||
export default {
|
||||
name: "MsMarkDownText",
|
||||
components: {},
|
||||
|
@ -22,6 +24,12 @@ export default {
|
|||
return true;
|
||||
}
|
||||
},
|
||||
customMinHeight: {
|
||||
type: [Number, String],
|
||||
default() {
|
||||
return 20;
|
||||
}
|
||||
},
|
||||
toolbars: {
|
||||
type: Object,
|
||||
default() {
|
||||
|
@ -99,9 +107,6 @@ export default {
|
|||
dt: DEFAULT_XSS_ATTR,
|
||||
em: DEFAULT_XSS_ATTR,
|
||||
blockquote: DEFAULT_XSS_ATTR,
|
||||
// 如果支持视频
|
||||
// audio: ['autoplay', 'controls', 'loop', 'preload', 'src'],
|
||||
// video: ['autoplay', 'controls', 'loop', 'preload', 'src', 'height', 'width']
|
||||
},
|
||||
stripIgnoreTagBody: true
|
||||
},
|
||||
|
@ -130,7 +135,7 @@ export default {
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
if(!this.disabled){
|
||||
if (!this.disabled) {
|
||||
// 点击编辑,失去焦点展示
|
||||
let el = document.getElementById(this.id);
|
||||
if (!this.autoReview) {
|
||||
|
@ -157,11 +162,11 @@ export default {
|
|||
|
||||
},
|
||||
methods: {
|
||||
imgAdd(pos, file){
|
||||
imgAdd(pos, file) {
|
||||
this.result.loading = true;
|
||||
uploadMarkDownImg(file, (response, param) => {
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
let url = '/resource/md/get?fileName=' + param.id + '_' + encodeURIComponent(param.fileName);
|
||||
let url = '/resource/md/get?fileName=' + param.id + '_' + encodeURIComponent(param.fileName);
|
||||
this.$refs.md.$img2Url(pos, url);
|
||||
this.result.loading = false;
|
||||
});
|
||||
|
@ -185,10 +190,6 @@ export default {
|
|||
|
||||
<style scoped>
|
||||
|
||||
.mavon-editor {
|
||||
min-height: 20px;
|
||||
}
|
||||
|
||||
/deep/ .v-note-wrapper {
|
||||
position: initial;
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div v-loading="result.loading">
|
||||
<div class="editors_div_style">
|
||||
<div id="editorsDiv">
|
||||
<ms-mark-down-text prop="description" :data="from" :toolbars="toolbars"/>
|
||||
<ms-mark-down-text prop="description" :data="from" :toolbars="toolbars" custom-min-height="220"/>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<div>
|
||||
<div class="editors_div_style">
|
||||
<div id="editorsDiv">
|
||||
<ms-mark-down-text prop="description" :data="form" :toolbars="toolbars" ref="md"/>
|
||||
<ms-mark-down-text prop="description" :data="form" :toolbars="toolbars" ref="md" custom-min-height="220"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
<div>
|
||||
<div class="editors_div_style">
|
||||
<div id="editorsDiv">
|
||||
<ms-mark-down-text prop="description" :data="comment" :toolbars="toolbars"/>
|
||||
<ms-mark-down-text prop="description" :data="comment" :toolbars="toolbars" :custom-min-height="200"/>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
|
|
Loading…
Reference in New Issue