@dataloop-ai/components 0.16.29 → 0.16.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataloop-ai/components",
3
- "version": "0.16.29",
3
+ "version": "0.16.30",
4
4
  "exports": {
5
5
  ".": "./index.ts",
6
6
  "./models": "./models.ts",
@@ -1,11 +1,6 @@
1
- <template>
2
- <div :id="uuid">
3
- <component :is="activeTab" />
4
- </div>
5
- </template>
6
1
  <script lang="ts">
7
2
  import { v4 } from 'uuid'
8
- import { defineComponent, VNode, isVue2 } from 'vue-demi'
3
+ import { defineComponent, VNode, isVue2, h } from 'vue-demi'
9
4
  import { textSlot } from '../../../utils/render'
10
5
 
11
6
  export default defineComponent({
@@ -30,12 +25,24 @@ export default defineComponent({
30
25
  const tabIndex = this.panels.findIndex(
31
26
  (item) => item?.data?.key === this.modelValue
32
27
  )
33
- return [this.panels[tabIndex]] as any
28
+ return this.panels[tabIndex] as any
34
29
  }
35
30
  return (this.panels as any[])[0].children.find(
36
31
  (panel: any) => panel.key === this.modelValue
37
32
  )
38
33
  }
34
+ },
35
+ render(createElement: Function) {
36
+ const renderFn = isVue2 ? createElement : h
37
+ return renderFn(
38
+ 'div',
39
+ {
40
+ attrs: {
41
+ id: this.uuid
42
+ }
43
+ },
44
+ [this.activeTab]
45
+ )
39
46
  }
40
47
  })
41
48
  </script>