index.vue 559 B

123456789101112131415161718192021222324
  1. <template>
  2. <!-- 无图片 -->
  3. <div class="h-50px flex items-center justify-center bg-gray-3" v-if="!property.imgUrl">
  4. <Icon icon="ep:picture" class="text-gray-8 text-30px!" />
  5. </div>
  6. <el-image class="min-h-30px" v-else :src="property.imgUrl" />
  7. </template>
  8. <script setup lang="ts">
  9. import { ImageBarProperty } from './config'
  10. /** 图片展示 */
  11. defineOptions({ name: 'ImageBar' })
  12. defineProps<{ property: ImageBarProperty }>()
  13. </script>
  14. <style scoped lang="scss">
  15. /* 图片 */
  16. img {
  17. width: 100%;
  18. height: 100%;
  19. display: block;
  20. }
  21. </style>