fix(接口测试): mock环境禁止编辑

This commit is contained in:
fit2-zhao 2024-03-20 10:17:30 +08:00 committed by Craftsman
parent 98e7677ad2
commit d625b60cd4
1 changed files with 4 additions and 12 deletions

View File

@ -145,13 +145,16 @@
heightUsed: 644, heightUsed: 644,
debug: true, debug: true,
}); });
const isDisabled = computed(() => !hasAnyPermission(['PROJECT_ENVIRONMENT:READ+UPDATE'])); const isDisabled = computed(
() => !hasAnyPermission(['PROJECT_ENVIRONMENT:READ+UPDATE']) || store.currentEnvDetailInfo.mock
);
const moreActionList: ActionsItem[] = [ const moreActionList: ActionsItem[] = [
{ {
label: t('common.delete'), label: t('common.delete'),
danger: true, danger: true,
eventTag: 'delete', eventTag: 'delete',
disabled: store.currentEnvDetailInfo.mock,
}, },
]; ];
@ -287,17 +290,6 @@
return '-'; return '-';
} }
const tableRef = ref(); const tableRef = ref();
watch(
() => store.currentEnvDetailInfo.mock,
(val) => {
if (val) {
const tempColumn = columns.slice(0, columns.length - 1);
tableRef.value.initColumn(tempColumn);
} else {
tableRef.value.initColumn(columns);
}
}
);
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>