imageconver.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <view class="imageBGV">
  3. <image class="imagesize" :src="defimagSrc=='/static/defimages/ddd.png'?defimagSrc:baseUrl+imagSrc" mode="scaleToFill" @error="imageError(imagSrc)"></image>
  4. <view v-if="isyouhui" class="manjianB">
  5. <text>{{youhuinote}}</text>
  6. <image style="width: 30rpx;height: 30rpx;top: 4rpx;" src="/static/images/huorer@3x.png" mode="scaleToFill"></image>
  7. </view>
  8. <view class="remenfile" :style="isyouhui?'margin-top: -190rpx;':'margin-top: -260rpx;'">
  9. <uni-icons v-if="isremen" custom-prefix="custom-icon" color="#E02F73" type="fire-filled" size="26" ></uni-icons>
  10. </view>
  11. <!-- <view v-if="isremen" class="tuijianB" :style="isyouhui?'margin-top: -190rpx;':'margin-top: -260rpx;'">
  12. <text>{{$t('comp.rementj')}}</text>
  13. </view> -->
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. props:{
  19. imagSrc:'',
  20. isremen:false,
  21. isyouhui:false,
  22. youhuinote:''
  23. },
  24. data() {
  25. return {
  26. baseUrl:this.$baseImagurl,
  27. defimagSrc:''
  28. }
  29. },
  30. methods: {
  31. imageError(index){
  32. this.defimagSrc = '/static/defimages/ddd.png';//默认图片
  33. },
  34. }
  35. }
  36. </script>
  37. <style>
  38. .imageBGV{
  39. background-color:floralwhite;
  40. border: 1rpx solid lightgray;
  41. }
  42. .imagesize{
  43. width: 100%;
  44. height: 100%;
  45. }
  46. .manjianB{
  47. position: absolute;
  48. width: 200rpx;
  49. height: 40rpx;
  50. margin-left: 10rpx;
  51. background-color: #CE366F;
  52. line-height: 40rpx;
  53. font-size: 24rpx;
  54. color: white;
  55. padding-left: 8rpx;
  56. border-radius:0px 10px 10px 0px;
  57. }
  58. .remenfile{
  59. position: absolute;
  60. margin-left: 10rpx;
  61. z-index: 9999;
  62. }
  63. .tuijianB{
  64. position: absolute;
  65. width: 120rpx;
  66. height: 40rpx;
  67. margin-left: 10rpx;
  68. background-color: #CE366F;
  69. line-height: 40rpx;
  70. font-size: 24rpx;
  71. color: white;
  72. padding-left: 8rpx;
  73. border-radius:0px 10px 10px 0px;
  74. }
  75. .textsty{
  76. font-size: 24rpx;
  77. color: white;
  78. padding-left: 8rpx;
  79. padding-right: 12rpx;
  80. background-color: aqua;
  81. }
  82. </style>