lianyue 7 years ago
parent ba5274c0a2
commit a969e16bc0

@ -13,6 +13,8 @@
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[type="file"], .file-uploads.file-uploads-html5 label {
/* background fix ie click */
background: #fff;
opacity: 0; opacity: 0;
font-size: 20em; font-size: 20em;
z-index: 1; z-index: 1;
@ -25,6 +27,8 @@
height: 100%; height: 100%;
} }
.file-uploads.file-uploads-html5 input[type="file"], .file-uploads.file-uploads-html4 label { .file-uploads.file-uploads-html5 input[type="file"], .file-uploads.file-uploads-html4 label {
/* background fix ie click */
background: rgba(255, 255, 255, 0);
overflow: hidden; overflow: hidden;
position: fixed; position: fixed;
width: 1px; width: 1px;

@ -15,13 +15,17 @@
export default { export default {
methods: { methods: {
change(e) { change(e) {
this.$destroy()
this.$parent.addInputFile(e.target) this.$parent.addInputFile(e.target)
// eslint-disable-next-line e.target.value = ''
new this.constructor({ if (!e.target.files) {
parent: this.$parent, // ie9 fix #219
el: this.$el, this.$destroy()
}) // eslint-disable-next-line
new this.constructor({
parent: this.$parent,
el: this.$el,
})
}
} }
} }
} }

Loading…
Cancel
Save