fix(测试跟踪): 评论富文本输入框展示过小

--bug=1009831 --user=李玉号 【测试跟踪】github#9728,测试用例执行页面,评论区富文本框展示过小
https://www.tapd.cn/55049933/s/1168907

Closes #9728
This commit is contained in:
shiziyuan9527 2022-05-30 17:42:43 +08:00 committed by jianxing
parent 3756231d5b
commit b66a63c6ec
4 changed files with 18 additions and 17 deletions

View File

@ -1,14 +1,16 @@
<template>
<mavon-editor :id="id" :editable="!disabled" @imgAdd="imgAdd" :default-open="defaultOpen" class="mavon-editor"
:xss-options="xssOptions"
<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 ? false : true" @imgDel="imgDel" v-model="data[prop]" ref="md"/>
: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,7 +162,7 @@ export default {
},
methods: {
imgAdd(pos, file){
imgAdd(pos, file) {
this.result.loading = true;
uploadMarkDownImg(file, (response, param) => {
this.$success(this.$t('commons.save_success'));
@ -185,10 +190,6 @@ export default {
<style scoped>
.mavon-editor {
min-height: 20px;
}
/deep/ .v-note-wrapper {
position: initial;
}

View File

@ -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>

View File

@ -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>

View File

@ -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>