File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 ref =" loader"
1818 multiple
1919 @change =" onChangeLoader" >
20- <button class =" ic-fb_uploader-btn" @click =" onBtnClick" >
21- UPLOAD
22- </button >
20+ <!-- @slot Override default upload button, you must call promptFiles method -->
21+ <slot ><button class =" ic-fb_uploader-btn" @click =" promptFiles" >
22+ UPLOAD
23+ </button ></slot >
2324 </div >
2425</template >
2526
@@ -63,9 +64,6 @@ export default {
6364 sentFiles: [],
6465 }),
6566 methods: {
66- onBtnClick () {
67- this .$refs .loader .click ()
68- },
6967 onFileLinkClick (fileRef , event ) {
7068 /**
7169 * When user clicks in a file link, event contains
@@ -173,6 +171,12 @@ export default {
173171 .catch (err => this .$emit (' error' , err))
174172 }
175173 },
174+ /**
175+ * Open the file browser and ask user for the files
176+ */
177+ promptFiles () {
178+ this .$refs .loader .click ()
179+ },
176180 },
177181}
178182 </script >
You can’t perform that action at this time.
0 commit comments