Browse Source

编辑器插入图片默认增加100%宽度

master
hupeng 4 years ago
parent
commit
5d94c7c7be
  1. 10
      src/components/editorMaterial/index.vue

10
src/components/editorMaterial/index.vue

@ -149,7 +149,7 @@ import { getPage as materialgroupPage, addObj as materialgroupAdd, delObj as mat
import { getPage, addObj, delObj, putObj } from '@/api/tools/material' import { getPage, addObj, delObj, putObj } from '@/api/tools/material'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import '../../../public/UEditor/dialogs/internal'; import '../../../public/UEditor/dialogs/internal'
export default { export default {
name: 'MaterialList', name: 'MaterialList',
@ -462,12 +462,12 @@ export default {
return isPic && isLt2M return isPic && isLt2M
}, },
sureUrls() { sureUrls() {
let str = ''; let str = ''
this.urls.forEach(item => { this.urls.forEach(item => {
str += '<img width="100%" src="' + item + '">' str += '<img width="100%" src="' + item + '">'
//this.$set(this.value, this.value.length, item) // this.$set(this.value, this.value.length, item)
nowEditor.dialog.close(true); nowEditor.dialog.close(true)
nowEditor.editor.setContent(str, true); nowEditor.editor.setContent(str, true)
}) })
this.listDialogVisible = false this.listDialogVisible = false
} }

Loading…
Cancel
Save