提交 f77a0944 编写于 作者: 雪洛's avatar 雪洛

update:upload-file type

上级 aa110f4d
// App端可以只使用files不传filePath和name
// import getRealPath from 'uni-platform/helpers/get-real-path'
import getRealPath from 'uni-platform/helpers/get-real-path'
export const uploadFile = {
url: {
......@@ -10,7 +10,12 @@ export const uploadFile = {
type: Array
},
filePath: {
type: String
type: String,
validator (value, params) {
if (value) {
params.type = getRealPath(value)
}
}
},
name: {
type: String
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册