浏览代码

Signed-off-by: 1004749546@qq.com <1004749546@qq.com>
修改

1004749546@qq.com 4 年之前
父节点
当前提交
7c75e25f0c
共有 2 个文件被更改,包括 15 次插入2 次删除
  1. 6 1
      components/uni-check-list/uni-check-list.vue
  2. 9 1
      pages/toDoList/chooseReceiveUser.vue

+ 6 - 1
components/uni-check-list/uni-check-list.vue

@@ -15,7 +15,7 @@
 					<u-icon v-if="showArrow && types != 'views'" name="icon-xian-11" custom-prefix="xd-icon" size="28" color="#888888"></u-icon>
 				</view>
 			</view>
-			<view style="padding-top: 10vh;" v-if="list.length==0">
+			<view style="padding-top: 10vh;" v-if="list.length==0 && status!='loading'">
 				<u-empty :text="noDataText" mode="list"></u-empty>
 			</view>
 		</view>
@@ -49,6 +49,11 @@ export default {
 			type: String,
 			default: '暂无数据'
 		},
+		// 是否在加载中
+		status: {
+			type: String,
+			default: 'onmore'
+		},
 		// 是否显示右边箭头
 		showArrow: {
 			type: Boolean,

+ 9 - 1
pages/toDoList/chooseReceiveUser.vue

@@ -16,6 +16,7 @@
 	:showArrow="false" 
 	:defValue="value" 
 	:types="type" 
+	:status="status"
 	:noDataText="noDataText"
 	backValue="objArr"
 	@ok="chooseOk">
@@ -30,7 +31,8 @@
 				list: [],
 				value: [],
 				noDataText: '暂无抄送人数据',
-				type: ''  // 单选或多选
+				type: '',  // 单选或多选
+				status: 'loading'
 			}
 		},
 		onLoad(opts) {
@@ -38,12 +40,18 @@
 			this.type = opts.type && opts.type || 'checkbox'
 			console.log(this.value)
 			// 查询用户列表
+			this.status = 'loading'
+			uni.showLoading({
+				title: '加载中...'
+			})
 			findUserList({}).then(res=>{
 				if(res.status == 200){
 					this.list = res.data || []
 				} else {
 					this.noDataText = res.message
 				}
+				this.status = 'nomore'
+				uni.hideLoading()
 			})
 		},
 		methods: {