Просмотр исходного кода

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

kele 2 лет назад
Родитель
Сommit
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' : '',
     };
   });