25245
This commit is contained in:
		@@ -1,5 +1,5 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="form">
 | 
			
		||||
  <div class="form-wrapper">
 | 
			
		||||
    <div class="form-content">
 | 
			
		||||
      <add-list ref="addList" v-if="currIndex === 1" @change="onChange"></add-list>
 | 
			
		||||
      <list ref="list" v-if="currIndex === 0" @change="onChange"></list>
 | 
			
		||||
@@ -43,16 +43,6 @@ export default {
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  onLoad() {
 | 
			
		||||
    uni.$on('reload', () => {
 | 
			
		||||
      if (this.currIndex === 0) {
 | 
			
		||||
        this.$refs.list.reload()
 | 
			
		||||
      } else {
 | 
			
		||||
        this.$refs.addList.getList()
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  methods: {
 | 
			
		||||
    onChange(e) {
 | 
			
		||||
      this.$emit('change', e)
 | 
			
		||||
@@ -61,14 +51,13 @@ export default {
 | 
			
		||||
 | 
			
		||||
  onReachBottom() {
 | 
			
		||||
    if (this.currIndex === 0) {
 | 
			
		||||
      this.$refs.list.getList()
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
.form {
 | 
			
		||||
  padding-bottom: 98px;
 | 
			
		||||
.form-wrapper {
 | 
			
		||||
  // padding-bottom: 98px;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user