首页 文章

修复了标签模板上的搜索栏

提问于
浏览
4

我正在使用离子的标签模板 . 我需要成为一个固定的搜索栏,但我找不到如何在标签栏下插入此栏 .

我的应用程序如下:

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

问题是,我将搜索栏放入选项卡内容,这可行,但是,栏不固定,当我滚动列表时,搜索栏也会滚动 .

我需要在列表(目录),搜索栏(固定)之前使用选项卡导航栏,然后向下 .

有人知道我怎么做到这一点?

tabs.html(标签视图):https://paste.kde.org/pbqwtl473

tab-bynames.html(标签内容):https://paste.kde.org/pdxhlcviu

对不起,我的可怜的嫉妒 .

1 回答

  • 3

    将搜索栏放在 <ion-content> 上方,而不是 bar-header 类,使用 bar-subheader class作为搜索栏 . 另外,将 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>
    

相关问题