Commit eb3ecee4 by 杨明

fixed

1 parent 0c8c4750
......@@ -272,7 +272,7 @@ export default {
},
methods: {
isPreview(preview, type) {
return preview.filter(item => item.attType == type).length
return type ? preview.filter(item => item.attType == type).length : preview.filter(item => item.attType != ATT_TYPE.TEXT).length
},
handleEnlarge(src, type) {
this.dialogVisibleImg = true
......@@ -505,14 +505,14 @@ export default {
const idx = this.previewList.findIndex(item => item.attType == this.ATT_TYPE.TEXT)
if (idx !== -1) {
if (!this.previewList[idx].attContent) {
html = html.replace('\n', '')
html = html.replace('\n', '').replace(/<br\/>/g, '')
}
this.$set(this.previewList, 0, {
attContent: (this.previewList[idx].attContent + html).substring(0, 600),
attType: this.ATT_TYPE.TEXT
})
} else {
html = html.replace('\n', '')
html = html.replace('\n', '').replace(/<br\/>/g, '')
this.previewList.unshift({
attContent: html.substring(0, 600),
attType: this.ATT_TYPE.TEXT
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!