|
@@ -1,16 +1,18 @@
|
|
<template>
|
|
<template>
|
|
<!-- 查询区域 -->
|
|
<!-- 查询区域 -->
|
|
- <uni-search-bar class="uni-mt-10" v-model="name" radius="100" v-if="hasSearcBar" :placeholder="placeholder"
|
|
|
|
|
|
+ <uni-search-bar class="mobile-scroll-search" v-model="name" radius="100" v-if="hasSearcBar" :placeholder="placeholder"
|
|
:bgColor="searchBarColor" clearButton="auto" cancelButton="none" @confirm="onSearch" @blur="onSearch" />
|
|
:bgColor="searchBarColor" clearButton="auto" cancelButton="none" @confirm="onSearch" @blur="onSearch" />
|
|
<!-- tab选择区域 -->
|
|
<!-- tab选择区域 -->
|
|
- <view class="lli-status-box" v-if="hasTab">
|
|
|
|
|
|
+ <view class="lli-status-box" v-if="hasTab"
|
|
|
|
+>
|
|
<text :class="['status-item', activeTab === item.value? 'click':'' ]" v-for="item in tabList" :key="item.value"
|
|
<text :class="['status-item', activeTab === item.value? 'click':'' ]" v-for="item in tabList" :key="item.value"
|
|
@click="onTavChange(item)">{{item.label}}</text>
|
|
@click="onTavChange(item)">{{item.label}}</text>
|
|
</view>
|
|
</view>
|
|
<!-- 无限滚动区域 -->
|
|
<!-- 无限滚动区域 -->
|
|
- <scroll-view class="mobile-scroll-box" :scroll-y="true" :refresher-enabled="true" :refresher-triggered="triggered"
|
|
|
|
|
|
+ <scroll-view :scroll-y="true" :refresher-enabled="true" :refresher-triggered="triggered"
|
|
:refresher-threshold="100" refresher-background="#F3F3F4" @refresherrefresh="onRefresh"
|
|
:refresher-threshold="100" refresher-background="#F3F3F4" @refresherrefresh="onRefresh"
|
|
- @scrolltolower="onReachBottom" @refresherrestore="onRestore">
|
|
|
|
|
|
+ @scrolltolower="onReachBottom" @refresherrestore="onRestore"
|
|
|
|
+ :style="{ height: `calc(100vh - ${statusBarHeight}px - 264rpx);`}">
|
|
<slot :list="list"></slot>
|
|
<slot :list="list"></slot>
|
|
<uni-load-more :status="status" :contentText="contentText"></uni-load-more>
|
|
<uni-load-more :status="status" :contentText="contentText"></uni-load-more>
|
|
|
|
|
|
@@ -30,6 +32,7 @@
|
|
onLoad
|
|
onLoad
|
|
} from "@dcloudio/uni-app"
|
|
} from "@dcloudio/uni-app"
|
|
|
|
|
|
|
|
+ const statusBarHeight = ref(0);
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
refreshFn: {
|
|
refreshFn: {
|
|
type: Function,
|
|
type: Function,
|
|
@@ -104,7 +107,13 @@
|
|
|
|
|
|
return total.value === list.value.length
|
|
return total.value === list.value.length
|
|
})
|
|
})
|
|
-
|
|
|
|
|
|
+ onMounted(() => {
|
|
|
|
+ uni.getSystemInfo({
|
|
|
|
+ success: (res) => {
|
|
|
|
+ statusBarHeight.value = res.statusBarHeight;
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ });
|
|
// 重置
|
|
// 重置
|
|
function reset() {
|
|
function reset() {
|
|
list.value = [];
|
|
list.value = [];
|
|
@@ -202,8 +211,3 @@
|
|
})
|
|
})
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style lang="scss">
|
|
|
|
- .scroll-container {
|
|
|
|
- height: calc(100vh - 220rpx)
|
|
|
|
- }
|
|
|
|
-</style>
|
|
|