|
@@ -1,56 +1,23 @@
|
|
|
<script setup lang="ts">
|
|
|
-import { onMounted } from 'vue'
|
|
|
+import { onMounted, inject } from 'vue'
|
|
|
import { UIAudio, UIButton, UIIcon, UIInput } from '@kankan-components/components'
|
|
|
-import type { VNode } from 'vue'
|
|
|
+import Tags from './components/tag/Tags.vue'
|
|
|
// import { buildProps } from '@kankan-components/utils';
|
|
|
// import { h } from 'vue';
|
|
|
// import * as KanKanSDK from '@kankan/sdk';
|
|
|
// console.log('UI', UIAudio, UIIcon)
|
|
|
|
|
|
onMounted(async () => {
|
|
|
- const KanKan = (window as any).KanKan
|
|
|
- const app = new KanKan({
|
|
|
- // dom: '#scene',
|
|
|
- num: 'KJ-JYo2ZZyKKJ',
|
|
|
- })
|
|
|
- app.mount('#scene').render()
|
|
|
-
|
|
|
- // console.log('TagView', await TagView);
|
|
|
- // const el = h(KKAudio, {
|
|
|
- // src: 'http://samplelib.com/lib/preview/mp3/sample-3s.mp3',
|
|
|
- // });
|
|
|
- // app.use(KKAudio);
|
|
|
-
|
|
|
- // console.log('kankan', KKAudio);
|
|
|
- // const res = await kankan.use(KKAudio.render());
|
|
|
- // console.log('11', res);
|
|
|
- app.use('TagEditor')
|
|
|
-
|
|
|
- const TagView = await app.use('TagView', {
|
|
|
- render: (data: VNode) => {
|
|
|
- console.log('data', data.type)
|
|
|
- },
|
|
|
- })
|
|
|
-
|
|
|
- TagView.on('click', (event: Event) => {
|
|
|
- console.log('event', event)
|
|
|
- // debugger;
|
|
|
- })
|
|
|
- console.log('1app', app)
|
|
|
-
|
|
|
- const TagEditor = await app.TagManager.editor.promise()
|
|
|
- console.log('TagEditor', TagEditor)
|
|
|
- // TagEditor.enter();
|
|
|
-
|
|
|
- console.log('TagView', TagView)
|
|
|
- // .then(function () {
|
|
|
- // console.log(arguments);
|
|
|
- // });
|
|
|
+ const __sdk: any = inject('__sdk')
|
|
|
+ __sdk.mount('#scene').render()
|
|
|
})
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
<div id="scene">
|
|
|
+ <Tags />
|
|
|
+ </div>
|
|
|
+ <div id="scene-front">
|
|
|
<UIAudio src="http://samplelib.com/lib/preview/mp3/sample-3s.mp3" />
|
|
|
<UIButton>djdjddd</UIButton>
|
|
|
<UIIcon type="checkbox" :size="129" />
|
|
@@ -63,4 +30,10 @@ onMounted(async () => {
|
|
|
width: 100vw;
|
|
|
height: 100vh;
|
|
|
}
|
|
|
+#scene-front {
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ top: 0;
|
|
|
+ z-index: 2;
|
|
|
+}
|
|
|
</style>
|