Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[table] table如何实现跟随父元素高度变化。实现等高? #743

Open
synctimes163 opened this issue Aug 9, 2024 · 2 comments
Assignees

Comments

@synctimes163
Copy link

这个功能解决了什么问题

[table] table如何实现跟随父元素高度变化。实现等高?后台系统的时候,需要这种布局方式
image

你建议的方案是什么

期望有方案解决,哈哈哈

`

Header,t-table 。怎么跟随 g-bd 高度
<script lang="ts"> export default { name: 'DashboardBase', }; </script> <script setup lang="ts"> import { ref, watch } from 'vue'; const activeRowType = ref('single'); const hover = ref(false); const tableData = getTableData(); const columns = [ { colKey: 'applicant', title: '申请人', width: '100' }, { colKey: 'channel', title: '签署方式' }, { colKey: 'detail.email', title: '邮箱地址', ellipsis: true }, { colKey: 'createTime', title: '申请时间' }, ]; const onActiveChange = (highlightRowKeys, ctx) => { console.log(highlightRowKeys, ctx); }; watch([activeRowType], ([activeRowType]) => { if (!activeRowType) { hover.value = true; } }); function getTableData(total = 5) { const data = []; for (let i = 0; i < total; i++) { data.push({ key: i + 1, applicant: ['贾明', '张三', '王芳'][i % 3], status: i % 3, channel: ['电子签署', '纸质签署', '纸质签署'][i % 3], detail: { email: ['[email protected]', '[email protected]', '[email protected]'][i % 3], }, matters: ['宣传物料制作费用', 'algolia 服务报销', '相关周边制作费', '激励奖品快递费'][i % 4], time: [2, 3, 1, 4][i % 4], createTime: ['2022-01-01', '2022-02-01', '2022-03-01', '2022-04-01', '2022-05-01'][i % 4], }); } return data; } </script> <style scoped> .row-container:not(:last-child) { margin-bottom: 16px; } .g-doc { width: 100%; height: 100%; position: relative; border: solid 10px #e6434e; display: flex; flex-direction: column; .g-hd { height: auto; background-color: azure; } .g-bd { flex: 1; height: 100%; background-color: antiquewhite; &::-webkit-scrollbar { width: 8px; background: transparent; } &::-webkit-scrollbar-thumb { border-radius: 6px; border: 2px solid transparent; background-clip: content-box; background-color: var(--td-scrollbar-color); } } } .page-title { height: 26px; font-family: PingFangSC, PingFang SC; font-weight: 600; font-size: 18px; color: #303133; line-height: 26px; text-align: left; font-style: normal; padding: 20px 0; } </style>

`

Copy link

github-actions bot commented Aug 9, 2024

👋 @synctimes163,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

Copy link

github-actions bot commented Aug 9, 2024

♥️ 有劳 @timi137137 @liweijie0812 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @synctimes163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants