vue 代码快捷键_VSCode( VisualStudioCode) 写vue项目一键生成.vue模版修改定义其他模板...
1. 安装一个插件,识别vue文件2.新建代码片段文件-->首选项-->用户代码片段-->点击新建代码片段--取名vue.json 确定3.粘贴入自己写的.vue模板{"Print to console": {"prefix": "vue","body": ["<!-- $1 -->","<template&...
·
1. 安装一个插件,识别vue文件

2.新建代码片段
文件-->首选项-->用户代码片段-->点击新建代码片段--取名vue.json 确定
3.粘贴入自己写的.vue模板
{
"Print to console": {
"prefix": "vue",
"body": [
"<!-- $1 -->",
"<template>",
"<div class='$2'>$5</div>",
"</template>",
"",
"<script>",
"",
"export default {",
"components: {},",
"data() {",
"return {",
"",
"}",
"},",
"computed: {},",
"watch: {},",
"methods: {",
"",
"},",
"created() {",
"",
"},",
"mounted() {",
"",
"},",
"}",
"</script>",
"<style scoped>",
"$4",
"</style>"
],
"description": "Log output to console"
}
}
4.上面代码中的 "prefix": "vue", 就是快捷键;保存好之后,新建.vue结尾的文件
输入vue 按键盘的tab


更多推荐
所有评论(0)