Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using name in v-bind clashes with slot name #2308

Closed
sawmurai opened this issue Jan 12, 2023 · 0 comments
Closed

Using name in v-bind clashes with slot name #2308

sawmurai opened this issue Jan 12, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@sawmurai
Copy link

sawmurai commented Jan 12, 2023

I am extracting the (in my opinion) still existing problem reported in #2166.

The following snipped lets vue-tsc raise an error 'name' is specified more than once, so this usage will be overwritten. which is not really true.

<slot name="label" v-bind="{name}">
<!-- ... -->
</slot>

Here are two examples of that syntax working without issues:

https://sfc.vuejs.org/#eNo9UDtuwzAMvQqjxS1QW+gaKAG69QZdtDi2HDvQDyKdDoLuXsoKqknvg8dHZvEV4/DcjTgLhVPaIgEa2uNV+83FkAgyJLNAgSUFBx1bO+21n4JHAj86A5dqeOu+jbUBfkKy8+nUvWuvZAvkKAZkXLQjGUYAav285gwO71CKkowOdvNxJ3j2LszGXrRgXYsmoQ1tHNO0mr5iLdh72/zMXK5aebk1qboAHI/nHDVLaYySTeN6nMFfJf+7iQ/Rtu7dGIcHBs93yUfkS0AtznAwleNrVKzFShTxLCUuU73mA4eQ7pJ/Q9o9bc4MBl1/S+EXTeJgLWoENyqi/AF27oJj

Or this with a separate component https://sfc.vuejs.org/#eNplUstqwzAQ/JWNenALtU2vwQmUXvoBhV50SeJN7KAX0jqlGP17V5ITEoovu5pldmbWs3h3rrlMKNaiCwc/OoKANLmtNKN21hN8WO3g6K2GqmlTk8arGzyDxyPEZaJA0hysCQRmpxE2aeC5+kSlLHxbr/rVqnqRpmvLPt7EDaF2akfIHUA3vG3nGXQ4QYxdy11+HY2bCC61tj2qjRSMS1GgpCtXkm5U8EQD1kFZ4tk5aYnLOMDXgMAaCQ2tgVdlpTEWsGsf1WTXXN69i1dR/Nd655pzsIYDnLOABQhSMHMhlIJzSb0UA5EL67YNx0PK8Rwa608tV42fDI0aGwy63nv7E9AzsRSJgoVFXnlNPx3rTiJ77sfL4qxLhrMfdn0NQAqObT+a/n8SV8tpbLFbyB5S4Pb+7wD6dZmf9TH6cG0plOUvCb+dWMQ/4ZjQ7Q==

I had created a PR to fix the problem but it was closed unmerged. Maybe it can still provide some hints on a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants