Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
fe-data-trusted-space
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
2eb2a94e
authored
2025-01-20 17:22:13 +0800
by
xukangle
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix
1 parent
0f958611
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
3 deletions
src/views/data_asset/registerCatalogManagement.vue
src/views/data_asset/registerCatalogManagement.vue
View file @
2eb2a94
...
...
@@ -299,18 +299,52 @@ const handleCreate = () => {
});
};
// 定义 ref 和响应式高度
const
tableToolsRef
=
ref
<
any
>
(
null
);
const
tableToolsHeight
=
ref
<
any
>
(
0
);
// 获取 TableTools 的高度
const
getTableToolsHeight
=
()
=>
{
const
tableToolsElement
:
any
=
tableToolsRef
.
value
;
if
(
tableToolsElement
)
{
tableToolsHeight
.
value
=
tableToolsElement
.
offsetHeight
-
40
;
}
};
// 在组件挂载后获取初始高度
onMounted
(()
=>
{
// 获取初始高度
nextTick
(()
=>
{
getTableToolsHeight
();
});
// 监听 window resize 事件来更新高度
window
.
addEventListener
(
'resize'
,
handleWindowResize
);
});
// 在组件卸载前移除监听
onBeforeUnmount
(()
=>
{
window
.
removeEventListener
(
'resize'
,
handleWindowResize
);
});
// 处理 window resize 事件
const
handleWindowResize
=
()
=>
{
nextTick
(()
=>
{
getTableToolsHeight
();
// 更新 TableTools 高度
});
};
</
script
>
<
template
>
<div
class=
"container_wrap"
>
<div
class=
"table_tool_wrap"
>
<div
class=
"table_tool_wrap"
ref=
"tableToolsRef"
>
<TableTools
:searchItems=
"searchItemList"
:searchId=
"'register-data-search'"
@
search=
"toSearch"
/>
<div
class=
"tools_btns"
>
<el-button
type=
"primary"
@
click=
"handleCreate"
v-preReClick
>
新建
</el-button>
</div>
</div>
<div
class=
"table_panel_wrap"
:style=
"
{ height: 'calc(100% - 89px)' }">
<div
class=
"data-content"
v-loading=
"listDataLoading"
>
<div
class=
"data-content"
v-loading=
"listDataLoading"
:style=
"
{ height: `calc(100% - ${tableToolsHeight}px)` }"
>
<div
class=
"card-content"
v-if=
"listData.length"
v-for=
"item in listData"
:key=
"item.guid"
@
click=
"handleDataClick(item)"
>
<div
class=
"top-dam-img"
></div>
...
...
@@ -375,7 +409,7 @@ const handleCreate = () => {
}
.data-content
{
height
:
calc
(
100%
-
44px
);
//
height
:
calc
(
100%
-
44px
);
display
:
flex
;
flex-wrap
:
wrap
;
gap
:
20px
20px
;
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment