From 1e379a02282ef8756374d7509c9dc2993d31bde8 Mon Sep 17 00:00:00 2001 From: betavs <34408516+betavs@users.noreply.github.com> Date: Mon, 4 Dec 2023 10:15:52 +0800 Subject: [PATCH] fix(upload): close button overflow (#2449) --- src/upload/__test__/index.test.js | 2 +- src/upload/upload.ts | 2 +- src/upload/upload.wxml | 20 ++++++++++---------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/upload/__test__/index.test.js b/src/upload/__test__/index.test.js index f779f4c26..a6642522a 100644 --- a/src/upload/__test__/index.test.js +++ b/src/upload/__test__/index.test.js @@ -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 diff --git a/src/upload/upload.ts b/src/upload/upload.ts index d12b84418..8a34fa3cf 100644 --- a/src/upload/upload.ts +++ b/src/upload/upload.ts @@ -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, }); } diff --git a/src/upload/upload.wxml b/src/upload/upload.wxml index f6c6529c9..ab6714198 100644 --- a/src/upload/upload.wxml +++ b/src/upload/upload.wxml @@ -61,17 +61,17 @@ {{file.status == 'reload' ? '重新上传' : '上传失败'}} - - - - + + + +