Vue2中使用wangEditor5

462 阅读1分钟
  • 安装 wangEditor

    npm install @wangeditor/editor --save

    npm install @wangeditor/editor-for-vue --save

  • Editor.vue

  • AddNotice.vue

    #AddNotice width 100% padding 20px .box-card height 100% width 100% .content .btn_wrap width 100% display flex justify-content center margin-top 10px
  • 图片上传接口返回值格式

    { "errno": 0, // 注意:值是数字,不能是字符串 "data": { "url": "xxx", // 图片 src ,必须 "alt": "yyy", // 图片描述文字,非必须 "href": "zzz" // 图片的链接,非必须 } }