Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 1.34 KB

no-multiple-slot-args.md

File metadata and controls

49 lines (36 loc) · 1.34 KB
pageClass sidebarDepth title description
rule-details
0
vue/no-multiple-slot-args
disallow to pass multiple arguments to scoped slots

vue/no-multiple-slot-args

disallow to pass multiple arguments to scoped slots

  • ⚙️ This rule is included in "plugin:vue/vue3-recommended" and "plugin:vue/recommended".

📖 Rule Details

This rule disallows to pass multiple arguments to scoped slots.
In details, it reports call expressions if a call of this.$scopedSlots members has 2 or more arguments.

<script>
export default {
  render(h) {
    /* ✓ GOOD */
    var children = this.$scopedSlots.default()
    var children = this.$scopedSlots.default(foo)
    var children = this.$scopedSlots.default({ foo, bar })

    /* ✗ BAD */
    var children = this.$scopedSlots.default(foo, bar)
    var children = this.$scopedSlots.default(...foo)
  }
}
</script>

🔧 Options

Nothing.

📚 Further Reading

🔍 Implementation