luban h5编辑器 代码详解1
luban h5编辑器 代码详解1
先看路由器
router.js
import Vue from 'vue' import Router from 'vue-router' // import Home from './views/Home.vue' import Home from './views/work-manager/index.vue' Vue.use(Router) export default new Router({ // mode: 'history', routes: [ { path: '/', component: Home, redirect: '/work-manager/list', children: [ { path: '/work-manager/list', name: 'work-manager-list', component: () => import('@/views/work-manager/list.vue') }, { path: '/work-manager/templates', name: 'work-manager-templates', component: () => import('@/views/work-manager/templates.vue') }, { path: '/work-manager/form-stat', name: 'form-stat', component: () => import('@/views/work-manager/form-stat/index.vue') }, { path: '/work-manager/stat-detail/:id', name: 'stat-detail', component: () => import('@/views/work-manager/form-stat/detail.vue') } ] }, { path: '/editor/:workId', // #!zh 编辑器页面,核心功能部分 name: 'editor', component: () => import('./views/Editor.vue') } ] })
每个页面都是写在vue后缀的文件里里的
如果遇到什么不懂的地方直接关注公众号留言(本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须在文章页面给出原文连接,否则保留追究法律责任的权利。)
作者:newmiracle
出处:https://www.cnblogs.com/newmiracle/