Skip to content

Commit

Permalink
🐛 fix: MImage doesn't work in ios (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
capdiem authored Dec 6, 2023
1 parent 0ee5cca commit 325d348
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</AppBar>

<MNavigationDrawer @bind-Value="_drawer" Fixed Temporary Right Width="315">
<MList Class="menu-list mt-1" Style="height: 100%; overflow-y: auto; padding-top:24px;" Elevation="0" Subheader TwoLine>
<MList Class="menu-list mt-1" Style="height: 100%; overflow-y: auto; padding-top:24px;" Elevation="0" Subheader TwoLine Routable>
@foreach (var item in NavItems)
{
@if (item.IsSubheader)
Expand All @@ -17,15 +17,16 @@
}
else
{
<MListItem Href="@item.Href" Disabled="@item.Disabled" Class="home-menu-hover">
<MListItem Href="@item.Href" Disabled="@item.Disabled" ActiveClass="primary--text" Class="home-menu-hover">
@if (item.Image is not null)
{
<MListItemAvatar Tile Size="40" Class="mt-0 mb-0">
<MImage Src="@item.Image"
alt="@item.Title"
Height="@item.Size"
Width="@item.Size"
Contain />
Contain
Eager />
</MListItemAvatar>
}
<MListItemContent >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
</MButton>
</ActivatorContent>
<ChildContent>
<MImage Src="https://cdn.masastack.com/images/contact-qq.png"
Width="Size">
</MImage>
<img src="https://cdn.masastack.com/images/contact-qq.png"
alt="qq"
width="@Size" />
</ChildContent>
</MMenu>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
</MButton>
</ActivatorContent>
<ChildContent>
<MImage Src="https://cdn.masastack.com/images/contact.png"
Width="Size">
</MImage>
<img src="https://cdn.masastack.com/images/contact.png"
alt="wechat"
Width="@Size" />
</ChildContent>
</MMenu>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@

<div class="home-banner without-carousels d-flex align-center justify-center">
<div class="d-flex justify-center">
<SerializableImage Src="https://cdn.masastack.com/images/logo_big.png"
Class="aboutus__logo" />
<img src="https://cdn.masastack.com/images/logo_big.png"
class="aboutus__banner"
width="320"
height="320"
alt="logo"/>
</div>

<InteractiveMore Class="hidden-md-and-up" MoreText="公司简介" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
Src="@LatestActivity.MobileCover"
Width="@("100%")"
Contain
Eager
@onclick="@(() => GoToDetail(LatestActivity.Id))" />
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
<MCol Cols="12" Lg="6" Class="cover-wrapper">
<MImage Src="https://cdn.masastack.com/images/banner1.png"
Contain
Eager
Style="margin-left: 36px"
Width="@("100%")"
Height="@("100%")" />
Expand All @@ -44,6 +45,7 @@
<MCol Cols="12" Lg="6" Class="cover-wrapper">
<MImage Src="https://cdn.masastack.com/images/banner2.png"
Contain
Eager
Width="@("100%")"
Height="@("100%")" />
</MCol>
Expand All @@ -62,6 +64,7 @@
</MCol>
<MCol Cols="12" Lg="6" Class="cover-wrapper">
<MImage Src="https://cdn.masastack.com/images/banner3.png"
Eager
Contain
Width="@("100%")"
Height="@("100%")" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

<div class="activity-card__desc" @onclick="GoTo">
<MImage Src="@Data.Cover"
Contain>
Contain
Eager>
</MImage>
</div>

Expand All @@ -19,7 +20,7 @@
if (logo is not null)
{
<MAvatar Size="36" Color="#D9D1FF" Class="activity-card__group">
<MImage Src="@logo" Width="20" Height="20" Contain Style="border-radius: 0;"></MImage>
<MImage Src="@logo" Width="20" Height="20" Contain Eager Style="border-radius: 0;"></MImage>
</MAvatar>
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
context.Attrs["class"] = css;
}

@ChildContent.Invoke(context)
@ChildContent?.Invoke(context)
</ActivatorContent>
<ChildContent>
<MList Class="menu-list" Elevation="0" Subheader TwoLine>
<MList Class="menu-list" Elevation="0" Subheader TwoLine Routable>
@foreach (var item in Items)
{
@if (item.IsSubheader)
Expand All @@ -33,12 +33,13 @@
}
else
{
<MListItem Href="@item.Href" Disabled="@item.Disabled" Class="home-menu-hover" OnClick="() => IsShowDocument(item)">
<MListItem Href="@item.Href" ActiveClass="primary--text" Disabled="@item.Disabled" Class="home-menu-hover" OnClick="() => IsShowDocument(item)">
@if (item.Image is not null)
{
<MListItemAvatar Tile Size="40" Class="mt-0 mb-0">
<MImage Src="@item.Image" alt="@item.Title"
Height="@item.Size" Width="@item.Size" Contain />
Height="@item.Size" Width="@item.Size"
Contain Eager />
</MListItemAvatar>
}
<MListItemContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Contain="@Contain"
Style="@Style"
Class="@Class"
Eager
alt="@Alt">
</MImage>

Expand Down

0 comments on commit 325d348

Please sign in to comment.