4_TabContainer

1.配置路由css

 

 

2. 使用ui

 

 

<template>component

<div id="tab">ip

<div class="nav">路由

<mt-button size="small" @click.native.prevent="active = 'tab-container1'">tab 1</mt-button>it

<mt-button size="small" @click.native.prevent="active = 'tab-container2'">tab 2</mt-button>event

<mt-button size="small" @click.native.prevent="active = 'tab-container3'">tab 3</mt-button>class

</div>import

 

<div class="page-tab-container">cli

<mt-tab-container class="page-tabbar-tab-container" v-model="active">

<mt-tab-container-item id="tab-container1">

home

</mt-tab-container-item>

 

<mt-tab-container-item id="tab-container2">

order

</mt-tab-container-item>

 

<mt-tab-container-item id="tab-container3">

mine

</mt-tab-container-item>

</mt-tab-container>

</div>

</div>

</template>

 

<script>

import { TabContainer, TabContainerItem, Cell } from 'mint-ui'

 

export default {

name: 'tab',

data () {

return {

active: 'tab-container1'

}

},

components: {

MtTabContainer: TabContainer,

MtTabContainerItem: TabContainerItem,

MtCell: Cell

}

}

</script>

 

<style lang="css" scoped>

 

.nav {

padding: 10px;

}

 

 

</style>

本站公眾號
   歡迎關注本站公眾號,獲取更多信息