本文實(shí)例為大家分享了vue+element tabs選項(xiàng)卡分頁(yè)效果的具體代碼,供大家參考,具體內(nèi)容如下
公司主營(yíng)業(yè)務(wù):網(wǎng)站設(shè)計(jì)、成都網(wǎng)站設(shè)計(jì)、移動(dòng)網(wǎng)站開發(fā)等業(yè)務(wù)。幫助企業(yè)客戶真正實(shí)現(xiàn)互聯(lián)網(wǎng)宣傳,提高企業(yè)的競(jìng)爭(zhēng)能力。成都創(chuàng)新互聯(lián)是一支青春激揚(yáng)、勤奮敬業(yè)、活力青春激揚(yáng)、勤奮敬業(yè)、活力澎湃、和諧高效的團(tuán)隊(duì)。公司秉承以“開放、自由、嚴(yán)謹(jǐn)、自律”為核心的企業(yè)文化,感謝他們對(duì)我們的高要求,感謝他們從不同領(lǐng)域給我們帶來(lái)的挑戰(zhàn),讓我們激情的團(tuán)隊(duì)有機(jī)會(huì)用頭腦與智慧不斷的給客戶帶來(lái)驚喜。成都創(chuàng)新互聯(lián)推出鄒平免費(fèi)做網(wǎng)站回饋大家。
文件目錄:
功能展示:
路由配置:
{ path: '/account', component: ()=> import('../components/home/home.vue'), //布局頁(yè)面 redirect: '/account/all-account/list', //定向到list路徑 name: '賬號(hào)管理', children: [ { path: '/account/all-account/list', redirect: '/account/all-account/staff', //定向到staff路徑 name: '員工管理', component: () => import('../components/view/account/index.vue'), children: [ { path: '/account/all-account/staff', component: () => import('../components/view/account/account.vue'), hidden: true }, { path: '/account/all-account/agent', name: '代理人賬號(hào)', component: () => import('../components/view/account/agent.vue'), hidden: true }, { path: '/account/all-account/department', name: '部門設(shè)置', component: () => import('../components/view/account/department.vue'), hidden: true }, { path: '/account/all-account/role', name: '角色權(quán)限設(shè)置', component: () => import('../components/view/account/role.vue'), hidden: true }, { path: '/account/all-account/city', name: '城市管理', component: () => import('../components/view/account/city.vue'), hidden: true }, ] }, }
組件代碼:
index.vue
<template> <div class="page_container" > <router-view /> </div> </template>
account.vue
<template> <!-- 賬號(hào)管理tab分頁(yè) --> <div id="employeeCareMng" class="page_container" > <div v-if="isNative" > <div > <el-tabs v-model="activeName" @tab-click="handleClick"> <el-tab-pane label="員工賬號(hào)" name="first" > <staff/> </el-tab-pane> <el-tab-pane label="代理人賬號(hào)" name="second" > <agent/> </el-tab-pane> <el-tab-pane label="部門設(shè)置" name="third" > <department/> </el-tab-pane> <el-tab-pane label="角色權(quán)限設(shè)置" name="fourth" > <role/> </el-tab-pane> <el-tab-pane label="城市管理" name="fifth" > <city/> </el-tab-pane> </el-tabs> </div> </div> <div v-else > <router-view /> </div> </div> </template> <script> import staff from './staff' import agent from './agent' import department from './department' import role from './role' import city from './city' export default { components: { staff,agent,department,role,city }, data() { return { isNative: true, activeName: 'first' //默認(rèn)先渲染第一個(gè) } }, //頁(yè)面初始默認(rèn)是第一個(gè)板塊展示 created() { if (this.$route.path === '/account/all-account/staff') { this.isNative = true } else { this.isNative = false } }, methods: { handleClick(tab, event) { console.log(tab, event) } } } </script> <style scoped> .page_container{ background: #ffffff; height: 100%; } </style> <style > #employeeCareMng .el-tabs__content { height:calc(100% - 55px); } </style>
其他tabs分頁(yè)的組件:
staff.vue 其他類似
<template> <div class="staff"> 員工賬號(hào) </div> </template> <script> export default { name:"staff", data(){ return { } }, created(){ }, methods: { }, }; </script> <style scoped>
以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持創(chuàng)新互聯(lián)。
名稱欄目:vue+elementtabs選項(xiàng)卡分頁(yè)效果
瀏覽路徑:http://chinadenli.net/article28/ppsgcp.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供電子商務(wù)、服務(wù)器托管、網(wǎng)站導(dǎo)航、建站公司、微信公眾號(hào)、外貿(mào)建站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)