vue--day35--脚手架分析
pckgage.json 包的说明书
"scripts": {
"serve": "vue-cli-service serve", 运行项目
"build": "vue-cli-service build", 编译
"lint": "vue-cli-service lint" 语法检查
},
package-lock.json 包版本控制文件
执行顺序
npm run serve
执行 main.js 该文件是整个项目的入口文件
App.vue
assets 存放静态资源
components 放程序员写的组件
运行后报错。Component name "School" should always be multi-word
解决方法。打开vue.config.js文件 /*关闭语法检查*/ lintOnSave: false
index.html
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8" />
<!--针对IE 浏览器的一个特殊配置,含义是让IE浏览器以最高的渲染级别渲染页面-->
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- 打开移动端的理想窗口-->
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<!--配置页签图标-->
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<!--配置网络标题 找pckgage.json 里面的name 做为标题-->
<title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<!--当浏览器不支持js 时noscript 中的元素会被渲染-->
<noscript>
<strong
>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
properly without JavaScript enabled. Please enable it to
continue.</strong
>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

浙公网安备 33010602011771号