Skip to content

Commit b70991a

Browse files
author
xuqingkai
committed
fix: 🐛 修复Upload组件sourceType属性丢失默认值导致在iOS系统微信小程序报错的问题
Closes: #227
1 parent 9ae8a20 commit b70991a

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

  • src/uni_modules/wot-design-uni/components/wd-upload

src/uni_modules/wot-design-uni/components/wd-upload/types.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,19 @@ export const uploadProps = {
130130
* 类型:array
131131
* 默认值:['album','camera']
132132
*/
133-
sourceType: makeArrayProp<UploadSourceType>(),
133+
sourceType: {
134+
type: Array as PropType<UploadSourceType[]>,
135+
default: () => ['album', 'camera']
136+
},
134137
/**
135138
* 所选的图片的尺寸,chooseImage接口详细参数,查看官方手册
136139
* 类型:array
137140
* 默认值:['original','compressed']
138141
*/
139-
sizeType: makeArrayProp<UploadSizeType>(),
142+
sizeType: {
143+
type: Array as PropType<UploadSizeType[]>,
144+
default: () => ['original', 'compressed']
145+
},
140146
/**
141147
* 文件对应的key,开发者在服务端可以通过这个key获取文件的二进制内容,uploadFile接口详细参数,查看官方手册
142148
* 类型:string

0 commit comments

Comments
 (0)