Commit 59e1a7c6c122a7ae1d70751c7fdf031174992aff

Authored by Aresn
Committed by GitHub
2 parents 62a06f56 79c58804

Merge pull request #623 from purocean/fet-steps

给Step组件增加slot支持
Showing 2 changed files with 17 additions and 1 deletions   Show diff stats
examples/routers/steps.vue
@@ -60,6 +60,20 @@ @@ -60,6 +60,20 @@
60 <Step title="待进行" content="这里是该步骤的描述信息"></Step> 60 <Step title="待进行" content="这里是该步骤的描述信息"></Step>
61 <Step title="待进行" content="这里是该步骤的描述信息"></Step> 61 <Step title="待进行" content="这里是该步骤的描述信息"></Step>
62 </Steps> 62 </Steps>
  63 + <Steps direction="vertical" :current="3">
  64 + <Step title="已完成" content="这里是该步骤的描述信息">
  65 + <div style="font-size: 16px; color: green">这里是该步骤的描述信息1</div>
  66 + </Step>
  67 + <Step title="进行中" content="这里是该步骤的描述信息">
  68 + <div style="font-size: 24px; color: red">这里是该步骤的描述信息2</div>
  69 + </Step>
  70 + <Step title="待进行" content="这里是该步骤的描述信息">
  71 + <div style="font-size: 46px; color: blue">这里是该步骤的描述信息3</div>
  72 + </Step>
  73 + <Step title="待进行" content="这里是该步骤的描述信息">
  74 + <div style="font-size: 24px; color: green">这里是该步骤的描述信息4</div>
  75 + </Step>
  76 + </Steps>
63 </div> 77 </div>
64 </template> 78 </template>
65 <script> 79 <script>
src/components/steps/step.vue
@@ -9,7 +9,9 @@ @@ -9,7 +9,9 @@
9 </div> 9 </div>
10 <div :class="[prefixCls + '-main']"> 10 <div :class="[prefixCls + '-main']">
11 <div :class="[prefixCls + '-title']">{{ title }}</div> 11 <div :class="[prefixCls + '-title']">{{ title }}</div>
12 - <div v-if="content" :class="[prefixCls + '-content']">{{ content }}</div> 12 + <slot>
  13 + <div v-if="content" :class="[prefixCls + '-content']">{{ content }}</div>
  14 + </slot>
13 </div> 15 </div>
14 </div> 16 </div>
15 </template> 17 </template>