Step add title & content slot
This commit is contained in:
parent
f64de47872
commit
c704113d0d
2 changed files with 9 additions and 5 deletions
|
@ -1,7 +1,11 @@
|
|||
<template>
|
||||
<div style="border: 1px solid #ccc;">
|
||||
<Steps :current="1">
|
||||
<Step title="已完成" content="这里是该步骤的描述信息"></Step>
|
||||
<Step title="已完成">
|
||||
<div slot="content">
|
||||
这里是该步骤的描述信息
|
||||
</div>
|
||||
</Step>
|
||||
<Step title="进行中" content="这里是该步骤的描述信息"></Step>
|
||||
<Step title="待进行" content="这里是该步骤的描述信息"></Step>
|
||||
<Step title="待进行" content="这里是该步骤的描述信息"></Step>
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
</div>
|
||||
</div>
|
||||
<div :class="[prefixCls + '-main']">
|
||||
<div :class="[prefixCls + '-title']">{{ title }}</div>
|
||||
<slot>
|
||||
<div v-if="content" :class="[prefixCls + '-content']">{{ content }}</div>
|
||||
</slot>
|
||||
<div :class="[prefixCls + '-title']"><slot name="title">{{ title }}</slot></div>
|
||||
<div :class="[prefixCls + '-content']" v-if="content || $slots.content">
|
||||
<slot name="content">{{ content }}</slot>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
Loading…
Add table
Reference in a new issue