This commit is contained in:
梁灏 2018-06-20 17:04:08 +08:00
parent da76a284d0
commit 5fe393db5c
3 changed files with 11 additions and 3 deletions

View file

@ -9,7 +9,7 @@
<Cell title="标题二"> <Cell title="标题二">
<Icon type="trash-a" slot="icon"></Icon> <Icon type="trash-a" slot="icon"></Icon>
</Cell> </Cell>
<Cell title="标题三"></Cell> <Cell title="标题三">六七十</Cell>
<Cell title="标题四" selected></Cell> <Cell title="标题四" selected></Cell>
<Cell title="标题五"></Cell> <Cell title="标题五"></Cell>
<Cell title="标题六" disabled></Cell> <Cell title="标题六" disabled></Cell>

View file

@ -1,6 +1,6 @@
<template> <template>
<div :class="classes"> <div :class="classes" tabindex="0">
<a v-if="to" class="ivu-cell-link" @click="handleClick"> <a v-if="to" :href="to" class="ivu-cell-link" @click.prevent="handleClick">
<CellItem :title="title" :label="label" :extra="extra"> <CellItem :title="title" :label="label" :extra="extra">
<slot name="icon" slot="icon"></slot> <slot name="icon" slot="icon"></slot>
<slot></slot> <slot></slot>

View file

@ -57,5 +57,13 @@
right: 16px; right: 16px;
font-size: @font-size-base; font-size: @font-size-base;
} }
&:focus{
background: @background-color-select-hover;
outline: none;
}
&-selected:focus{
background: shade(@selected-color, 10%);
}
} }
.select-item(@cell-prefix-cls, @cell-prefix-cls); .select-item(@cell-prefix-cls, @cell-prefix-cls);