|
|
@@ -10,7 +10,7 @@
|
|
|
<view class="selector" @click.stop="toggleDropdownRegion">
|
|
|
<text class="selector-text">{{
|
|
|
region?.regionName || region?.name || "-"
|
|
|
- }}</text>
|
|
|
+ }}</text>
|
|
|
<text class="selector-arrow" :class="{ open: dropdownRegionOpen }"></text>
|
|
|
</view>
|
|
|
<view class="dropdown" v-show="dropdownRegionOpen" :style="dropdownDirection === 'top'
|
|
|
@@ -21,7 +21,8 @@
|
|
|
<input class="dropdown-search-input" v-model="regionSearchText" @input="onRegionSearch"
|
|
|
placeholder="搜索..." />
|
|
|
</view>
|
|
|
- <scroll-view scroll-y="true" class="dropdown-scroll-view" lower-threshold="80" @scrolltolower="loadMoreRegions">
|
|
|
+ <scroll-view scroll-y="true" class="dropdown-scroll-view" lower-threshold="80"
|
|
|
+ @scrolltolower="loadMoreRegions">
|
|
|
<view class="dropdown-item" v-for="(p, i) in regionList" :key="p.regionCode || i" :style="p.regionCode === region?.regionCode
|
|
|
? {
|
|
|
backgroundColor: '#2c69ff',
|
|
|
@@ -50,7 +51,8 @@
|
|
|
<input class="dropdown-search-input" v-model="productSearchText" @input="onProductSearch"
|
|
|
placeholder="搜索..." />
|
|
|
</view>
|
|
|
- <scroll-view scroll-y="true" class="dropdown-scroll-view" lower-threshold="80" @scrolltolower="loadMoreProducts">
|
|
|
+ <scroll-view scroll-y="true" class="dropdown-scroll-view" lower-threshold="80"
|
|
|
+ @scrolltolower="loadMoreProducts">
|
|
|
<view class="dropdown-item" v-for="(p, i) in productList" :key="getUid()" :style="p.drugEntBaseInfoId === product.drugEntBaseInfoId
|
|
|
? {
|
|
|
backgroundColor: '#2c69ff',
|
|
|
@@ -125,17 +127,27 @@
|
|
|
</template>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-if="loading" class="table-body" :style="{ height: 'auto' }">
|
|
|
+ <view v-if="loading" class="no-data-placeholder" :style="{ height: 'auto' }">
|
|
|
<view class="row loading-row">
|
|
|
<view class="loading-wrapper">
|
|
|
<image class="loading-icon" :src="loadingImg" />
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view v-if="!loading && (!list || list.length === 0)">
|
|
|
+ <view v-if="!loading && (!list || list.length === 0)" class="no-data-placeholder">
|
|
|
<EmptyView />
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
+ <view v-if="loading" class="no-data" :style="{ height: 'auto', top: cellHeight }">
|
|
|
+ <view class="row loading-row">
|
|
|
+ <view class="loading-wrapper">
|
|
|
+ <image class="loading-icon" :src="loadingImg" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view v-if="!loading && (!list || list.length === 0)" class="no-data" :style="{ top: cellHeight }">
|
|
|
+ <EmptyView />
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -480,7 +492,7 @@ export default {
|
|
|
// return res;
|
|
|
// },
|
|
|
onScrollToLower(e) {
|
|
|
- if(e?.detail?.direction === 'right') return
|
|
|
+ if (e?.detail?.direction === 'right') return
|
|
|
// if (!Array.isArray(this.list)) this.list = [];
|
|
|
// if (this.list.length - 1 >= this.totalCount) return;
|
|
|
// if (this.isLoading) return;
|
|
|
@@ -785,8 +797,10 @@ export default {
|
|
|
}
|
|
|
|
|
|
.table-scroll-x {
|
|
|
+ position: relative;
|
|
|
margin-top: 12rpx;
|
|
|
width: 100%;
|
|
|
+ min-height: 120rpx;
|
|
|
border-radius: 16rpx;
|
|
|
overflow: visible;
|
|
|
}
|
|
|
@@ -911,4 +925,15 @@ export default {
|
|
|
border-bottom: 12rpx solid #000;
|
|
|
margin: 0 auto;
|
|
|
}
|
|
|
+
|
|
|
+.no-data-placeholder {
|
|
|
+ opacity: 0;
|
|
|
+}
|
|
|
+
|
|
|
+.no-data {
|
|
|
+ position: absolute;
|
|
|
+ top: 76rpx;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+}
|
|
|
</style>
|