Skip to content

Composition API snippets #2741

@Namchee

Description

@Namchee
  • I have searched through existing issues

Feature Request

Composition API is a new way to write your Vue components. However, currently Vetur only provides quick snippets for Options API for the script tag. It would be awesome if Vetur provides snippets to quickly scaffold Composition API-based components, both with and without TypeScript.

For example, we can type composition-ts to quickly write

<script lang="ts">
import { defineComponent } from '@vue/composition-api';

export default defineComponent({
  setup() {
  
  },
});
</script>

And composition-js to write

<script>
export default {
  setup() {
  
  },
};
</script>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions