MudBlazor:如何从 MudExpansionPanel 中的 TitleContent 中删除填充
MudBlazor: How to remove padding from TitleContent in MudExpansionPanel
希望 TitleContent
与 ChildContent
左对齐。这个扩展面板很紧凑 space,我想删除标题内容的间距,但 DisableGutters
似乎只适用于 ChildContent
:
Screenshot
试试 Mudblazor:
https://try.mudblazor.com/snippet/QEQwYmkTgJGCChXP
提前致谢!
From GitHub MudBlazor Discussions:
你必须使用CSS才能呼出mud-expand-panel-header
class
<style>
.my-panels .mud-expand-panel-header { padding: 0px; }
</style>
<MudExpansionPanels Class="my-panels" Elevation="0" DisableGutters="true" Dense="true">
<MudExpansionPanel Dense="true" Style="padding: 0px;">
<TitleContent>
<MudText Class="mud-text-primary">$[ItemPrice1] [ItemPrice1Label]</MudText>
</TitleContent>
<ChildContent>
<MudText Class="mud-text-primary">$[ItemPrice2] [ItemPrice2Label]</MudText>
<MudText Class="mud-text-primary">$[ItemPrice3] [ItemPrice3Label]</MudText>
</ChildContent>
</MudExpansionPanel>
</MudExpansionPanels>
希望 TitleContent
与 ChildContent
左对齐。这个扩展面板很紧凑 space,我想删除标题内容的间距,但 DisableGutters
似乎只适用于 ChildContent
:
Screenshot
试试 Mudblazor: https://try.mudblazor.com/snippet/QEQwYmkTgJGCChXP
提前致谢!
From GitHub MudBlazor Discussions:
你必须使用CSS才能呼出mud-expand-panel-header
class
<style>
.my-panels .mud-expand-panel-header { padding: 0px; }
</style>
<MudExpansionPanels Class="my-panels" Elevation="0" DisableGutters="true" Dense="true">
<MudExpansionPanel Dense="true" Style="padding: 0px;">
<TitleContent>
<MudText Class="mud-text-primary">$[ItemPrice1] [ItemPrice1Label]</MudText>
</TitleContent>
<ChildContent>
<MudText Class="mud-text-primary">$[ItemPrice2] [ItemPrice2Label]</MudText>
<MudText Class="mud-text-primary">$[ItemPrice3] [ItemPrice3Label]</MudText>
</ChildContent>
</MudExpansionPanel>
</MudExpansionPanels>