<template>
  <van-popup position="bottom" v-model="isShow">
    <van-picker
      show-toolbar
      :columns="columns"
      value-key="name"
      @confirm="onConfirm"
    />
  </van-popup>
</template>

<script>
export default {
  props: {
    columns: {
      type: Array,
      default: () => [],
      required: true
    }
  },
  data() {
    return {
      isShow: false,
    }
  },
  methods: {
    show() {
      this.isShow = true
    },
    hide() {
      this.isShow = false
    },
    onConfirm(e) {
      this.$emit('confirm', e)
    }
  },
  computed: {},
}
</script>

<style scoped lang="scss">
</style>
