Skip to content

Conflicts of custom elements' named slot (defineCustomElement) #6574

Discussion options

You must be logged in to vote

The first way (with a slot="icon" prop) is the correct way, as documented here:

https://vuejs.org/guide/extras/web-components.html#slots

So a workaround would be to skip this rule in these instances:

<custom-element>
  <!-- eslint-disable-next-line vue/no-deprecated-slot-attribute -->
  <span slot="icon">hello, world</span>
</custom-element>

You can also open an issue in the eslint plugin repo and ask for a fix / feature to skip this rule for custom elements.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@rhzone
Comment options

@rhzone
Comment options

@rhzone
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by rhzone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants