It can be divided into adding pages in the original folder and creating a new folder, and creating pages in this folder
1. Add a new page to the original folder:
For example, under the product folder, create a new page of commodity guarantee service, productguarantee
① First, create a new folder productguarantee under the product folder in the views directory, and then create an index Vue file
② Then, find the product under moudles in the router folder JS file, add the link and page address you want to jump to the newly added page under the file
{
path: ‘guarantee’,
name: ‘ProductGuarantee’,
meta: {
Title: 'guarantee service',
noCache: true
},
component: () => import(‘@/views/product/productGuarantee/index.vue’)
}
③ Access in browser:http://localhost:9528/admin/p…
Add a new folder and a new page under views. For example, now add a station folder under views
① First, create a new station folder under views, and create a new notice folder and index Vue file
② Then create a new station in the moudles folder under the router folder JS, declare the stationrouter and export it
import Layout from ‘@/layout’
import { roterPre } from ‘@/settings’
const stationRouter =
{
path: `${roterPre}/station`,
name: 'station',
meta: {
icon: '',
Title: 'announcement list'
},
alwaysShow: true,
component: Layout,
children: [
{
path: 'notice',
name: 'stationNotice',
meta: {
Title: 'announcement list'
},
component: () => import('@/views/station/notice/index')
}
]
}
export default stationRouter
③ Index. Under router folder Import in JS
④ Access on the page:http://localhost:9528/admin/s…
If you think this article is useful to you, please click Star:http://github.crmeb.net/u/defuesteem it a favor!