Skip to content

Commit cdfaf3f

Browse files
authored
Adds slot for inner html
1 parent fb6a940 commit cdfaf3f

File tree

1 file changed

+8
-16
lines changed

1 file changed

+8
-16
lines changed

src/FileUpload.vue

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
<template>
2+
<label class="file-uploads" :class="mode === 'html5' ? 'file-uploads-html5' : 'file-uploads-html4'">
3+
<span>{{title}}</span>
4+
<slot></slot>
5+
<input-file></input-file>
6+
</label>
7+
</template>
8+
19
<style>
210
.file-uploads {
311
overflow: hidden;
@@ -140,22 +148,6 @@ export default {
140148
this.files.splice(0, this.files.length);
141149
},
142150
143-
render (h) {
144-
return (
145-
<label class={{
146-
'file-uploads': true,
147-
'file-uploads-html5': this.mode == 'html5',
148-
'file-uploads-html4': this.mode == 'html4'
149-
}} >
150-
<span>{this.title}</span>
151-
<input-file></input-file>
152-
</label>
153-
)
154-
},
155-
156-
157-
158-
159151
watch: {
160152
drop(value) {
161153
this._drop(value);

0 commit comments

Comments
 (0)