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' ? '重新上传' : '上传失败'}} - - - - + + + +