iview/examples/routers/tabs.vue

23 lines
536 B
Vue
Raw Normal View History

2019-08-27 09:42:40 +08:00
<template>
2019-09-06 10:54:50 +08:00
<div style="height: 5000px">
<Tabs type="card">
<TabPane v-for="tab in tabs" :key="tab" :label="'标签' + tab">标签{{ tab }}</TabPane>
<Button @click="handleTabsAdd" size="small" slot="extra">增加</Button>
</Tabs>
</div>
2019-08-27 09:42:40 +08:00
</template>
<script>
export default {
data () {
return {
tabs: 20
}
},
methods: {
handleTabsAdd () {
this.tabs ++;
2019-08-27 09:42:40 +08:00
}
}
}
</script>