-
前端开发神器:vscode,就是下面这个
-
-
首先必须安装扩展组件中的Vetur
-
-
选择设置>用户代码片段,然后输入:vue.json
插入以下代码:
{
"Print to console": {
"prefix": "vue",
"body": [
"<template>",
" <div class='$2'>$5</div>",
"</template>",
"",
"<script>",
"export default {",
" data() {",
" return {",
"",
" };",
" },",
" computed: {},",
" watch: {},",
" methods: {",
"",
" },",
" created() {",
"",
" },",
" mounted() {",
"",
" },",
" beforeCreate() {},",
" beforeMount() {},",
" beforeUpdate() {},",
" updated() {},",
" beforeDestroy() {},",
" destroyed() {},",
" activated() {},",
" components: {},",
"}",
"</script>",
"",
"<style lang='less' scoped>",//less是css的预处理器 要根据你所选择的处理器来进行更改
"$4",
"</style>"
],
"description": "Log output to console"
}
}