2015-08-31 58 views
4

我正在使用选项卡模板的离子。我需要成为一个固定的搜索栏,但我不知道如何将这个栏插入到标签栏中。固定搜索栏选项卡模板

我的应用程序是这样的:

screen http://esfriki.com/f/s01fb.png

的问题是,我把搜索栏进入选项卡的内容,而这个工作,但,酒吧是不固定的,当我做滚动列表,搜索栏也滚动。

我需要在列表(目录),搜索栏(固定)之前,有标签导航栏,并在下面。

有人知道我该怎么做?

tabs.html(标签查看): https://paste.kde.org/pbqwtl473

制表bynames.html(选项卡的内容): https://paste.kde.org/pdxhlcviu

对不起我enlglish差。

回答

3

将搜索栏放在<ion-content>以上,而不是bar-header类,使用bar-subheader类作为搜索栏。加上类has-subheader<ion-content>。您的代码将是

<ion-view view-title="Buscar por nombres"> 
    <div class="bar bar-subheader bar-dark item-input-inset" no-tap-scroll="true"> 
      <ion-search placeholder="Buscar nombre" min-length="1" model="search"></ion-search> 
    </div> 
    <ion-content has-header="true" has-tabs="true" class=""> 
    //content part 
    </ion-content> 
</ion-view> 
+0

现在我有这个:https://paste.kde.org/pscyzw244和搜索栏消失。 – Exos

+0

好吧,搜索栏消失了,因为它在标签栏下。一个肮脏的解决方案被设置为搜索栏的顶部93px(内容的顶部)和内容137px。 – Exos

+0

是的,因为你的标签栏已经是一个子标题。 –

相关问题