机器人
AI摘要
Spark Lite
生成中...

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

在这里插入图片描述

网上有很多方法,比如

1.在组件中引入

html
1
<style src="@wangeditor/editor/dist/css/style.css"></style>

或者

javascript
1
import '@wangeditor/editor/dist/css/style.css'

2.在组件中设置高度

css
1
2
3
::v-deep .w-e-text-container {
height: 420px !important;
}

最后解决我问题的是

3.在组件中设置高度的同时,其次还需注意组件中style标签不能有scope

html
1
2
3
4
5
6
7
8
9
10
<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>

在这里插入图片描述

在这里插入图片描述