Skip to content

Commit

Permalink
fix(upload): 修复limit限制的问题 (#1800)
Browse files Browse the repository at this point in the history
* fix: 修复limit限制的问题

fix #1779

* fix: fix code

* test: update snap
  • Loading branch information
yaogengzhu authored Mar 19, 2023
1 parent b6e1d38 commit 9fb1ed7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/upload/upload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ export default class Upload extends SuperComponent {
},

chooseMedia(mediaType) {
const { config, sizeLimit, max } = this.data;
const { config, sizeLimit, customLimit } = this.data;
wx.chooseMedia({
count: max === 0 ? 9 : max, // 在 iOS 里,0 是无效的,会导致抛异常
count: customLimit,
mediaType,
...config,
success: (res) => {
Expand Down

0 comments on commit 9fb1ed7

Please sign in to comment.