van_uploader.vue 664 B

12345678910111213141516171819202122232425
  1. <template>
  2. <van-uploader
  3. accept="video/*"
  4. :max-count="maxCount"
  5. :max-size="maxSize"
  6. :result-type="resultType"
  7. >
  8. <template #preview-cover>
  9. <van-icon resultType color="#fff" size="40" />
  10. </template>
  11. </van-uploader>
  12. <p style="font-size: 12px; color: #666" v-text="subtitle" />
  13. </template>
  14. <script setup>
  15. import { defineProps, ref } from 'vue';
  16. const props = defineProps({
  17. item: Object,
  18. });
  19. const item = JSON.parse(JSON.stringify(props.item || '{}'));
  20. const subtitle = ref(item.subtitle);
  21. const maxCount = ref(item.attr.maxCount);
  22. const maxSize = ref(item.attr.maxSize);
  23. const resultType = ref(item.attr.resultType);
  24. </script>