ThumbUrl.vue 684 B

12345678910111213141516171819202122232425262728293031
  1. <template>
  2. <span class="thumb">
  3. <Image v-if="fileUrl" :src="fileUrl" :width="104" />
  4. </span>
  5. </template>
  6. <script lang="ts">
  7. import { defineComponent } from 'vue';
  8. import { propTypes } from '/@/utils/propTypes';
  9. import { Image } from 'ant-design-vue';
  10. export default defineComponent({
  11. components: { Image },
  12. props: {
  13. fileUrl: propTypes.string.def(''),
  14. fileName: propTypes.string.def(''),
  15. },
  16. });
  17. </script>
  18. <style lang="less">
  19. .thumb {
  20. img {
  21. position: static;
  22. display: inline-block !important;
  23. width: 40px;
  24. height: 40px;
  25. cursor: zoom-in;
  26. border-radius: 4px;
  27. object-fit: cover;
  28. }
  29. }
  30. </style>