forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQFile.json
More file actions
184 lines (166 loc) · 4.99 KB
/
QFile.json
File metadata and controls
184 lines (166 loc) · 4.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
{
"mixins": [ "composables/private/use-field", "composables/private/use-file", "composables/private/use-form" ],
"meta": {
"docsUrl": "https://v2.quasar.dev/vue-components/file"
},
"props": {
"model-value": {
"extends": "model-value",
"type": [ "File", "FileList", "Array", "null", "undefined" ],
"desc": "Model of the component; Must be FileList or Array if using 'multiple' prop; Either use this property (along with a listener for 'update:modelValue' event) OR use v-model directive",
"examples": [ "v-model=\"myModel\"" ]
},
"append": {
"type": "Boolean",
"desc": "Append file(s) to current model rather than replacing them; Has effect only when using 'multiple' mode",
"category": "behavior"
},
"display-value": {
"type": [ "Number", "String" ],
"desc": "Override default selection string, if not using 'file' or 'selected' scoped slots and if not using 'use-chips' prop",
"examples": [ "Options: x, y, z" ],
"category": "selection"
},
"use-chips": {
"type": "Boolean",
"desc": "Use QChip to show picked files",
"category": "selection"
},
"counter-label": {
"type": "Function",
"desc": "Label for the counter; The 'counter' prop is necessary to enable this one",
"params": {
"props": {
"type": "Object",
"desc": "Object containing counter label information",
"definition": {
"totalSize": {
"type": "String",
"required": true,
"desc": "The total size of files in human readable format",
"examples": [ "1.42MB" ]
},
"filesNumber": {
"type": "Number",
"required": true,
"desc": "Number of picked files",
"examples": [ 5 ]
},
"maxFiles": {
"type": [ "Number", "String" ],
"required": true,
"desc": "Maximum number of files (same as 'max-files' prop, if specified); When 'max-files' is not specified, this has 'void 0' as value",
"examples": [ 5 ]
}
}
}
},
"returns": {
"type": "String",
"desc": "String to display for the counter label",
"__exemption": [ "examples" ]
},
"examples": [
":counter-label=\"counterLabelFn\""
],
"category": "behavior"
},
"tabindex": {
"extends": "tabindex"
},
"input-class": {
"type": [ "String", "Array", "Object" ],
"tsType": "VueClassProp",
"desc": "Class definitions to be attributed to the underlying selection container",
"examples": [
"my-special-class",
":input-class=\"{ 'my-special-class': <condition> }\""
],
"category": "style"
},
"input-style": {
"type": [ "String", "Array", "Object" ],
"tsType": "VueStyleProp",
"desc": "Style definitions to be attributed to the underlying selection container",
"examples": [
"background-color: #ff0000",
":input-style=\"{ backgroundColor: '#ff0000' }\""
],
"category": "style"
}
},
"slots": {
"file": {
"desc": "Override default node to render a file from the user picked list",
"scope": {
"index": {
"type": "Number",
"desc": "Selection index",
"examples": [ 0 ]
},
"file": {
"type": "File",
"desc": "File object",
"__exemption": [ "examples" ]
},
"ref": {
"type": "Component",
"tsType": "QFile",
"desc": "Reference to the QFile component"
}
}
},
"selected": {
"desc": "Override default selection slot; Suggestion: QChip",
"scope": {
"files": {
"type": [ "FileList", "Array" ],
"desc": "Array of File objects",
"__exemption": [ "examples" ]
},
"ref": {
"type": "Component",
"tsType": "QFile",
"desc": "Reference to the QFile component"
}
}
}
},
"events": {
"update:model-value": {
"extends": "update:model-value"
}
},
"methods": {
"removeAtIndex": {
"desc": "Remove file located at specific index in the model",
"params": {
"index": {
"type": "Number",
"desc": "Index at which to remove selection",
"required": true,
"examples": [ 0 ]
}
}
},
"removeFile": {
"desc": "Remove specified file from the model",
"params": {
"file": {
"type": "File",
"desc": "File to remove (instance of File)",
"required": true,
"__exemption": [ "examples" ]
}
}
},
"getNativeElement": {
"desc": "Get the native input DOM Element",
"returns": {
"type": "Object",
"desc": "The underlying native input DOM Element",
"__exemption": [ "examples" ]
}
}
}
}