mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-05-03 00:12:43 +08:00
25 lines
548 B
Markdown
25 lines
548 B
Markdown
---
|
|
layout: templateLayout
|
|
---
|
|
```vue
|
|
<template>
|
|
<Tabs value="1" closable @on-tab-remove="remove">
|
|
<Tab v-for="(item,index) in arr" :label="'标签' + item" :name="item" :key="index">
|
|
<p>{{item}}</p>
|
|
</Tab>
|
|
<Wb-button type="ghost" slot="action" @click="addItem">增加</Wb-button>
|
|
</Tabs>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
methods: {
|
|
addItem(){
|
|
this.arr.push(this.arr.length + 1);
|
|
},
|
|
remove(){
|
|
console.log(arguments)
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
``` |