<template>
  <van-uploader
    accept="video/*"
    :max-count="maxCount"
    :max-size="maxSize"
    :result-type="resultType"
  >
    <template #preview-cover>
      <van-icon resultType color="#fff" size="40" />
    </template>
  </van-uploader>
  <p style="font-size: 12px; color: #666" v-text="subtitle" />
</template>

<script setup>
import { defineProps, ref } from 'vue';
const props = defineProps({
  item: Object,
});
const item = JSON.parse(JSON.stringify(props.item || '{}'));
const subtitle = ref(item.subtitle);
const maxCount = ref(item.attr.maxCount);
const maxSize = ref(item.attr.maxSize);
const resultType = ref(item.attr.resultType);
</script>
