Browse Source

img

master
chutingting 1 year ago
parent
commit
ac1b5b70ce
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/components/ueditor/index.vue

+ 2
- 2
src/components/ueditor/index.vue View File

@@ -163,9 +163,9 @@ export default {
if (this.isDisabled) this.editor.options.readonly = true
},
saveImg() {
let imageHtml = '<p><img src=\"' + this.imgUrl + '\"/></p>'
let imageHtml = '<p><img style="display: inline-block;" src=\"' + this.imgUrl + '\"/></p>'
if (this.imgWidth > 800) {
imageHtml = '<p><img width="100%" src=\"' + this.imgUrl + '\"/></p>'
imageHtml = '<p><img width="100%" style="display: inline-block;" src=\"' + this.imgUrl + '\"/></p>'
}
this.editor.execCommand('inserthtml', imageHtml)
this.uploadDiolagVisible = false


Loading…
Cancel
Save