vue里外部控制组件wangeditor的高度
组件内部
<template>
<div>
<div :id="id" :style="'height:'+height+'px'"></div>
</div>
</template>
export default {
components: {},
props: {
content: String,
id:String,
height:{ //传入高度
type:Number,
default:200
}
},
<style lang='scss' >
.w-e-text,.w-e-text-container{
height: inherit !important; //继承一下就可以了
min-height: 0 !important;
}
.w-e-text{
overflow-y: scroll; //隐藏底部滑块
}
</style>
引入组件
<wang-edit
:height="105"
:id="div1"
@getContent="getContentdescription"
:content="thirdtext"
></wang-edit>
</