Skip to content

Commit

Permalink
fix(image-picker): 修改细节
Browse files Browse the repository at this point in the history
  • Loading branch information
jimczj committed Nov 16, 2018
1 parent 38d836f commit 2255109
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/image-picker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default class AtImagePicker extends AtComponent {
'bottom left',
'bottom right'
]),
showAddBtn: PropTypes.number,
showAddBtn: PropTypes.bool,
multiple: PropTypes.bool,
length: PropTypes.number,
onChange: PropTypes.func,
Expand Down
15 changes: 11 additions & 4 deletions src/pages/form/image-picker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@ export default class Index extends Taro.Component {
constructor () {
super(...arguments)
this.state = {
files: []
files: [{
url: 'https://jimczj.gitee.io/lazyrepay/aragaki1.jpeg',
},
{
url: 'https://jimczj.gitee.io/lazyrepay/aragaki2.jpeg',
},
{
url: 'https://jimczj.gitee.io/lazyrepay/aragaki3.png',
}]
}
}
onChange (files) {
Expand Down Expand Up @@ -74,7 +82,7 @@ export default class Index extends Taro.Component {
<View className='example-item'>
<AtImagePicker
multiple
length={5}
length={3}
files={this.state.files}
onChange={this.onChange.bind(this)}
/>
Expand All @@ -88,9 +96,8 @@ export default class Index extends Taro.Component {
<View className='panel__content no-padding'>
<View className='example-item'>
<AtImagePicker
mode='top'
mode='aspectFill'
multiple
length={5}
files={this.state.files}
onChange={this.onChange.bind(this)}
/>
Expand Down

0 comments on commit 2255109

Please sign in to comment.