vs code 設置 vue_html 代碼段

1. 按鍵 ctr+shift+p

    

2.選擇html.json ,加入如下代碼:

	"vue html": {
        "prefix": "vh",
        "body": [
			"<!DOCTYPE html>",
			"<html>",
			"\t<head>",
			"\t<meta charset=\"utf-8\">",
			"\t<title>vue html demo</title>",
			"\t<script src=\"../lib/vue.min.js\"></script>",
			"\t</head>",
			"\t<body>",
			"\t\t<div id=\"app\">",
			"\t\t</div>",
			"\t\t<script>",
			"\t\t\tnew Vue({",
			"\t\t\t\tel: '#app',",
			"\t\t\t\tdata: {\n",
			"\t\t\t\t},",
			"\t\t\t\tmethods:{\n",
			"\t\t\t\t}",
			"\t\t\t})",
			"\t\t</script>",
			"\t</body>",
			"</html>"
        ],
        "description": "The full sample code - hello world."
    }

3.在新增的html 文件中按 vh 即可自動加入設置的代碼塊

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章