Skip to content

Commit

Permalink
fix(upload): close button overflow (#2449)
Browse files Browse the repository at this point in the history
  • Loading branch information
betavs authored Dec 4, 2023
1 parent 8d5429d commit 1e379a0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/upload/__test__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ describe('upload', () => {

// gridConfig: width、 height
expect($gridItemWrapper.dom.getAttribute('style')).toEqual(
`align-self:flex-end;width:${comp.data.gridConfig.width}px;height:${comp.data.gridConfig.height}px`,
`width:${comp.data.gridConfig.width}px;height:${comp.data.gridConfig.height}px`,
);

// gridConfig: column
Expand Down
2 changes: 1 addition & 1 deletion src/upload/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default class Upload extends SuperComponent {
if (!isObject(gridConfig)) gridConfig = {};
const { column = 4, width = 160, height = 160 } = gridConfig as any;
this.setData({
gridItemStyle: `align-self:flex-end;width:${width}rpx;height:${height}rpx`,
gridItemStyle: `width:${width}rpx;height:${height}rpx`,
column: column,
});
}
Expand Down
20 changes: 10 additions & 10 deletions src/upload/upload.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@
{{file.status == 'reload' ? '重新上传' : '上传失败'}}
</view>
</view>
</view>

<!-- 删除 -->
<view
class="{{classPrefix}}__close-btn hotspot-expanded"
bindtap="onDelete"
data-index="{{index}}"
aria-role="button"
aria-label="删除"
>
<t-icon name="close" size="16" color="#fff" />
<!-- 删除 -->
<view
class="{{classPrefix}}__close-btn hotspot-expanded"
bindtap="onDelete"
data-index="{{index}}"
aria-role="button"
aria-label="删除"
>
<t-icon name="close" size="16" color="#fff" />
</view>
</view>
</t-grid-item>

Expand Down

0 comments on commit 1e379a0

Please sign in to comment.