Skip to content

Commit cebf2e9

Browse files
committed
feat(ui): necessary adjustments for the new capture prop on some comps quasarframework#7249
1 parent 8b95716 commit cebf2e9

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

ui/src/components/file/QFile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ export default Vue.extend({
8484
type: 'file',
8585
title: '', // try to remove default tooltip,
8686
accept: this.accept,
87+
capture: this.capture,
8788
name: this.nameProp,
8889
...this.qAttrs,
8990
id: this.targetUid,

ui/src/components/uploader/QUploaderBase.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ export default Vue.extend({
3232
hideUploadBtn: Boolean,
3333

3434
disable: Boolean,
35-
readonly: Boolean,
36-
capture: String,
35+
readonly: Boolean
3736
},
3837

3938
provide () {
@@ -297,7 +296,7 @@ export default Vue.extend({
297296
type: 'file',
298297
title: '', // try to remove default tooltip
299298
accept: this.accept,
300-
capture: this.capture,
299+
capture: this.capture,
301300
...(this.multiple === true ? { multiple: true } : {})
302301
},
303302
on: cache(this, 'input', {

ui/src/mixins/file.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export default {
2020
props: {
2121
multiple: Boolean,
2222
accept: String,
23+
capture: String,
2324
maxFileSize: [ Number, String ],
2425
maxTotalSize: [ Number, String ],
2526
maxFiles: [ Number, String ],

ui/src/mixins/file.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
"category": "behavior"
1616
},
1717

18+
"capture": {
19+
"type": "String",
20+
"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",
21+
"values": [ "user", "environment" ],
22+
"category": "behavior",
23+
"addedIn": "v1.12.6"
24+
},
25+
1826
"max-file-size": {
1927
"type": [ "Number", "String" ],
2028
"desc": "Maximum size of individual file in bytes",

0 commit comments

Comments
 (0)