vue-facing-decorator icon indicating copy to clipboard operation
vue-facing-decorator copied to clipboard

[BUG?] No Prop Intellisense

Open angelhdzmultimedia opened this issue 3 years ago • 2 comments

Not getting prop intellisense:

image

Tried with normal <script setup> without using vue-facing-decorator and I then get intellisense:

image

components/HelloWorld.vue with vue-facing-decorator:

<script  lang="ts">
import {
  Vue,
  Component,
  Prop,
  Emit,
  
} from 'vue-facing-decorator'
@Component
export default class App extends Vue {
@Prop({})
 public name?: string
}
 
</script>

<template>
  Name: {{name}}
</template>

<style scoped>

</style>

components/HelloWorld.vue without vue-facing-decorator:

<script setup lang="ts">
const {name} = defineProps(['name'])
</script>

<template>
  {{name}}
</template>

<style scoped>

</style>

Am I missing something? Thank you.

angelhdzmultimedia avatar Aug 20 '22 09:08 angelhdzmultimedia

So far, I don't known the details of SFC intellisense. Maybe vscode plugin analyze vue composition api to get these info or with other ways. In opposed, TSX's component type intellisense is well documented. So SFC intellisense is not be considered while I creating this repo. I will focus on it, but it won't be supported in recent days probably.

ruojianll avatar Aug 20 '22 09:08 ruojianll

Wow quick reply. 🤯

Yes I understand and it makes sense. I will try TSX out. Thanks for replying.

angelhdzmultimedia avatar Aug 20 '22 09:08 angelhdzmultimedia

Hey, I just stumbled upon this repository after finding some other good ones, like unplugin-auto-import and unplugin-vue-components

I did encounter the props issue as well, a bit of a bummer, but nothing that makes developing with it impossible.

Additionally, it also seems to extend to emits as well...

I know it's been over a year since this was last discussed, but is this still something that is being considered? :)

Lordmau5 avatar Nov 14 '23 18:11 Lordmau5

@Lordmau5 So far, we didn't have enough time to improve IDE develop experience. If someone could point out how to support it, then I'd like to implement it. I hope more people could work in this repo for making it better.

ruojianll avatar Nov 15 '23 09:11 ruojianll