lianyue 7 years ago
parent 4b58d015e8
commit b6e5bc3919

@ -12,7 +12,7 @@
text-align: center; text-align: center;
display: inline-block; display: inline-block;
} }
.file-uploads.file-uploads-html4 input[type="file"], .file-uploads.file-uploads-html5 label { .file-uploads.file-uploads-html4 input, .file-uploads.file-uploads-html5 label {
/* background fix ie click */ /* background fix ie click */
background: #fff; background: #fff;
opacity: 0; opacity: 0;
@ -26,7 +26,7 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.file-uploads.file-uploads-html5 input[type="file"], .file-uploads.file-uploads-html4 label { .file-uploads.file-uploads-html5 input, .file-uploads.file-uploads-html4 label {
/* background fix ie click */ /* background fix ie click */
background: rgba(255, 255, 255, 0); background: rgba(255, 255, 255, 0);
overflow: hidden; overflow: hidden;

@ -17,8 +17,7 @@ export default {
methods: { methods: {
change(e) { change(e) {
this.$parent.addInputFile(e.target) this.$parent.addInputFile(e.target)
e.target.value = '' if (e.target.files) {
if (!e.target.files) {
// ie9 fix #219 // ie9 fix #219
this.$destroy() this.$destroy()
// eslint-disable-next-line // eslint-disable-next-line
@ -26,6 +25,10 @@ export default {
parent: this.$parent, parent: this.$parent,
el: this.$el, el: this.$el,
}) })
} else {
e.target.type = ''
e.target.value = ''
e.target.type = 'file'
} }
} }
} }

Loading…
Cancel
Save