<template>
  <u--image
      :showLoading="true"
      :src="src"
      width="160rpx"
      height="150rpx"
  />
</template>

<script setup lang="ts">
import {computed, defineProps} from 'vue';
import defaultImg from "@/static/aiot/default.png";

const props = defineProps({
  url: {
    type: String,
    default: defaultImg
  },
});
const src = computed(() => {
  if (props.url && props.url !== "") {
    return props.url;
  }
  return defaultImg;
});
</script>
<script lang="ts">
export default {
  options: {
    styleIsolation: 'shared',
    name: "images-h"
  }
}
</script>
<style lang="scss">
</style>