|
|
@@ -1,14 +1,15 @@
|
|
|
<template>
|
|
|
<view class="book-search">
|
|
|
- <!-- 搜索框 -->
|
|
|
- <view class="search-container">
|
|
|
+ <!-- 搜索框 - 固定在顶部 -->
|
|
|
+ <view class="search-container fixed-top">
|
|
|
<u-search v-model="searchKeyword" placeholder="输入ISBN/书名" :show-action="true" action-text="搜索"
|
|
|
:clearabled="true" @search="handleSearch" @clear="handleClear" @custom="handleSearch"></u-search>
|
|
|
</view>
|
|
|
|
|
|
<!-- 书籍列表 -->
|
|
|
- <page-scroll ref="pageScroll" url="/token/activation/infoList" :immediate="false" :slot-empty="true"
|
|
|
- :params="searchParams" @updateList="handleUpdateList">
|
|
|
+ <view class="content-wrapper">
|
|
|
+ <page-scroll ref="pageScroll" url="/token/activation/infoList" :immediate="false" :slot-empty="true"
|
|
|
+ :params="searchParams" @updateList="handleUpdateList">
|
|
|
<view class="book-list">
|
|
|
<view class="book-item" v-for="(item, index) in bookList" :key="index">
|
|
|
<!-- 书籍封面 -->
|
|
|
@@ -44,6 +45,7 @@
|
|
|
</view>
|
|
|
</template>
|
|
|
</page-scroll>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -117,12 +119,20 @@ export default {
|
|
|
}
|
|
|
|
|
|
.search-container {
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ z-index: 999;
|
|
|
background-color: #fff;
|
|
|
padding: 20rpx 30rpx;
|
|
|
- margin-bottom: 20rpx;
|
|
|
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
|
|
|
}
|
|
|
|
|
|
+.content-wrapper {
|
|
|
+ margin-top: 120rpx; /* 为固定搜索框留出空间 */
|
|
|
+}
|
|
|
+
|
|
|
.book-list {
|
|
|
padding: 0 30rpx;
|
|
|
}
|