<template>
  <wd-picker
    :columns="columns"
    :title="title"
    :label="label"
    :size="size"
    v-model="value"
    confirm-button-text="确认"
    :is-show="isShow"
    @confirm="emit('confirm')"
  />
  <!--  -->
</template>

<script setup>
  import { defineEmits } from 'vue'
  defineOptions({
    name: 'PickerInfo',
  })
  const props = defineProps({
    columns: {
      type: Array,
      required: true,
    },
    size: {
      type: String,
      default: '',
    },
    label: {
      type: String,
      default: '',
    },
  }) // 定义事件

  const title = defineModel('title')
  const value = defineModel('value')
  const emit = defineEmits(['confirm']) // 处理 Picker 确认操作
</script>

<style scoped lang="scss">
  ::v-deep .wd-picker__cell {
    padding-right: 32rpx;
    padding-left: 32rpx;
  }
</style>
