解决内容为空的问题
This commit is contained in:
@ -290,7 +290,6 @@ export default {
|
||||
'export',
|
||||
'outline',
|
||||
'preview',
|
||||
'format',
|
||||
'devtools'
|
||||
]
|
||||
}],
|
||||
@ -339,7 +338,6 @@ export default {
|
||||
'export',
|
||||
'outline',
|
||||
'preview',
|
||||
'format',
|
||||
'devtools'
|
||||
]
|
||||
}],
|
||||
@ -485,6 +483,15 @@ export default {
|
||||
}
|
||||
|
||||
const editorObj = type === 'editor-reply' ? window.editorReplyObj : window.editorObj
|
||||
const content = editorObj.getValue()
|
||||
|
||||
if (!content || content === '\n') {
|
||||
this.$toasted.show('请输入内容', {
|
||||
position: 'top-center',
|
||||
duration: 5000
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
const { data } = await this.$axios({
|
||||
method: 'post',
|
||||
@ -496,7 +503,7 @@ export default {
|
||||
postID,
|
||||
lastID,
|
||||
parentID,
|
||||
content: editorObj.getValue()
|
||||
content
|
||||
}
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user