学员端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.1 KiB

1 year ago
  1. <template>
  2. <uvImage
  3. :src="src"
  4. :mode="mode"
  5. :width="width"
  6. :height="height"
  7. :shape="shape"
  8. :radius="radius"
  9. :lazyLoad="lazyLoad"
  10. :showMenuByLongpress="showMenuByLongpress"
  11. :loadingIcon="loadingIcon"
  12. :errorIcon="errorIcon"
  13. :showLoading="showLoading"
  14. :showError="showError"
  15. :fade="fade"
  16. :webp="webp"
  17. :duration="duration"
  18. :bgColor="bgColor"
  19. :customStyle="customStyle"
  20. @click="$emit('click')"
  21. @error="$emit('error')"
  22. @load="$emit('load')"
  23. >
  24. <template v-slot:loading>
  25. <slot name="loading"></slot>
  26. </template>
  27. <template v-slot:error>
  28. <slot name="error"></slot>
  29. </template>
  30. </uvImage>
  31. </template>
  32. <script>
  33. /**
  34. * 此组件存在的理由是在nvue下u-image被uni-app官方占用了u-image在nvue中相当于image组件
  35. * 所以在nvue下取名为u--image内部其实还是u-iamge.vue只不过做一层中转
  36. */
  37. import uvImage from '../u-image/u-image.vue';
  38. import props from '../u-image/props.js';
  39. export default {
  40. name: 'u--image',
  41. mixins: [uni.$u.mpMixin, props, uni.$u.mixin],
  42. components: {
  43. uvImage
  44. },
  45. }
  46. </script>