// The Vue build version to load with the import command // (runtime-only or standalone) has been set in webpack.base.conf with an alias. import Vue from 'vue' import ElementUI from 'element-ui'; import 'element-ui/lib/theme-chalk/index.css'; // import App from './App' // import router from './router' import Layout from './components/layout.vue' import VueRouter from 'vue-router' import VueResource from 'vue-resource' // import axios from 'axios' import IndexPage from './pages/index' import DetailPage from './pages/detail' import OrderListPage from './pages/orderList' import DetailAnaPage from './pages/detail/analysis' import DetailCouPage from './pages/detail/count' import DetailForPage from './pages/detail/forecast' import DetailPubPage from './pages/detail/publish' import About from './pages/about'

Vue.config.productionTip = false Vue.use(VueRouter) Vue.use(VueResource) Vue.use(ElementUI);

let router = new VueRouter({ mode: 'history', routes: [ { path: '/', component: IndexPage }, { path: '/orderList', component: OrderListPage }, { path: '/about', component: About }, { path: '/detail', component: DetailPage, redirect: '/detail/analysis', children: [ { path: 'analysis', component: DetailAnaPage }, { path: 'count', component: DetailCouPage }, { path: 'forecast', component: DetailForPage }, { path: 'publish', component: DetailPubPage } ] } ] })

/* eslint-disable no-new */ new Vue({ el: '#app', router, template: '', components: { Layout } })


原文地址: https://www.cveoy.top/t/topic/pLrl 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录