.fixed{
position: fixed;
top: 0;
z-index: 9999;
width: 100%;
}
fixed定位+top 0 会让tabs固定在顶部 但是会出现 无法左右滑动问题 这是因为我们没有设置宽度 只要加上width100%就好了 下面是页面代码
<view class="fixed">
<view class="search_box">
<u-input v-model="value" class="search-content" :type="type" :border="border" placeholder="请输入关键词"
style="padding-left: 70upx;" @input="handleInput" />
<u-icon name="search" class="search-icon"></u-icon>
<text style="margin-left: 20upx;">搜索</text>
</view>
<!-- tab -->
<u-tabs class="order-tabs" :list="list" :is-scroll="true" :current="orderStatus" @change="change"
active-color="#C21B1E" inactive-color="#848484" height="88">
</u-tabs>
</view>