1000字范文,内容丰富有趣,学习的好帮手!
1000字范文 > vscode Vue ts 自定义模板

vscode Vue ts 自定义模板

时间:2020-09-05 11:13:44

相关推荐

vscode Vue ts 自定义模板

vscode Vue ts 自定义模板

首先打开vscode选择用户片段

选择vue.json

{// Place your snippets for vue here. Each snippet is defined under a snippet name and has a prefix, body and// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the// same ids are connected.// Example:"vue-ts": {"prefix": "!vue-ts","body": ["<!-- 组件用途 -->","<template>"," <div></div>","</template>","","<script lang='ts'>","import { Component, Vue } from 'vue-property-decorator';","","@Component","export default class Name extends Vue {"," created() {}","}","</script>","<style lang='scss' scoped></style>"],"description": "vue ts 基础模板"}}

输入对应的模板

prefix 选项里面就是调起现因的命令,如下

这样就ok拉~~~~~~

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。