Skip to content

Commit ee10320

Browse files
author
Walker Leite
committed
feat(component): add spinner to delete and fix css
1 parent d72a052 commit ee10320

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/ic-firebase-uploader/ic-firebase-uploader.vue

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,12 @@ export default {
162162
}
163163
},
164164
getDeleteFn(file) {
165+
file.isLoading = true
165166
const fileRef = file.ref
166167
return () => {
167168
fileRef.delete()
168169
.then(() => {
170+
file.isLoading = false
169171
const sentIndex = this.sentFiles.indexOf(file)
170172
this.sentFiles.splice(sentIndex, 1)
171173
/**
@@ -178,7 +180,10 @@ export default {
178180
fullPath: fileRef.fullPath,
179181
})
180182
})
181-
.catch(err => this.$emit('error', err))
183+
.catch(err => {
184+
file.isLoading = false
185+
this.$emit('error', err)
186+
})
182187
}
183188
},
184189
getIconClasses(file) {
@@ -208,6 +213,9 @@ export default {
208213
209214
.ic-fb_uploader .ic-fb_uploader-delete {
210215
cursor: pointer;
216+
}
217+
218+
.ic-fb_uploader .ic-fb_uploader-delete.fa-times {
211219
color: #ad3636;
212220
}
213221
@@ -220,6 +228,7 @@ export default {
220228
animation-iteration-count: infinite;
221229
-webkit-animation-timing-function: ease-in-out;
222230
animation-timing-function: ease-in-out;
231+
color: #387cbd;
223232
}
224233
225234
@-webkit-keyframes rotate {

0 commit comments

Comments
 (0)