Commit 847c0d430216e51aaefc7f3221daffb47e127322
1 parent
a367d3e4
fixed #4158
Showing
3 changed files
with
9 additions
and
2 deletions
Show diff stats
examples/routers/table.vue
| 1 | 1 | <template> |
| 2 | 2 | <div> |
| 3 | - <Table ref="currentRowTable" :columns="columns3" :data="data1" :draggable="true" @on-drag-drop="onDragDrop"></Table> | |
| 3 | + <Table tooltip-theme="light" ref="currentRowTable" :columns="columns3" :data="data1" :draggable="true" @on-drag-drop="onDragDrop"></Table> | |
| 4 | 4 | <Button @click="handleClearCurrentRow">Clear</Button> |
| 5 | 5 | </div> |
| 6 | 6 | </template> | ... | ... |
src/components/table/cell.vue
| ... | ... | @@ -7,7 +7,7 @@ |
| 7 | 7 | <template v-if="renderType === 'html'"><span v-html="row[column.key]"></span></template> |
| 8 | 8 | <template v-if="renderType === 'normal'"> |
| 9 | 9 | <template v-if="column.tooltip"> |
| 10 | - <Tooltip transfer :content="row[column.key]" :disabled="!showTooltip" :max-width="300" class="ivu-table-cell-tooltip"> | |
| 10 | + <Tooltip transfer :content="row[column.key]" :theme="tableRoot.tooltipTheme" :disabled="!showTooltip" :max-width="300" class="ivu-table-cell-tooltip"> | |
| 11 | 11 | <span ref="content" @mouseenter="handleTooltipIn" @mouseleave="handleTooltipOut" class="ivu-table-cell-tooltip-content">{{ row[column.key] }}</span> |
| 12 | 12 | </Tooltip> |
| 13 | 13 | </template> |
| ... | ... | @@ -41,6 +41,7 @@ |
| 41 | 41 | export default { |
| 42 | 42 | name: 'TableCell', |
| 43 | 43 | components: { Icon, Checkbox, TableExpand, TableSlot, Tooltip }, |
| 44 | + inject: ['tableRoot'], | |
| 44 | 45 | props: { |
| 45 | 46 | prefixCls: String, |
| 46 | 47 | row: Object, | ... | ... |
src/components/table/table.vue