Commit b216f33c743ea499086bc1ae4aada17ef38fcf59

Authored by 梁灏
1 parent 3fe51bfc

update Cell component

examples/routers/cell.vue
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 <Cell title="标题八"> 21 <Cell title="标题八">
22 <i-switch v-model="switch1" slot="extra"></i-switch> 22 <i-switch v-model="switch1" slot="extra"></i-switch>
23 </Cell> 23 </Cell>
24 - <Cell title="标题九" to="/button"></Cell> 24 + <Cell title="标题九" to="/button" target="_blank"></Cell>
25 </CellGroup> 25 </CellGroup>
26 </Card> 26 </Card>
27 </div> 27 </div>
src/components/cell/cell.vue
1 <template> 1 <template>
2 <div :class="classes"> 2 <div :class="classes">
3 - <a v-if="to" :href="linkUrl" class="ivu-cell-link" @click.prevent="handleClick" @click="handleClickItem"> 3 + <a v-if="to" :href="linkUrl" :target="target" class="ivu-cell-link" @click="handleClickItem">
4 <CellItem :title="title" :label="label" :extra="extra"> 4 <CellItem :title="title" :label="label" :extra="extra">
5 <slot name="icon" slot="icon"></slot> 5 <slot name="icon" slot="icon"></slot>
6 <slot slot="default"></slot> 6 <slot slot="default"></slot>
@@ -58,13 +58,6 @@ @@ -58,13 +58,6 @@
58 selected: { 58 selected: {
59 type: Boolean, 59 type: Boolean,
60 default: false 60 default: false
61 - },  
62 - to: {  
63 - type: [Object, String]  
64 - },  
65 - replace: {  
66 - type: Boolean,  
67 - default: false  
68 } 61 }
69 }, 62 },
70 data () { 63 data () {
@@ -85,8 +78,10 @@ @@ -85,8 +78,10 @@
85 }, 78 },
86 }, 79 },
87 methods: { 80 methods: {
88 - handleClickItem () { 81 + handleClickItem (event) {
89 this.cellGroup.handleClick(this.name); 82 this.cellGroup.handleClick(this.name);
  83 +
  84 + this.handleCheckClick(event);
90 } 85 }
91 } 86 }
92 }; 87 };
src/styles/common/article.less
@@ -50,7 +50,7 @@ @@ -50,7 +50,7 @@
50 font-size: 14px; 50 font-size: 14px;
51 } 51 }
52 52
53 - a[target="_blank"]:after{ 53 + a:not([class^="ivu-"])[target="_blank"]:after{
54 content: "\F24C"; 54 content: "\F24C";
55 font-family: Ionicons; 55 font-family: Ionicons;
56 color: #aaa; 56 color: #aaa;