Commit b216f33c743ea499086bc1ae4aada17ef38fcf59

Authored by 梁灏
1 parent 3fe51bfc

update Cell component

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