在这里插入图片描述
1.vue代码片段
在这里插入图片描述
console.log

"clg": {
	"prefix": "clg",
	"body": [
		"console.log($1)",
		// "$2"
	],
	"description": "Log output to console"
}

vue2

{
	"vue2 ": {
		"prefix": "vue2",
		"body": [
			"<template>",
			"  <div>",
			"",
			"  </div>",
			"</template>",
			"",
			"<script>",
			"export default {",
			"  data() {",
			"    return {",
			"",
			"    }",
			"  },",
			"  created() {",
			"",
			"  },",
			"  mouted() {",
			"",
			"  },",
			"  methods: {",
			"",
			"  },",
			"}",
			"</script>",
			"<style scoped>",
			"",
			"</style>"
		],
		"description": "Log output to console"
	}
}

vue3

{
    "vue3": {
        "prefix": "vue3",
        "body": [
            "<template>",
            "  <div></div>",
            "</template>",
            "",
            "<script lang='ts' setup>",
            "import { ref, reactive, toRefs, onMounted } from 'vue'",
            "",
            "</script>",
            "<style scoped lang='scss'></style>"

        ],
        "description": "Log output to console"
    }
}

2.express代码片段
在这里插入图片描述

{
	"Print to console": {
		"prefix": "express",
		"body": [
			"const express = require('express')",
			"//创建express的服务器实例",
			"const app = express()",
			"",
			"//调用app.listen方法,指定端口号并启动web服务器",
			"app.listen(80,function(){",
			"console.log('Express server running at http://127.0.0.1')",
			"})",
		],
		"description": "Log output to console"
	}
}
Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐