This commit is contained in:
yanran200730
2022-08-01 09:42:15 +08:00
parent 27c4ae42d0
commit db2e3811f5
4 changed files with 44 additions and 36 deletions

View File

@@ -164,17 +164,19 @@
},
confirm () {
if (!this.content) {
return false
}
if (this.currIndex >= 0) {
this.richList[this.currIndex].value = this.content
if (!this.content) {
this.richList.splice(this.currIndex, 1)
} else {
this.richList[this.currIndex].value = this.content
}
} else {
this.richList.push({
type: 'text',
value: this.content
})
if (this.content) {
this.richList.push({
type: 'text',
value: this.content
})
}
}
this.isShowText = false

View File

@@ -174,17 +174,19 @@
},
confirm () {
if (!this.content) {
return false
}
if (this.currIndex >= 0) {
this.richList[this.currIndex].value = this.content
if (!this.content) {
this.richList.splice(this.currIndex, 1)
} else {
this.richList[this.currIndex].value = this.content
}
} else {
this.richList.push({
type: 'text',
value: this.content
})
if (this.content) {
this.richList.push({
type: 'text',
value: this.content
})
}
}
this.isShowText = false

View File

@@ -195,17 +195,19 @@
},
confirm () {
if (!this.content) {
return false
}
if (this.currIndex >= 0) {
this.richList[this.currIndex].value = this.content
if (!this.content) {
this.richList.splice(this.currIndex, 1)
} else {
this.richList[this.currIndex].value = this.content
}
} else {
this.richList.push({
type: 'text',
value: this.content
})
if (this.content) {
this.richList.push({
type: 'text',
value: this.content
})
}
}
this.isShowText = false

View File

@@ -165,17 +165,19 @@
},
confirm () {
if (!this.content) {
return false
}
if (this.currIndex >= 0) {
this.richList[this.currIndex].value = this.content
if (!this.content) {
this.richList.splice(this.currIndex, 1)
} else {
this.richList[this.currIndex].value = this.content
}
} else {
this.richList.push({
type: 'text',
value: this.content
})
if (this.content) {
this.richList.push({
type: 'text',
value: this.content
})
}
}
this.isShowText = false