Skip to content

php代码生成

json
{
	"service-construct": {
		"prefix": "cphp",
		"body": [
			"<?php \r\n",
			"declare(strict_types=1);\r\n",
			"namespace ${TM_DIRECTORY/.*app/app/};\n",
			"class $TM_FILENAME_BASE",
			"{",
			"\tpublic function __construct()",
			"\t{\n",
			"\t}",
			"\tpublic function index()",
			"\t{\n",
			"\t}",
			"}"
		],
		"description": "generate service class"
	},
}

vue3代码生成

json
{
	"Print to console": {
		"prefix": "vue3",
		"body": [
			"<template>",
			"  <div class='index'>\n",
			"  </div>",
			"</template>\n",
			"<script setup>",
			"</script>\n",
			"<style scoped lang=\"${1:scss}\">\n",
			".index{}\n",
			"</style>\n",
		],
		"description": "Create vue template"
	}
}

vue2代码生成

json
{
	"Print to console": {
		"prefix": "vue2",
		"body": [
			"<template>",
			"  <div class='index'>\n",
			"  </div>",
			"</template>\n",
			"<script>",
			"export default {",
			"  props:[], \n",
			"  components: {\n",
			"  },",
			"  data() {",
			"    return {\n",
			"    };",
			"  },",
			"  computed: {\n",
			"  },",
			"  watch: {\n",
			"  },",
			"  created() {\n",
			"  },",
			"  mounted() {\n",
			"  },",
			"  methods: {\n",
			"  },",
			"};",
			"</script>\n",
			"<style scoped lang=\"${1:scss}\">\n",
			"</style>\n",
		],
		"description": "Create vue template"
	}
}

Released under the MIT License.