vscode 自动生成 vue component 模板

有点强迫症,所以代码格式要求工整的可以copy。
ctrl + shift + p 找到vue.json 修改即可

"Print to console": {
        "prefix": "vue",
        "body": [
			"<!--  -->",
            "<template>",
            "    <div>",
            "        $0",
            "    </div>",
            "</template>",
            "",
            "<script>",
            "    export default {",
            "        name:'',",
            "        props:[''],",
            "        data () {",
            "            return {",
            "",
            "            };",
            "        },",
            "        components: {},",
            "        computed: {},",
            "        beforeMount() {},",
            "        mounted() {},",
            "        methods: {},",
            "        watch: {}",
            "",
            "    }",
            "",
			"</script>",
			"",
            "<style lang='' scoped>",
            "",
            "</style>"
        ],
		"description": "Log output to console"
	}
Logo

前往低代码交流专区

更多推荐