Преглед изворни кода

su-image组件width判断条件修改

kele пре 2 година
родитељ
комит
3553ee989e
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      sheep/ui/su-image/su-image.vue

+ 1 - 1
sheep/ui/su-image/su-image.vue

@@ -83,7 +83,7 @@
   const customStyle = computed(() => {
     return {
       height: (props.height || state.imgHeight) + 'rpx',
-      width: props.width + 'rpx',
+      width: props.width ? props.width + 'rpx' : '100%',
       borderRadius: props.radius ? props.radius + 'rpx' : '',
     };
   });