Vue配置(命令细节)

82 阅读1分钟

1.    配置环境(强制安装命令npm install --save axios --legacy-peer-deps)

安装nodejs,

安装vue:命令npm intall -g vue

然后

//卸载

npm uninstall vue-cli -g //安装

npm install -g @vue/cli

现在vue安装完成可以通过vue指令进行操作了

2.组件模板

image.png

3.vscode vue模板

{

"Print to console": {
 	"prefix": "vue",
 	"body": [
		"<template>",
		"</template>",
		"<script>",
		"export default {",
		"name: '',",
		"data() {",
		"    return {",
		"    };",
		"},",
		"watch: {},",
		"computed: {},",
		"methods: {},",
		"created() {},",
		"mounted() {}",
		"};",
		"</script>",
		"<style  scoped>",
		"</style>"
 	],
 	"description": "vue template"
 }

}