首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >有没有办法让ion-segment在iOS和Android上看起来都一样?

有没有办法让ion-segment在iOS和Android上看起来都一样?
EN

Stack Overflow用户
提问于 2019-08-03 10:14:25
回答 1查看 373关注 0票数 3

设置离子段模式后,在离子实验室中渲染后,它们看起来仍然不同。

我试过将离子段和离子工具栏的模式设置为"md“,但它们看起来仍然不同。

https://ibb.co/HV75Ly2这里是它们在设置模式后的图像。

代码语言:javascript
复制
<ion-toolbar mode="md">
    <ion-segment scrollable mode="md">
      <ion-segment-button value="top" checked>
        TOP
      </ion-segment-button>
      <ion-segment-button value="nfl">
        NFL
      </ion-segment-button>
      <ion-segment-button value="nba">
        NBA
      </ion-segment-button>
      <ion-segment-button value="mlb">
        MLB
      </ion-segment-button>
      <ion-segment-button value="nhl">
        NHL
      </ion-segment-button>
      <ion-segment-button value="ncaaf">
        NCAAF
      </ion-segment-button>
      <ion-segment-button value="ncaab">
        NCAAB
      </ion-segment-button>
    </ion-segment>
</ion-toolbar>

我希望ion-segment在两个平台上看起来都像android版本,但目前它们看起来仍然不同。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-08-05 15:07:43

由于离子4测试版之一,您还必须设置每个组件的mode

这也意味着ion-segment-button组件,如:

代码语言:javascript
复制
<ion-toolbar mode="md">
    <ion-segment scrollable mode="md">
      <ion-segment-button mode="md" value="top" checked>
        TOP
      </ion-segment-button>
      <ion-segment-button mode="md" value="nfl">
        NFL
      </ion-segment-button>
      <ion-segment-button mode="md" value="nba">
        NBA
      </ion-segment-button>
      <ion-segment-button mode="md" value="mlb">
        MLB
      </ion-segment-button>
      <ion-segment-button mode="md" value="nhl">
        NHL
      </ion-segment-button>
      <ion-segment-button mode="md" value="ncaaf">
        NCAAF
      </ion-segment-button>
      <ion-segment-button mode="md" value="ncaab">
        NCAAB
      </ion-segment-button>
    </ion-segment>
</ion-toolbar>
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57335004

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档