我在删除每个列表项后的分隔线时遇到问题,并且无法更改分隔线颜色。
我在 Listview 标签和 CSS 中尝试了 separatorColor="transparent" 属性,但它们都不起作用。我也尝试过 SeparatorVisibility="None" 属性,但没有运气。
我已经尝试过GitHub 提供的这个解决方案,但它不起作用。
这是代码:
<GridLayout row="1" class="shop-list-container">
<ListView [items]="rewardsPageData?.shops" class="list-group" height="{{rewardsPageData?.shops?.length * 75}}" separatorColor="transparent">
<ng-template let-shop="item">
<GridLayout class="shop-item list-group-item" columns="2*, 6*, 2*" rows="*, auto" (tap)="goToShopDetails(shop.id)">
<Image src="{{shop.logoImageUrl}}" class="thumb img-circle" col="0" row="0" rowSpan="2" horizontalAlignment="left"></Image>
<Label class="shop-name" [text]="shop.title" row="0" col="1"></Label>
<Label class="shop-type" text="{{shop?.category}}" row="1" col="1"></Label>
<Label text="See location" class="see-location-text" textWrap="true" col="2" row="0" rowSpan="2" horizontalAlignment="right"></Label>
</GridLayout>
</ng-template>
</ListView>
</GridLayout>
Run Code Online (Sandbox Code Playgroud)