Commit afea484fe3cdbf10f2c3bf217da7219e1e5e622e
1 parent
f03c4e64
fixed #1271
Showing
2 changed files
with
11 additions
and
2 deletions
Show diff stats
examples/routers/table.vue
1 | <template> | 1 | <template> |
2 | - <Table width="550" border highlight-row @on-selection-change="change2" @on-current-change="change1" :columns="columns2" :data="data3"></Table> | 2 | + <Table |
3 | + width="550" | ||
4 | + border | ||
5 | + highlight-row | ||
6 | + :columns="columns2" | ||
7 | + @on-selection-change="change2" | ||
8 | + :data="data3"></Table> | ||
3 | </template> | 9 | </template> |
4 | <script> | 10 | <script> |
5 | export default { | 11 | export default { |
src/components/table/cell.vue
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <div :class="classes" ref="cell"> | 2 | <div :class="classes" ref="cell"> |
3 | <template v-if="renderType === 'index'">{{naturalIndex + 1}}</template> | 3 | <template v-if="renderType === 'index'">{{naturalIndex + 1}}</template> |
4 | <template v-if="renderType === 'selection'"> | 4 | <template v-if="renderType === 'selection'"> |
5 | - <Checkbox :value="checked" @on-change="toggleSelect" :disabled="disabled"></Checkbox> | 5 | + <Checkbox :value="checked" @click.native.stop="handleClick" @on-change="toggleSelect" :disabled="disabled"></Checkbox> |
6 | </template> | 6 | </template> |
7 | <template v-if="renderType === 'normal'"><span v-html="row[column.key]"></span></template> | 7 | <template v-if="renderType === 'normal'"><span v-html="row[column.key]"></span></template> |
8 | <template v-if="renderType === 'expand' && !row._disableExpand"> | 8 | <template v-if="renderType === 'expand' && !row._disableExpand"> |
@@ -73,6 +73,9 @@ | @@ -73,6 +73,9 @@ | ||
73 | }, | 73 | }, |
74 | toggleExpand () { | 74 | toggleExpand () { |
75 | this.$parent.$parent.$parent.toggleExpand(this.index); | 75 | this.$parent.$parent.$parent.toggleExpand(this.index); |
76 | + }, | ||
77 | + handleClick () { | ||
78 | + // 放置 Checkbox 冒泡 | ||
76 | } | 79 | } |
77 | }, | 80 | }, |
78 | created () { | 81 | created () { |