Skip to content

better warning #1669

@TerenceZ

Description

@TerenceZ

Since the commit 778734a, vue will always complain that fragment should not contain multiple attributes. However, I think the following props (for components) should not be warned:

  • slot
  • component props
  • event bindings

Consider the following example, slot, @custom-change, :prop should be passed, and :not-prop should be warned. The v-bind is a complexed case, because the object may contain some props and some attributes for element and dynamic:(.

<root>
  <child slot="child" @custom-change="onchange" :prop="prop" :not-prop v-bind="mixedWithSomeProps"></child>
</root>

<template id="child">
  <inner-comp>
    <!-- something -->
  </inner-comp>
</template>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions