@@ -7,7 +7,10 @@ multiple files, and directory upload (for browsers that support directory mode)
7
7
<template >
8
8
<div >
9
9
<!-- Styled -->
10
- <b-form-file v-model =" file" :state =" Boolean(file)" placeholder =" Choose a file..." ></b-form-file >
10
+ <b-form-file v-model =" file"
11
+ :state =" Boolean(file)"
12
+ placeholder =" Choose a file..."
13
+ drop-placeholder =" Drop file here..." ></b-form-file >
11
14
<div class =" mt-3" >Selected file: {{file && file.name}}</div >
12
15
13
16
<!-- Plain mode -->
@@ -59,10 +62,16 @@ be relied for production.
59
62
60
63
Directory mode is not supported when the file input is in plain mode.
61
64
62
- ## Drag and Drop
65
+
66
+ ## Drag and Drop support
63
67
Drop mode is enabled by default. It can disabled by setting the ` no-drop `
64
68
prop. ` no-drop ` has no effect in plain mode.
65
69
70
+ You can optionally set a different placeholder while dragging via the
71
+ ` drop-placeholder ` prop. The default is no drop placeholder text. Only
72
+ plain text is supported. HTML and components are not supported. The
73
+ ` drop-placeholder ` prop has no effect if ` no-drop ` is set or in ` plain ` mode,
74
+
66
75
67
76
## Limiting to certain file types
68
77
You can limit the file types by setting the ` accept ` prop to a string containing the
@@ -90,7 +99,7 @@ list of standard media types.
90
99
91
100
## Customize the placeholder text
92
101
Use the prop ` placeholder ` to change the prompt text that is shown when no
93
- files are selected.
102
+ files are selected. Only plain text is supported. HTML and components are not supported.
94
103
95
104
96
105
## Customize browse button label
@@ -104,12 +113,13 @@ Also it is advised to use [:lang()](https://developer.mozilla.org/en-US/docs/Web
104
113
```
105
114
106
115
Alternatively you can set the content of the custom file browe button
107
- text via the ` browse-text ` prop. Note, only plain text is supported. HTML or
108
- sub- components are not supported.
116
+ text via the ` browse-text ` prop. Note, only plain text is supported. HTML and
117
+ components are not supported.
109
118
110
119
111
120
## Non custom file input
112
121
You can have ` <b-form-file> ` render a browser native file input by setting the ` plain ` prop.
122
+ Note that many of the customer form-file features do not apply when ` plain ` is set.
113
123
114
124
115
125
## Contextual state feedback
0 commit comments