- 首先在idea下创建一个空的项目
- 添加一个demo模块
terminal:npm install nrm -g // 全局安装nrm
terminal:cd demo
terminal:npm init -y // 初始化模块
terminal:npm install vue --save // 模块内安装vue - 创建hello.html
<!DOCTYPE html>
<html lang="ch">
<head>
<meta charset="UTF-8">
<title>hello</title>
</head>
<body>
<div id="app">
<h1> {{name}} is handsome</h1>
</div>
<script src="node_modules/vue/dist/vue.js"></script>
<script>
const app = new Vue({
el:"#app",//element vue作用的标签 它只能作用于el下的标签
data: {
name: "飞哥",
}
});
</script>
</body>
</html>