import Vue from 'vue'
import VueRouter, { RouteConfig } from 'vue-router'
import App from '../App.vue'

Vue.use(VueRouter)

const routes: Array<RouteConfig> = [
  {
    path: '/',
    name: 'App',
    component: App, 
    children:[
      {
        path:'/Home',
        name: 'Home',
        component:()=>import('@/view/Home/index.vue')
      },
      {
        path:'/Mine',
        name: 'Mine',
        component:()=>import('@/view/Mine/index.vue')
      }
    ]
  },
  {
    path:'/Nft/create',
    name:'createNft',
    component:()=>import('@/view/NFT/Create.vue'),
    meta:{
      title:'NFT发行'
    }
  }

]



const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
