Commit 55dbf62d68856d3981341031dabf6387ee3203d9

Authored by Aresn
1 parent 4098c176

update Tabs render

src/components/base/render.js 0 → 100644
  1 +export default {
  2 + name: 'RenderCell',
  3 + functional: true,
  4 + props: {
  5 + render: Function
  6 + },
  7 + render: (h, ctx) => {
  8 + return ctx.props.render(h);
  9 + }
  10 +};
0 11 \ No newline at end of file
... ...
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
1   -
2 1 export default {
3 2 name: 'TableExpand',
4 3 functional: true,
... ...
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  
... ...