diff --git a/src/guide/component-props.md b/src/guide/component-props.md index 7505d2a819..a8a245d80b 100644 --- a/src/guide/component-props.md +++ b/src/guide/component-props.md @@ -193,7 +193,15 @@ app.component('my-component', { // The value must match one of these strings return ['success', 'warning', 'danger'].indexOf(value) !== -1 } - } + }, + // Function with a default value + propG: { + type: Function, + // Unlike object or array default, this is not a factory function - this is a function to serve as a default value + default: function () { + return 'Default function' + }, + }, } }) ```