前端頁(yè)面跳轉(zhuǎn)的流程
1、登錄頁(yè)面跳轉(zhuǎn)的流程
先找到 views下面的login.vue 文件、查看 login.vue 文件、查找 handleLogin() {} 函數(shù)
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
這里代碼登錄成功 進(jìn)行跳轉(zhuǎn)
找到 router下面的index.js 文件 、查看 /的路由跳轉(zhuǎn)配置
//首頁(yè)的跳轉(zhuǎn)
{
path: '',
component: Layout,
redirect: 'index',
children: [
{
path: 'index',
component: () => import('@/views/index'),
name: 'Index',
meta: { title: '首頁(yè)', icon: 'dashboard', affix: true }
}
]
}
找到@/views/index 頁(yè)面 可以修改index.vue 頁(yè)面
<template>
<div class="app-container home">
<!-- 首頁(yè) -->
<h1> welcome index page </h1>
</div>
</template>
2、添加新菜單的流程
1、選中菜單按鈕
2、添加一級(jí)菜單
3、添加二級(jí)菜單
數(shù)據(jù)庫(kù)表的結(jié)構(gòu)
數(shù)據(jù)庫(kù)中的數(shù)據(jù)結(jié)構(gòu)示例
3、頁(yè)面跳轉(zhuǎn)
1、添加自己的模塊
2、注意視圖的路勁
文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-540724.html
3、框架動(dòng)態(tài)路由配置好、都是從數(shù)據(jù)庫(kù)動(dòng)態(tài)獲取、寫(xiě)代碼需要注意規(guī)范、和框架保持一致就可以文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-540724.html
到了這里,關(guān)于若依項(xiàng)目前端頁(yè)面跳轉(zhuǎn)的流程的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!