html 格式输出优化

This commit is contained in:
@fawn-nine
2023-07-18 10:33:04 +08:00
parent a8885bf2ee
commit bc61b52a80
3 changed files with 217 additions and 28 deletions

View File

@@ -360,9 +360,12 @@ export default {
element = element.replace(nbsp,"")
ss.push(element)
});
// 去掉最后一个数据
// console.log(pp,ss.slice(0,-1))
this.wordTextArr = ss.slice(0,-1)
// 去掉最后一个空白数据
if(ss[ss.length-1].length <= 0){
this.wordTextArr = ss.slice(0,-1)
}else{
this.wordTextArr = ss
}
this.wordTextArr.length > 0 ? this.wordSubmit() : this.$message.error('Please enter content in the editor before submitting!');
},
// 发送后台