<template>
  <p-modal
    title="容器号"
    :visible="visible"
    :dialogStyle="{ top: '20px' }"
    :width="'50%'"
    @ok="handleOk"
    @cancel="handleCancel"
  >
    <div class="box-p20-bg">
      <p-button
        style="margin-left: 10px"
        v-for="(item, i) in containerArray"
        :key="i"
        type="primary"
        @click="clickEvent(item)"
        >{{ item }}</p-button
      >
    </div>
  </p-modal>
</template>

<script>
export default {
  name: 'containerdialog',
  props: {
    visible: {
      type: Boolean,
      default: false,
    },
    containerArray: {
      type: Array,
      default() {
        return []
      },
    },
  },
  model: {
    prop: 'visible',
    event: 'change',
  },
  data() {
    return {}
  },
  created() {},
  mounted() {},
  methods: {
    handleOk() {},
    handleCancel() {
      this.$emit('change', false)
    },
    clickEvent(item) {
      this.$emit('change', false)
      this.$emit('clickContainer', item)
    },
  },
}
</script>

<style></style>
