#
whycq
2023-10-06 e1f70a62b31f326a6627d7975b17dd8304af7d90
pages/component/demo.vue
@@ -17,11 +17,20 @@
      
      <hr>
      
      <z-data-list></z-data-list>
      <z-data-list class="data-list" v-for="it in zDataList"  @goDetail='goDetail' :list="it" ></z-data-list>
      <button @click="add">add</button>
      <hr>
      <!-- 垫高 -->
      <view style="height: 100rpx;"></view>
   </view>
</template>
<script>
   import addMat from '../api/addMat.js'
   export default {
      data() {
         return {
@@ -30,10 +39,7 @@
               {name: 'yyy',desc: '托盘码',val: '2',lenCheck: 8,focus: false},
               {name: 'aaa',desc: '物料码',btn: true,btnName: '提取',placeholder: '',val: '1',focus: false}
            ],
            zDataList: [
               {name: 'asd',orderNo: 'CK123',barcode: 'bar321'}
            ]
            zDataList: [],
         }
      },
      methods: {
@@ -41,8 +47,11 @@
         },
         ccc() {
         },
         aaa() {
         async add() {
            let mat = await addMat.addMat()
            if (!addMat.isEmpty(mat)) {
               this.zDataList.push(mat)
            }
         },
         focus() {
            if (this.zInputList[0].focus) {
@@ -59,6 +68,11 @@
               this.zInputList[2].focus = false
            }
            
         },
         goDetail() {
            uni.navigateTo({
               url: '/pages/common/data-list/dataDetail'
            })
         }
      }
      
@@ -66,4 +80,14 @@
</script>
<style>
   .data-list {
   }
   .data-list:last-child {
      margin-bottom: 100px;
   }
   hr {
      margin-top: 10px;
      margin-bottom: 10px;
   }
</style>