<template>
  <u-popup :show="searchVisible" mode="bottom" @close="searchVisible = false">
    <view>
      <contentBox
        warehousingType="1"
        @handleCancel="close"
        @pick="select"
        :chooseList="selectList"
      />
    </view>
  </u-popup>
</template>

<script>
import contentBox from "./contentBox.vue";

export default {
  components: { contentBox },
  props: {
    selectList: {
      type: Array,
      default: function () {
        return [];
      },
    },
  },
  data() {
    return {
      searchVisible: false,
    };
  },
  methods: {
    open() {
      this.searchVisible = true;
    },
    close() {
      this.searchVisible = false;
    },
    select(list) {
      this.$emit("affirm", list);
      this.searchVisible = false;
    },
  },
};
</script>
