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

Crashes with inline v-bind on scoped v-slot #1151

Closed
FlyinCow opened this issue Apr 7, 2022 · 0 comments
Closed

Crashes with inline v-bind on scoped v-slot #1151

FlyinCow opened this issue Apr 7, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@FlyinCow
Copy link

FlyinCow commented Apr 7, 2022

Vue code:

<script setup lang="ts">
function onRightClick(e: MouseEvent) {}
</script>

<template>
  <slot v-bind="{ onRightClick  }"></slot>
</template>

Error output:

[Error - 3:50:14 AM] Request textDocument/formatting failed.
  Message: Request textDocument/formatting failed with message: Overlapping edit
  Code: -32603 

I have tried different ways with v-bind on scoped v-slot:

<!--crash-->
<slot v-bind="{ onRightClick  }"></slot>
<!--all below work fine-->
<slot v-bind:onRightClick="onRightClick"></slot>
<slot :onRightClick="onRightClick"></slot>
<slot v-bind="scoped"></slot> // const scoped={onRightClick}
<slot v-bind="scoped"></slot> // const scoped={onRightClick:onRightClick}

Only the first style crashes.

vscode version: 1.66.0
system: win11 21H2

@johnsoncodehk johnsoncodehk added the bug Something isn't working label Apr 10, 2022
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