From b7a0909fa5b133900416fd15225a62f2911b6a2c Mon Sep 17 00:00:00 2001 From: Leonardo Date: Tue, 29 Jan 2019 11:56:07 -0200 Subject: [PATCH] Add clarification about `inheritAttrs` and class/style bindings (#1787) * Add note to the guide * Update example, removing `class` attribute to avoid confusion --- src/v2/guide/components-props.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/v2/guide/components-props.md b/src/v2/guide/components-props.md index 1f97bed30e..2ff3257642 100644 --- a/src/v2/guide/components-props.md +++ b/src/v2/guide/components-props.md @@ -313,7 +313,7 @@ This can be especially useful in combination with the `$attrs` instance property ```js { - class: 'username-input', + required: true, placeholder: 'Enter your username' } ``` @@ -337,12 +337,14 @@ Vue.component('base-input', { }) ``` +

Note that `inheritAttrs: false` option does **not** affect `style` and `class` bindings.

+ This pattern allows you to use base components more like raw HTML elements, without having to care about which element is actually at its root: ```html ```