fix(接口测试): mock环境禁止编辑
This commit is contained in:
parent
98e7677ad2
commit
d625b60cd4
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue