[update 拆分] 译文表格完善
This commit is contained in:
@@ -603,10 +603,15 @@ export default {
|
||||
* @param ueContent
|
||||
*/
|
||||
editTableOk (ueContent) {
|
||||
this.contentList[this.addIndex] = {
|
||||
id: '',
|
||||
type: 'TABLE',
|
||||
[this.currentFieldObj.field]: ueContent[0]
|
||||
// 如果内容和译文有一个有内容,就不进行覆盖
|
||||
if (this.contentList[this.addIndex][this.operateField.content.field] || this.contentList[this.addIndex][this.operateField.translation.field]) {
|
||||
this.contentList[this.addIndex][this.currentFieldObj.field] = ueContent[0]
|
||||
} else {
|
||||
this.contentList[this.addIndex] = {
|
||||
id: '',
|
||||
type: 'TABLE',
|
||||
[this.currentFieldObj.field]: ueContent[0]
|
||||
}
|
||||
}
|
||||
this.contentList = JSON.parse(JSON.stringify(this.contentList))
|
||||
},
|
||||
|
||||
@@ -132,7 +132,9 @@ export default {
|
||||
// 表格确认按钮
|
||||
handleOkTable () {
|
||||
let ueContent = []
|
||||
ueContent = this.ueContent.match(/<table.{0,}?.+?>{0,}?<\/table>/g) || []
|
||||
if (this.ueContent) {
|
||||
ueContent = this.ueContent.match(/<table.{0,}?.+?>{0,}?<\/table>/g) || []
|
||||
}
|
||||
if (ueContent && ueContent.length > 1) {
|
||||
this.$message.warning(this.$t('oneTableAdded'))
|
||||
} else if (!ueContent || ueContent.length < 1) {
|
||||
|
||||
Reference in New Issue
Block a user