【发布时间】:2019-11-13 22:52:42
【问题描述】:
您可以在 CodePen 上查看示例。
我有一个 vuetify 数据表和嵌套数据表。
您可以通过单击行项 id 打开嵌套表。
如果您通过选中复选框选择某行 - 将出现附加输入字段。
问题是外表列宽和内表列宽不同,但是我需要内表中的数据在外表数据的正下方。
我试过了:
1.为标题设置相同列的宽度。
2. 两个表只使用一个表头数据。
如果我在内表中显示标题和复选框,它看起来会更好,
但我在内表中不需要它们。
这段代码只是为了通过 StackOverflow 验证。 整个例子都在 CodePen 上。
<v-app id="inspire">
<v-layout>
<v-data-table>
<v-model>
<template slot="items" slot-scope="props">
【问题讨论】:
-
你能解释清楚一点吗
The problem is that the outer table columns width and inner table columns width are different, but I need the data in the inner table right below the data of the outer table. -
我的意思是,列的宽度相同。它应该就像一个带有嵌套行的表。 i.shotnes.com/u/2778/0703/screenshot_16329.png
-
我的意思是,我不知道如何对齐内部数据:i.shotnes.com/u/2778/0703/screenshot_20319.png
标签: html css vue.js datatable vuetify.js