You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/guide/component-attrs.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -82,7 +82,7 @@ If you do **not** want a component to automatically inherit attributes, you can
82
82
83
83
The common scenario for disabling an attribute inheritance is when attributes need to be applied to other elements besides the root node.
84
84
85
-
By setting the `inheritAttrs` option to `false`, you can control to apply to other elements attributes to use the component's `$attrs` property, which includes all attributes not included to component `props` and `emits` properties (e.g., `class`, `style`, `v-on` listeners, etc.).
85
+
By setting the `inheritAttrs` option to `false`, you can then apply attributes to the element of your choice by using the component's `$attrs` property, which includes all attributes not included to component `props` and `emits` properties (e.g., `class`, `style`, `v-on` listeners, etc.).
86
86
87
87
Using our date-picker component example from the [previous section](#attribute-inheritance), in the event we need to apply all non-prop attributes to the `input` element rather than the root `div` element, this can be accomplished by using the `v-bind` shortcut.
0 commit comments