vscode左下角
image.png
自定义vue代码
输入vue,找到vue.json
image.png
如改为
"v3-html": {
"prefix": "v3",
"body": [
"<template>",
" <div class=\"$1\"></div>",
"</template>",
" ",
"<script setup>",
" ",
"</script>",
" ",
"<style lang=\"sass\" scoped>",
"</style>"
],
"description": "v3-hteml-content"
}
这样在vue文件,内容顶部输入v3就会自动出现自定义代码
vue的script部分实现自定义
同样,找到javascript.json
image.png
"Print to console": {
"prefix": "clog",
"body": [
"console.log('$1');",
"$2"
],
"description": "Log output to console"
}
网友评论