fix(工作台): 修复一键同步待更新按钮提示信息错误问题

--bug=1045927 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001045927
This commit is contained in:
guoyuqi 2024-09-26 11:22:28 +08:00 committed by Craftsman
parent 4cd6794f3f
commit f0ace86afb
2 changed files with 26 additions and 4 deletions

View File

@ -4,7 +4,7 @@
v-permission="btn.permissions"
:disabled="isDisable(btn)"
:class="btn.class" :row-data="row"
:tip="btn.tip" :icon="btn.icon" :type="btn.type"
:tip="tip(btn)" :icon="btn.icon" :type="btn.type"
:isDivButton="btn.isDivButton" :is-text-button="btn.isTextButton"
:is-more-operate="btn.isMoreOperate" :child-operate="btn.childOperate"
@exec="click(btn)" @click.stop="clickStop(btn)"/>
@ -42,6 +42,13 @@ export default {
}
}
return false;
},
tip(btn) {
if (btn.tip instanceof Function) {
return btn.tip(this.row);
} else {
return btn.tip;
}
}
}
};

View File

@ -407,14 +407,14 @@ export default {
permissions: ['PROJECT_API_DEFINITION:READ+EDIT_CASE']
},
{
tip: this.systemDisable ? this.$t('workstation.no_sync_content') : this.$t('workstation.sync'),
tip: this.systemSyncTip,
icon: "el-icon-refresh",
exec: this.openSyncCase,
isDisable: this.systemDisable,
permissions: ['PROJECT_API_DEFINITION:READ+EDIT_API']
},
{
tip: this.systemDisable ? this.$t('workstation.no_sync_content') : this.$t('workstation.ignore'),
tip: this.systemIgnoreTip,
icon: "el-icon-close",
exec: this.openIgnoreCase,
isDisable: this.systemDisable,
@ -1061,7 +1061,22 @@ export default {
},
systemDisable(row) {
return row.toBeUpdated !== true;
},
systemSyncTip(row){
if (row.toBeUpdated !== true) {
return this.$t('workstation.no_sync_content')
} else {
return this.$t('workstation.sync')
}
},
systemIgnoreTip(row){
if (row.toBeUpdated !== true) {
return this.$t('workstation.no_sync_content')
} else {
return this.$t('workstation.ignore')
}
},
},
};