Skip to content

Commit ddcddb9

Browse files
muronggjuzi214032
authored andcommitted
fix(ImagePicker): 修复组件样式问题
由于 GridItem 组件样式修改导致组件样式出错 close #1085
1 parent ee072f0 commit ddcddb9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/image-picker/index.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,8 @@
5151
flex-direction: row;
5252
align-items: center;
5353
justify-content: center;
54+
}
55+
56+
.l-grid-item {
57+
padding: 0 !important;
5458
}

src/image-picker/index.wxml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- image-picker.wxml -->
22
<l-grid row-num="{{ size }}" l-class="l-class">
3-
<l-grid-item wx:for="{{ urls }}" wx:key="index" key="{{ index }}" slot="{{ index }}">
3+
<l-grid-item wx:for="{{ urls }}" wx:key="index" key="{{ index }}" slot="{{ index }}" l-grid-item="l-grid-item">
44
<view class="item l-item-class" catchtap="onPreviewTap" data-index="{{ index }}">
55
<view class="close" data-index="{{ index }}" catchtap="onDelTap">
66
<l-icon name="close" color="#fff" size="22" l-class="close-icon" />
@@ -9,7 +9,7 @@
99
</view>
1010
</l-grid-item>
1111
<!-- add 按钮 -->
12-
<l-grid-item wx:if="{{ showBtn }}">
12+
<l-grid-item wx:if="{{ showBtn }}" l-grid-item="l-grid-item">
1313
<!-- 自定义图片选择按钮 -->
1414
<view class="item l-item-class {{size === 3? 'img': 'min-img'}}" catchtap="onAddTap" wx:if="{{ custom }}">
1515
<slot></slot>

0 commit comments

Comments
 (0)