Commit 55dbf62d68856d3981341031dabf6387ee3203d9
1 parent
4098c176
update Tabs render
Showing
4 changed files
with
11 additions
and
32 deletions
Show diff stats
src/components/base/render.vue deleted
| 1 | -<template> | |
| 2 | - <div ref="cell"></div> | |
| 3 | -</template> | |
| 4 | -<script> | |
| 5 | - import Vue from 'vue'; | |
| 6 | - export default { | |
| 7 | - name: 'RenderCell', | |
| 8 | - props: { | |
| 9 | - render: Function | |
| 10 | - }, | |
| 11 | - methods: { | |
| 12 | - compile () { | |
| 13 | - if (this.render) { | |
| 14 | - this.$el.innerHTML = ''; | |
| 15 | - const component = new Vue({ | |
| 16 | - functional: true, | |
| 17 | - render: (h) => { | |
| 18 | - return this.render(h); | |
| 19 | - } | |
| 20 | - }); | |
| 21 | - const Cell = component.$mount(); | |
| 22 | - this.$refs.cell.appendChild(Cell.$el); | |
| 23 | - } | |
| 24 | - } | |
| 25 | - }, | |
| 26 | - mounted () { | |
| 27 | - this.compile(); | |
| 28 | - } | |
| 29 | - }; | |
| 30 | -</script> | |
| 31 | 0 | \ No newline at end of file |
src/components/table/expand.js
src/components/tabs/tabs.vue
| ... | ... | @@ -23,7 +23,7 @@ |
| 23 | 23 | </template> |
| 24 | 24 | <script> |
| 25 | 25 | import Icon from '../icon/icon.vue'; |
| 26 | - import Render from '../base/render.vue'; | |
| 26 | + import Render from '../base/render'; | |
| 27 | 27 | import { oneOf, getStyle } from '../../utils/assist'; |
| 28 | 28 | import Emitter from '../../mixins/emitter'; |
| 29 | 29 | ... | ... |