使用了vue脚手架
1.路由:
使用路由目的是使用template组件,动态加载和指向。分head、content、footer三部分,content区域动态加载vue组件,文件结构如下:
index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>vuetest</title>
</head>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
入口文件main.js:
import Vue from 'vue'
import App from './App'
import router from './router'
import './assets/style1/css/Main.css'
import 'lib-flexible'
// import './assets/js/grid.js'
//import axios from 'axios'
Vue.config.productionTip = false
//Vue.prototype.Include1=include
//var ajaxdo1=include.ajaxdo
/* eslint-disable no-new */
new Vue({
el: '#app',
router,
components: { App },
template: '<App/>'
}
这里要引入vue、路由./router
太晚了,先记录到这里