修改问题知识库的富文本粘贴图片

This commit is contained in:
sunFlower
2022-09-16 09:39:20 +08:00
parent 72c1726824
commit 650d7006f4
@@ -308,7 +308,7 @@
}, },
isDisplay: false, isDisplay: false,
disabled: false, disabled: false,
content: '<h2>I am Example</h2>' content: '<h2>I am Example</h2>',
projectNameList: [ projectNameList: [
{ {
value: 'Open', value: 'Open',
@@ -318,7 +318,7 @@
value: 'Privacy', value: 'Privacy',
name: this.$t('Privacy') name: this.$t('Privacy')
} }
], ]
} }
}, },
computed: { computed: {
@@ -359,7 +359,7 @@
} }
}) })
.then((res) => { .then((res) => {
if (res.data.success){ if (res.data.success) {
let quill = this.$refs.myQuillEditor.quill let quill = this.$refs.myQuillEditor.quill
let length = quill.getSelection().index let length = quill.getSelection().index
let fileName = res.data.result.fileName let fileName = res.data.result.fileName
@@ -444,20 +444,17 @@
}, },
backClick() { backClick() {
this.$router.go(-1) this.$router.go(-1)
} },
,
showPermissionsChange(event, name) { showPermissionsChange(event, name) {
if (event == 'Open') { if (event == 'Open') {
this.isDisplay = false this.isDisplay = false
} else { } else {
this.isDisplay = true this.isDisplay = true
} }
} },
,
onEditorBlur(quill) { onEditorBlur(quill) {
console.log('editor blur!', quill) console.log('editor blur!', quill)
} },
,
onEditorFocus(quill) { onEditorFocus(quill) {
console.log('editor focus!', quill) console.log('editor focus!', quill)
}, },
@@ -517,8 +514,7 @@
this.$refs.uploadFile.perentHandleFunc() this.$refs.uploadFile.perentHandleFunc()
} }
}) })
} },
,
/** 上传文件的回调 */ /** 上传文件的回调 */
uploadSuccess(data) { uploadSuccess(data) {
let attIdList = [] let attIdList = []
@@ -530,8 +526,7 @@
/** 赋值给当前对应的表单文件 */ /** 赋值给当前对应的表单文件 */
this.formInline[this.uploadName] = attIdList.join(',') this.formInline[this.uploadName] = attIdList.join(',')
this.formInline = { ...this.formInline } this.formInline = { ...this.formInline }
} },
,
submit() { submit() {
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {