天天看點

快速建立在html5編寫的vue模闆

vs code->首選項->使用者片段->html.json,打開html.json檔案,在裡面輸入以下代碼即可:

{
	"Html5-Vue": {
		"prefix": "Vue",
		"body": [
			"<!DOCTYPE html>",
			"<html zh-CN\">",
			"<head>",
			"\t<meta charset=\"UTF-8\">",
			"\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">",
			"\t<title>Document</title>",
			"</head>\n",
			"<body>",
			"\t<div id=\"app\">$1</div>\n",
			"\t<script src=\"../lib/vue.js\"></script>",
			"\t<script>",
			"\t\tlet vm = new Vue({",
			"\t\t\tel: '#app',",
			"\t\t\tdata: {message:'hello'},",
			"\t\t\tmethods: {}",
			"\t\t});",
			"\t</script>",
			"</body>\n",
			"</html>"
		],
		"description": "快速建立在html5編寫的vue模闆"
	}
}