1
,使用此佈局:Nativescript摺疊網格佈局行仍然發生在UI
<GridLayout columns="70, *" rows="auto, auto, auto">
<Label row="0" col="0" rowSpan="3" text="A" style="background-color: red;"></Label>
<Label row="0" col="1" text="B" style="background-color: green;"></Label>
<Label row="1" col="1" text="C" visibility="collapse" style="background-color: blue;"></Label>
<Label row="2" col="1" text="D" style="background-color: orange"></Label>
</GridLayout>
是否有一個原因,我可以看到排B和d之間的空白?我預期的行d上去,走行的地方C.
我期待的結果這樣的表現HTML表格:
<table>
<tbody>
<tr>
<td rowspan="3" style="width: 70px; background-color: red;">A</td>
<td style="width: 500px; background-color: green;">B</td>
</tr>
<tr>
<td style="display: none; background-color: blue;">C</td>
</tr>
<tr>
<td style="background-color: orange;">D</td>
</tr>
</tbody>
</table>
有道理......我忘了,因爲它是在GridLayout本身中定義的,所以無論如何它都會堅持3行。我會按照你的建議去做一個StackLayout,謝謝! – Odubuc
不客氣,快樂編碼 –