xianniu-ui 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/packages/upload/main.vue +2 -2
package/package.json
CHANGED
package/packages/upload/main.vue
CHANGED
|
@@ -133,7 +133,7 @@ export default {
|
|
|
133
133
|
default: "",
|
|
134
134
|
},
|
|
135
135
|
accept: {
|
|
136
|
-
type: Array,
|
|
136
|
+
type: [Array,String],
|
|
137
137
|
default: () => ["jpg", "jpeg", "png", "pdf"],
|
|
138
138
|
},
|
|
139
139
|
maxSize: {
|
|
@@ -204,7 +204,7 @@ export default {
|
|
|
204
204
|
// 判断上传格式
|
|
205
205
|
fileExt = `${fileExt}`.toLowerCase();
|
|
206
206
|
|
|
207
|
-
if (!this.accept.includes(fileExt)) {
|
|
207
|
+
if (!this.accept.includes(fileExt) && this.accept !== '*') {
|
|
208
208
|
this.$message.warning(`请上传指定格式【${this.accept}】`);
|
|
209
209
|
return false;
|
|
210
210
|
}
|