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 diff --git a/packages/taro-ui/src/components/image-picker/index.tsx b/packages/taro-ui/src/components/image-picker/index.tsx index 38978a79..57bf11e9 100644 --- a/packages/taro-ui/src/components/image-picker/index.tsx +++ b/packages/taro-ui/src/components/image-picker/index.tsx @@ -139,14 +139,15 @@ export default class AtImagePicker extends React.Component { key={`empty_${i * length}${j}`} > {item.type === 'btn' && ( - - - - - )} + + { + this.props.children + || + + + + } + )} ) )}