Przeglądaj źródła

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

kele 2 lat temu
rodzic
commit
3553ee989e
1 zmienionych plików z 1 dodań i 1 usunięć
  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(() => {
   const customStyle = computed(() => {
     return {
     return {
       height: (props.height || state.imgHeight) + 'rpx',
       height: (props.height || state.imgHeight) + 'rpx',
-      width: props.width + 'rpx',
+      width: props.width ? props.width + 'rpx' : '100%',
       borderRadius: props.radius ? props.radius + 'rpx' : '',
       borderRadius: props.radius ? props.radius + 'rpx' : '',
     };
     };
   });
   });