From fb75daed4b868d1b74b6513ce4555bb324a6b8a1 Mon Sep 17 00:00:00 2001 From: "shixing.peng" Date: Fri, 27 May 2022 16:41:21 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E4=B8=8A=E4=BC=A0=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/image-picker/index.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/taro-ui/src/components/image-picker/index.tsx b/packages/taro-ui/src/components/image-picker/index.tsx index e4f19304..1bab7dfd 100644 --- a/packages/taro-ui/src/components/image-picker/index.tsx +++ b/packages/taro-ui/src/components/image-picker/index.tsx @@ -137,14 +137,15 @@ export default class AtImagePicker extends React.Component { key={'empty_' + i * length + j} > {item.type === 'btn' && ( - - - - - )} + + { + this.props.children + || + + + + } + )} ) )} From 996fa71c5868758b02913fd67ee4bd0aedd51332 Mon Sep 17 00:00:00 2001 From: P4X666 <2644378911@qq.com> Date: Fri, 27 May 2022 18:07:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?docs:=20=E5=A2=9E=E5=8A=A0=20ImagePicker=20?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=8C=89=E9=92=AE=E7=9A=84=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/taro-ui-docs/markdown/image-picker.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/packages/taro-ui-docs/markdown/image-picker.md b/packages/taro-ui-docs/markdown/image-picker.md index d0e293e7..c0eeca4c 100644 --- a/packages/taro-ui-docs/markdown/image-picker.md +++ b/packages/taro-ui-docs/markdown/image-picker.md @@ -110,6 +110,21 @@ export default class Index extends Taro.Component { ::: +## 自定义上传按钮 + +:::demo + +```jsx + + 自定义上传按钮 + +``` + +::: + ## 多种图片预览模式 :::demo