update Cell component

This commit is contained in:
梁灏 2018-06-29 18:16:18 +08:00
parent 3fe51bfca2
commit b216f33c74
3 changed files with 6 additions and 11 deletions

View file

@ -21,7 +21,7 @@
<Cell title="标题八"> <Cell title="标题八">
<i-switch v-model="switch1" slot="extra"></i-switch> <i-switch v-model="switch1" slot="extra"></i-switch>
</Cell> </Cell>
<Cell title="标题九" to="/button"></Cell> <Cell title="标题九" to="/button" target="_blank"></Cell>
</CellGroup> </CellGroup>
</Card> </Card>
</div> </div>

View file

@ -1,6 +1,6 @@
<template> <template>
<div :class="classes"> <div :class="classes">
<a v-if="to" :href="linkUrl" class="ivu-cell-link" @click.prevent="handleClick" @click="handleClickItem"> <a v-if="to" :href="linkUrl" :target="target" class="ivu-cell-link" @click="handleClickItem">
<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="default"></slot> <slot slot="default"></slot>
@ -58,13 +58,6 @@
selected: { selected: {
type: Boolean, type: Boolean,
default: false default: false
},
to: {
type: [Object, String]
},
replace: {
type: Boolean,
default: false
} }
}, },
data () { data () {
@ -85,8 +78,10 @@
}, },
}, },
methods: { methods: {
handleClickItem () { handleClickItem (event) {
this.cellGroup.handleClick(this.name); this.cellGroup.handleClick(this.name);
this.handleCheckClick(event);
} }
} }
}; };

View file

@ -50,7 +50,7 @@
font-size: 14px; font-size: 14px;
} }
a[target="_blank"]:after{ a:not([class^="ivu-"])[target="_blank"]:after{
content: "\F24C"; content: "\F24C";
font-family: Ionicons; font-family: Ionicons;
color: #aaa; color: #aaa;