Skip to content

Commit 43e499c

Browse files
dodaschrisvfritz
authored andcommitted
Fixed advanced prop definition (volksbright#413)
* Fixed advanced prop definition Changed type to Number, as both default and validator are for number and changed default value to pass validator. * update prop validations to make more sense contextually
1 parent 1420e5c commit 43e499c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/api/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -370,14 +370,14 @@ type: api
370370
Vue.component('props-demo-advanced', {
371371
props: {
372372
// just type check
373-
size: Number,
373+
height: Number,
374374
// type check plus other validations
375-
name: {
376-
type: string,
375+
age: {
376+
type: Number,
377377
default: 0,
378378
required: true,
379379
validator: function (value) {
380-
return value > 0
380+
return value >= 0
381381
}
382382
}
383383
}
@@ -519,7 +519,7 @@ type: api
519519

520520
- **Details:**
521521

522-
Provide the Vue instance an existing DOM element to mount on. It can be a CSS selector string or an actual HTMLElement.
522+
Provide the Vue instance an existing DOM element to mount on. It can be a CSS selector string or an actual HTMLElement.
523523

524524
After the instance is mounted, the resolved element will be accessible as `vm.$el`.
525525

0 commit comments

Comments
 (0)