fix(测试跟踪): 测试计划用例评论点击取消依然会显示修改后信息
--bug=1018700 --user=陈建星 【测试跟踪】测试计划用例评论点击关闭依然会保存评论信息 https://www.tapd.cn/55049933/s/1273105
This commit is contained in:
parent
d50272d367
commit
2b25364e21
|
@ -38,6 +38,7 @@
|
|||
:title="$t('commons.edit')"
|
||||
:destroy-on-close="true"
|
||||
:close-on-click-modal="false"
|
||||
@close="handleClose"
|
||||
append-to-body>
|
||||
|
||||
<div>
|
||||
|
@ -78,8 +79,9 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
imgDescription: "",
|
||||
imgDescription: '',
|
||||
imageIndex: 99999,
|
||||
originDesc: '',
|
||||
src: "",
|
||||
srcList: [],
|
||||
imgNameList: [],
|
||||
|
@ -145,6 +147,7 @@ export default {
|
|||
});
|
||||
},
|
||||
openEdit() {
|
||||
this.originDesc = this.comment.description;
|
||||
if (getCurrentUser().id !== this.comment.author) {
|
||||
this.$warning(this.$t('test_track.comment.cannot_edit'));
|
||||
return;
|
||||
|
@ -155,11 +158,15 @@ export default {
|
|||
editComment() {
|
||||
this.$post(this.apiUrl + "/comment/edit", {id: this.comment.id, description: this.comment.description})
|
||||
.then(() => {
|
||||
this.originDesc = this.comment.description;
|
||||
this.visible = false;
|
||||
this.$success(this.$t('commons.modify_success'));
|
||||
this.$emit("refresh");
|
||||
});
|
||||
},
|
||||
handleClose() {
|
||||
this.comment.description = this.originDesc;
|
||||
},
|
||||
checkImage() {
|
||||
this.srcList = [];
|
||||
let param = this.comment.description;
|
||||
|
|
Loading…
Reference in New Issue