1 line
14 KiB
JSON
1 line
14 KiB
JSON
|
|
{"type":"component","meta":{"docsUrl":"https://v2.quasar.dev/vue-components/file"},"props":{"name":{"type":"String","desc":"Used to specify the name of the control; Useful if dealing with forms; If not specified, it takes the value of 'for' prop, if it exists","examples":["'car_id'"],"category":"behavior"},"multiple":{"type":"Boolean","desc":"Allow multiple file uploads","category":"behavior"},"accept":{"type":"String","desc":"Comma separated list of unique file type specifiers. Maps to 'accept' attribute of native input type=file element","examples":["'.jpg, .pdf, image/*'","'image/jpeg, .pdf'"],"category":"behavior"},"capture":{"type":"String","desc":"Optionally, specify that a new file should be captured, and which device should be used to capture that new media of a type defined by the 'accept' prop. Maps to 'capture' attribute of native input type=file element","values":["'user'","'environment'"],"category":"behavior"},"max-file-size":{"type":["Number","String"],"desc":"Maximum size of individual file in bytes","examples":["1024","'1048576'"],"category":"behavior"},"max-total-size":{"type":["Number","String"],"desc":"Maximum size of all files combined in bytes","category":"behavior"},"max-files":{"type":["Number","String"],"desc":"Maximum number of files to contain","category":"behavior"},"filter":{"type":"Function","desc":"Custom filter for added files; Only files that pass this filter will be added to the queue and uploaded; For best performance, reference it from your scope and do not define it inline","params":{"files":{"type":"Array","tsType":"File","desc":"Candidate files to be added to queue"}},"returns":{"type":"Array","tsType":"File","desc":"Filtered files to be added to queue"},"examples":["files => files.filter(file => file.size === 1024)"],"category":"behavior"},"model-value":{"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","required":true,"syncable":true,"category":"model","type":["File","FileList","Array","null","undefined"],"examples":["# v-model=\"myModel\""]},"error":{"type":["Boolean","null"],"default":"null","desc":"Does field have validation errors?","category":"validation","required":false},"error-message":{"type":"String","desc":"Validation error message (gets displayed only if 'error' is set to 'true')","examples":["'Username must have at least 5 characters'"],"category":"validation"},"no-error-icon":{"type":"Boolean","desc":"Hide error icon when there is an error","category":"validation"},"rules":{"type":"Array","tsType":"ValidationRule","desc":"Array of Functions/Strings; If String, then it must be a name of one of the embedded validation rules","examples":["[ val => val.length <= 3 || 'Please use maximum 3 characters' ]","[ 'fulltime' ]","[ (val, rules) => rules.email(val) || 'Please enter a valid email address' ]"],"category":"validation"},"reactive-rules":{"type":"Boolean","desc":"By default a change in the rules does not trigger a new validation until the model changes; If set to true then a change in the rules will trigger a validation; Has a performance penalty, so use it only when you really need it","category":"validation"},"lazy-rules":{"type":["Boolean","String"],"desc":"If set to boolean true then it checks validation status against the 'rules' only after field loses focus for first time; If set to 'ondemand' then it will trigger only when component's validate() method is manually called or when the wrapper QForm submits itself","default":"false","values":["true","false","'ondemand'"],"category":"validation","required":false},"label":{"type":"String","desc":"A text label that will “float” up above the input field, once the field gets focus","examples":["'Username'"],"category":"content"},"stack-label":{"type":"Boolean","desc":"Label will be always shown above the field regardless of field content (if any)","category":"content"},"hint":{"type":"String","desc":"Helper (hint) text which gets placed below your wrapped form component","exampl
|