xianniu-ui 0.8.31 → 0.8.33
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/lib/xianniu-ui.common.js +40 -39
- package/lib/xianniu-ui.umd.js +40 -39
- package/lib/xianniu-ui.umd.min.js +6 -6
- package/package.json +1 -1
- package/packages/import/main.vue +7 -8
- package/packages/upload/main.vue +5 -1
- package/src/utils/utils.js +0 -1
package/package.json
CHANGED
package/packages/import/main.vue
CHANGED
|
@@ -113,7 +113,7 @@ export default {
|
|
|
113
113
|
fileList: [],
|
|
114
114
|
oss: null,
|
|
115
115
|
client: null,
|
|
116
|
-
successFiles:[]
|
|
116
|
+
successFiles: [],
|
|
117
117
|
};
|
|
118
118
|
},
|
|
119
119
|
created() {
|
|
@@ -126,10 +126,10 @@ export default {
|
|
|
126
126
|
},
|
|
127
127
|
methods: {
|
|
128
128
|
onClose() {
|
|
129
|
-
if(this.isDragUpload){
|
|
130
|
-
this.abort()
|
|
131
|
-
this.fileList = []
|
|
132
|
-
this.successFiles = []
|
|
129
|
+
if (this.isDragUpload) {
|
|
130
|
+
this.abort();
|
|
131
|
+
this.fileList = [];
|
|
132
|
+
this.successFiles = [];
|
|
133
133
|
}
|
|
134
134
|
this.$emit("update:show", false);
|
|
135
135
|
},
|
|
@@ -142,7 +142,7 @@ export default {
|
|
|
142
142
|
.catch((err) => {
|
|
143
143
|
return Promise.reject(err);
|
|
144
144
|
});
|
|
145
|
-
}else{
|
|
145
|
+
} else {
|
|
146
146
|
return Promise.resolve();
|
|
147
147
|
}
|
|
148
148
|
},
|
|
@@ -167,7 +167,7 @@ export default {
|
|
|
167
167
|
try {
|
|
168
168
|
const _file = file.file;
|
|
169
169
|
this.$emit("on-import", _file, this.fileList);
|
|
170
|
-
if(this.isDragUpload){
|
|
170
|
+
if (this.isDragUpload) {
|
|
171
171
|
this.oss
|
|
172
172
|
.upload(file)
|
|
173
173
|
.then((res) => {
|
|
@@ -175,7 +175,6 @@ export default {
|
|
|
175
175
|
this.$emit("on-success", this.successFiles);
|
|
176
176
|
})
|
|
177
177
|
.catch(() => {
|
|
178
|
-
this.$emit("update:fileList", this.successFiles);
|
|
179
178
|
});
|
|
180
179
|
}
|
|
181
180
|
} catch (error) {
|
package/packages/upload/main.vue
CHANGED
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
<i class="fz-16 el-icon-download" />
|
|
98
98
|
</span>
|
|
99
99
|
<span
|
|
100
|
-
v-if="(!$attrs.disabled && !preview) || hideUpload"
|
|
100
|
+
v-if="allowDelete || (!$attrs.disabled && !preview) || hideUpload"
|
|
101
101
|
class="el-upload-list__item-delete icon ml-5"
|
|
102
102
|
@click="handleRemove(file, fileList)"
|
|
103
103
|
>
|
|
@@ -137,6 +137,10 @@ export default {
|
|
|
137
137
|
type: String,
|
|
138
138
|
default: "picture-card",
|
|
139
139
|
},
|
|
140
|
+
allowDelete:{
|
|
141
|
+
type: Boolean,
|
|
142
|
+
default: false,
|
|
143
|
+
},
|
|
140
144
|
preview: {
|
|
141
145
|
type: Boolean,
|
|
142
146
|
default: false,
|
package/src/utils/utils.js
CHANGED
|
@@ -42,7 +42,6 @@ const isAV = (file) => {
|
|
|
42
42
|
const { url } = file
|
|
43
43
|
if (typeof url !== 'string' || !url) return
|
|
44
44
|
var strFilter = '.mp4|.avi|.wmv|.MP4|.AVI|.WMV'
|
|
45
|
-
if (file.imgFlag) return true
|
|
46
45
|
if (url.indexOf('.') > -1) {
|
|
47
46
|
var p = url.lastIndexOf('.')
|
|
48
47
|
var strPostfix = url.substring(p, url.length) + '|'
|