在vue的项目中引用vue-editor

引入vue-editor的文章很多,参考其他就行,本文记录一个限高不管用的问题

<vue-editor v-model="form.comment"
            useCustomImageHandler
            @image-added="handleImageAdded"
            @image-removed="backImage"
            placeholder="内容至少5个字符"
            :editorToolbar="customToolbar"
            class="editor">
</vue-editor>
<style>
  .editor .ql-editor{
    height: 300px;
  }
</style>

在一个.vue文件里这样写就好了。重点是
① <vue-editor class="editor"></vue-editor>
②<style></style>标签里去掉scoped

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐