Created
August 30, 2022 16:59
-
-
Save eduardoarandah/819d75ac81cd6bd00b2c995b690ea687 to your computer and use it in GitHub Desktop.
bugs in volar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script setup lang="ts"> | |
interface IFoo { | |
id: number; | |
name: string; | |
} | |
const foos: Array<IFoo> = [ | |
{ id: 1, name: "aaa" }, | |
{ id: 2, name: "bbb" }, | |
]; | |
</script> | |
<template> | |
<div> | |
<div v-for="foo in foos" :key="foo.id">{foo.name}</div> | |
<div :key="foos[0].name"></div> | |
</div> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script setup lang="ts"> | |
interface IFoo { | |
id: number; | |
name: string; | |
} | |
const props = defineProps<{ | |
foos: Array<IFoo>; | |
}>(); | |
</script> | |
<template> | |
<div> | |
<div v-for="foo in props.foos" :key="foo.id">{foo.name}</div> | |
<div :key="foos[0].name"></div> | |
</div> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface IFoo { | |
id: number; | |
name: string; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script setup lang="ts"> | |
import { IFoo } from "./TestType"; | |
const props = defineProps<{ | |
foos: Array<IFoo>; | |
}>(); | |
</script> | |
<template> | |
<div> | |
<div v-for="foo in props.foos" :key="foo.id">{foo.name}</div> | |
<div :key="foos[0].name"></div> | |
</div> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment