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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xianniu-ui",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "private": false,
5
5
  "main": "lib/xianniu-ui.umd.min.js",
6
6
  "scripts": {
@@ -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
  }