style: 功能用例详情和缺陷详情抽屉高度问题

--bug=1039553 --user=吕梦园
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001039553
This commit is contained in:
teukkk 2024-04-18 19:22:19 +08:00 committed by 刘瑞斌
parent 1227fd181d
commit 846d1face4
3 changed files with 25 additions and 20 deletions

View File

@ -87,12 +87,16 @@
onBeforeUnmount(() => { onBeforeUnmount(() => {
window.removeEventListener('keydown', handleGlobalKeyDown); window.removeEventListener('keydown', handleGlobalKeyDown);
}); });
defineExpose({
isActive,
});
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.commentWrapper { .commentWrapper {
box-shadow: 1px -1px 4px rgba(2 2 2 / 10%);
z-index: 101; z-index: 101;
box-shadow: 1px -1px 4px rgba(2 2 2 / 10%);
@apply absolute bottom-0 w-full bg-white px-4 py-4; @apply absolute bottom-0 w-full bg-white px-4 py-4;
} }
</style> </style>

View File

@ -93,19 +93,18 @@
<template #default="{ loading }"> <template #default="{ loading }">
<div <div
ref="wrapperRef" ref="wrapperRef"
class="wrapperRef bg-white" :class="[
:style="{ `${
height: 'calc(100% - 86px)', activeTab === 'comment' && hasAnyPermission(['PROJECT_BUG:READ+COMMENT']) && !commentInputIsActive
}" ? 'h-[calc(100%-72px)]'
> : commentInputIsActive
<MsSplitBox ? 'h-[calc(100%-286px)]'
expand-direction="right" : 'h-full'
:max="0.7" }`,
:min="0.7" 'bg-white',
:size="900" ]"
direction="horizontal"
:class="{ 'left-bug-detail': activeTab === 'comment' }"
> >
<MsSplitBox expand-direction="right" :max="0.7" :min="0.7" :size="900" direction="horizontal">
<template #first> <template #first>
<div class="leftWrapper h-full"> <div class="leftWrapper h-full">
<a-spin :loading="detailLoading" class="w-full"> <a-spin :loading="detailLoading" class="w-full">
@ -208,6 +207,7 @@
</div> </div>
<CommentInput <CommentInput
v-if="activeTab === 'comment' && hasAnyPermission(['PROJECT_BUG:READ+COMMENT'])" v-if="activeTab === 'comment' && hasAnyPermission(['PROJECT_BUG:READ+COMMENT'])"
ref="commentInputRef"
v-model:notice-user-ids="noticeUserIds" v-model:notice-user-ids="noticeUserIds"
:content="commentContent" :content="commentContent"
is-show-avatar is-show-avatar
@ -301,6 +301,9 @@
const detailLoading = ref(false); const detailLoading = ref(false);
const activeTab = ref<string>('detail'); const activeTab = ref<string>('detail');
const commentInputRef = ref<InstanceType<typeof CommentInput>>();
const commentInputIsActive = computed(() => commentInputRef.value?.isActive);
const detailInfo = ref<Record<string, any>>({ match: [] }); // loadBug const detailInfo = ref<Record<string, any>>({ match: [] }); // loadBug
const tags = ref([]); const tags = ref([]);
const platformSystemFields = ref<BugEditCustomField[]>([]); // const platformSystemFields = ref<BugEditCustomField[]>([]); //
@ -779,9 +782,6 @@
:deep(.tags-class .arco-form-item-label-col) { :deep(.tags-class .arco-form-item-label-col) {
justify-content: flex-start !important; justify-content: flex-start !important;
} }
.left-bug-detail {
height: 88%;
}
.tab-pane-container { .tab-pane-container {
@apply flex-1 overflow-y-auto px-4; @apply flex-1 overflow-y-auto px-4;
.ms-scroll-bar(); .ms-scroll-bar();

View File

@ -90,10 +90,7 @@
<template #default="{ loading }"> <template #default="{ loading }">
<div <div
ref="wrapperRef" ref="wrapperRef"
class="wrapperRef bg-white" :class="[`${!commentInputIsActive ? 'h-[calc(100%-72px)]' : 'h-[calc(100%-286px)]'}`, 'bg-white']"
:style="{
height: 'calc(100% - 86px)',
}"
> >
<MsSplitBox :size="900" :max="0.7" :min="0.5" direction="horizontal" expand-direction="right"> <MsSplitBox :size="900" :max="0.7" :min="0.5" direction="horizontal" expand-direction="right">
<template #first> <template #first>
@ -238,6 +235,7 @@
</template> </template>
</MsSplitBox> </MsSplitBox>
<inputComment <inputComment
ref="commentInputRef"
v-model:content="content" v-model:content="content"
v-model:notice-user-ids="noticeUserIds" v-model:notice-user-ids="noticeUserIds"
v-permission="['FUNCTIONAL_CASE:READ+COMMENT']" v-permission="['FUNCTIONAL_CASE:READ+COMMENT']"
@ -340,6 +338,9 @@
showSettingDrawer.value = true; showSettingDrawer.value = true;
} }
const commentInputRef = ref<InstanceType<typeof inputComment>>();
const commentInputIsActive = computed(() => commentInputRef.value?.isActive);
// const tabSettingList = computed(() => { // const tabSettingList = computed(() => {
// return featureCaseStore.tabSettingList; // return featureCaseStore.tabSettingList;
// }); // });