This commit is contained in:
2024-05-17 18:02:49 +08:00
parent 8407d51fb6
commit b5264dc222
4056 changed files with 308094 additions and 41932 deletions

View File

@@ -2,7 +2,7 @@
<view style="width: 100%; height: 100%">
<scroll-view @scrolltolower="lower" scroll-y="true" class="scroll-Y" v-if="dataList.length > 0">
<view
@click="gotoDetail(item)"
@click="gotoDetail(item,index)"
class="scroll-view-item list_item"
v-for="(item, index) in dataList"
:key="item.id"
@@ -16,13 +16,13 @@
<slot name="leftSlot" :row="item" :item="item" :index="index"> </slot>
<template v-if="isCondition">
<slot name="labelSlot" :row="item"></slot>
<slot name="labelSlot" :row="item" :rowIndex="index"></slot>
</template>
<template v-else>
{{ item[label] }}
</template>
<slot name="rightSlot" :row="item"></slot>
<slot name="rightSlot" :row="item" :rowIndex="index"></slot>
</view>
<image
v-if="!isNoIcon"
@@ -32,6 +32,11 @@
></image>
</view>
</scroll-view>
<u-empty v-else-if="noDataIcon&&isLoadingHide"
:mode="noDataIcon"
:icon="`http://cdn.uviewui.com/uview/empty/${noDataIcon}.png`"
>
</u-empty>
<u-divider v-else text="暂无数据哦~"></u-divider>
</view>
</template>
@@ -39,7 +44,7 @@
<script>
import { mapState } from "vuex";
export default {
props: ["dataList", "label", "isCondition", "isNoIcon","pagination"],
props: ["dataList", "label", "isCondition", "isNoIcon","pagination",'noDataIcon','isLoadingHide'],
data() {
return {};
},
@@ -55,10 +60,10 @@ export default {
lower(){
this.$emit('lower')
},
gotoDetail(data) {
gotoDetail(data,index) {
console.log("index at line 53:", data);
this.$emit("hancleClick", data);
this.$emit("hancleClick", data,index);
},
},
onBackPress() {
@@ -74,6 +79,7 @@ export default {
.list_item {
width: 100%;
padding: 20rpx 30rpx;
font-size: 30rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #e0e0e0;
display: flex;
@@ -85,12 +91,12 @@ export default {
border-bottom: none;
}
.scroll-view-item:nth-child(2n-1) {
background-color: #f0f0f0 !important;
background-color: #f5f5f5 !important;
}
.rightArrow {
width: 30rpx;
height: 30rpx;
width: 40rpx;
height: 40rpx;
// position: absolute;
// right: 30rpx;
// top: 20rpx;