mirror of
https://github.com/element-plus/element-plus.git
synced 2025-02-17 11:49:41 +08:00
fix: fix tabs bug for 'v-for' (#618)
This commit is contained in:
parent
533638dd1a
commit
27cbf5fb6b
@ -1,6 +1,5 @@
|
||||
<script lang='ts'>
|
||||
import { h, defineComponent, ref, onMounted, onUpdated, provide, watch, nextTick, getCurrentInstance, ComputedRef, PropType, Ref, ComponentInternalInstance, VNode, Component } from 'vue'
|
||||
import { Fragment } from '@vue/runtime-core'
|
||||
import { h, defineComponent, ref, onMounted, onUpdated, provide, watch, nextTick, getCurrentInstance, ComputedRef, PropType, Ref, ComponentInternalInstance, VNode, Component, Fragment } from 'vue'
|
||||
import { EVENT_CODE } from '@element-plus/utils/aria'
|
||||
import TabNav from './tab-nav.vue'
|
||||
|
||||
|
@ -125,7 +125,9 @@ You can use named slot to customize the tab label content.
|
||||
```html
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane>
|
||||
<span slot="label"><i class="el-icon-date"></i> Route</span>
|
||||
<template #label>
|
||||
<span><i class="el-icon-date"></i> Route</span>
|
||||
</template>
|
||||
Route
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="Config">Config</el-tab-pane>
|
||||
|
@ -125,7 +125,9 @@ Es posible usar slots con nombre para personalizar el contenido de la etiqueta d
|
||||
```html
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane>
|
||||
<span slot="label"><i class="el-icon-date"></i> Route</span>
|
||||
<template #label>
|
||||
<span><i class="el-icon-date"></i> Route</span>
|
||||
</template>
|
||||
Route
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="Config">Config</el-tab-pane>
|
||||
|
@ -125,7 +125,9 @@ Vous pouvez utiliser un slot pour customiser le label d'un onglet.
|
||||
```html
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane>
|
||||
<span slot="label"><i class="el-icon-date"></i> Route</span>
|
||||
<template #label>
|
||||
<span><i class="el-icon-date"></i> Route</span>
|
||||
</template>
|
||||
Route
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="Config">Config</el-tab-pane>
|
||||
|
@ -125,7 +125,9 @@
|
||||
```html
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane>
|
||||
<span slot="label"><i class="el-icon-date"></i> Route</span>
|
||||
<template #label>
|
||||
<span><i class="el-icon-date"></i> Route</span>
|
||||
</template>
|
||||
Route
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="Config">Config</el-tab-pane>
|
||||
|
@ -123,7 +123,9 @@
|
||||
```html
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane>
|
||||
<span slot="label"><i class="el-icon-date"></i> 我的行程</span>
|
||||
<template #label>
|
||||
<span><i class="el-icon-date"></i> 我的行程</span>
|
||||
</template>
|
||||
我的行程
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="消息中心">消息中心</el-tab-pane>
|
||||
|
Loading…
Reference in New Issue
Block a user