diff --git a/src/components/userSelect/src/user.vue b/src/components/userSelect/src/user.vue
index c8a541238754dd8ba33a6bff25a5b068d53a93fc..4134815ba6c6f2678bec6676b455f66a6a1a005a 100644
--- a/src/components/userSelect/src/user.vue
+++ b/src/components/userSelect/src/user.vue
@@ -21,7 +21,8 @@
-
+
+
已选择{{ value ? value.length : 0 }}项
清空
@@ -36,6 +37,11 @@ export default {
name: 'WkUser', // 新建 user
components: { avatarList },
props: {
+ //加一个传递值 stop,父组件判断返回用户为空则为最后一页,不在请求
+ stop:{
+ type: Boolean,
+ default: false
+ },
radio: Boolean,
headerShow: {
type: Boolean,
@@ -110,6 +116,7 @@ export default {
inputValue () {
this.$refs.searchLists.scrollTop = 0
this.page = 1
+ this.$emit('restLoad') //调用父组件重置stop
this.$emit('getData', this.searchInput)
},
handleScroll () {
@@ -118,8 +125,10 @@ export default {
// this.$refs.searchLists.scrollHeight -
// this.$refs.searchLists.scrollTop -
// this.$refs.searchLists.clientHeight;
- this.page = this.page + 1
- this.$emit('getData', this.searchInput, this.page)
+ if(!this.stop){
+ this.page = this.page + 1
+ this.$emit('getData', this.searchInput, this.page,true) //第四个参数用来父组件识别由改子组件调用,用来判断是否获取到空数据进行stop传值
+ }
//自行定义
},
/**