这几天在做公司的项目,要求用到富文本编辑器,于是就是用了最为稳定的wangeditor,但由于我用的地方比较多,所以出现这个警告时候,一长串非常烦人:

网上有很多方法,比如
1.在组件中引入
<style src="@wangeditor/editor/dist/css/style.css"></style>
或者
import '@wangeditor/editor/dist/css/style.css'
2.在组件中设置高度
::v-deep .w-e-text-container {
height: 420px !important;
}
最后解决我问题的是
3.在组件中设置高度的同时,其次还需注意组件中style标签不能有scope
<style>
::v-deep .w-e-text-container {
height: 420px !important;
}
.w-e-text-container .w-e-scroll {
height: 500px !important;
-webkit-overflow-scrolling: touch;
}
</style>


2138

被折叠的 条评论
为什么被折叠?



