Commit 4258a559c2b5d5afe7579b364e8690ed8348d776

Authored by 梁灏
1 parent f3dc447b

update

examples/routers/cell.vue
... ... @@ -9,7 +9,7 @@
9 9 <Cell title="标题二">
10 10 <Icon type="trash-a" slot="icon"></Icon>
11 11 </Cell>
12   - <Cell title="标题三">六七十</Cell>
  12 + <Cell><span style="color: #ff6600">六七十111</span></Cell>
13 13 <Cell title="标题四" selected></Cell>
14 14 <Cell title="标题五"></Cell>
15 15 <Cell title="标题六" disabled></Cell>
... ...
src/components/cell/cell-item.vue
... ... @@ -4,13 +4,11 @@
4 4 <slot name="icon"></slot>
5 5 </div>
6 6 <div class="ivu-cell-main">
7   - <div class="ivu-cell-title" v-if="title !== ''">{{ title }}</div>
8   - <div class="ivu-cell-label" v-if="label !== ''">{{ label }}</div>
9   - <slot></slot>
  7 + <div class="ivu-cell-title"><slot>{{ title }}</slot></div>
  8 + <div class="ivu-cell-label"><slot name="label">{{ label }}</slot></div>
10 9 </div>
11 10 <div class="ivu-cell-footer">
12   - <span class="ivu-cell-extra" v-if="extra !== ''">{{ extra }}</span>
13   - <slot name="extra" v-else></slot>
  11 + <span class="ivu-cell-extra"><slot name="extra">{{ extra }}</slot></span>
14 12 </div>
15 13 </div>
16 14 </template>
... ...
src/components/cell/cell.vue
1 1 <template>
2   - <div :class="classes" tabindex="0">
  2 + <div :class="classes">
3 3 <a v-if="to" :href="linkUrl" class="ivu-cell-link" @click.prevent="handleClick">
4 4 <CellItem :title="title" :label="label" :extra="extra">
5 5 <slot name="icon" slot="icon"></slot>
6   - <slot></slot>
  6 + <slot slot="default"></slot>
7 7 <slot name="extra" slot="extra"></slot>
  8 + <slot name="label" slot="label"></slot>
8 9 </CellItem>
9 10 </a>
10 11 <div class="ivu-cell-link" v-else>
11 12 <CellItem :title="title" :label="label" :extra="extra">
12 13 <slot name="icon" slot="icon"></slot>
13   - <slot></slot>
  14 + <slot slot="default"></slot>
14 15 <slot name="extra" slot="extra"></slot>
  16 + <slot name="label" slot="label"></slot>
15 17 </CellItem>
16 18 </div>
17 19 <div class="ivu-cell-arrow" v-if="to">
... ...