// script 标签引入,根据版本号引入JS版本。
<script src="https://websdk.videocc.net/interactions-receive-sdk-ui-default/0.24.0/lib/PcTopic/PcTopic.umd.min.js"></script>
// PC端
<script>
const Topic = window.PolyvIRScene.PcTopic.default;
</script>
// script 标签引入,根据版本号引入JS版本。
<script src="https://websdk.videocc.net/interactions-receive-sdk-ui-default/0.24.0/lib/MobileTopic/MobileTopic.umd.min.js"></script>
// 移动端
<script>
const Topic = window.PolyvIRScene.MobileTopic.default;
</script>
// PC 端
import Topic from '@polyv/interactions-receive-sdk-ui-default/lib/PcTopic';
// 移动端
import Topic from '@polyv/interactions-receive-sdk-ui-default/lib/MobileTopic';
<template>
<div>
<Topic
:lang="lang"
:topic-sdk="topicSdk"
/>
</div>
</template>
<script>
import { Topic as TopicSdk} from '@polyv/interactions-receive-sdk';
import Topic from '@polyv/interactions-receive-sdk-ui-default/lib/PcTopic';
export default {
components: {
Topic,
},
data() {
return {
// 话题SDK实例
topicSdk: null,
};
},
created() {
this.topicSdk = new TopicSdk();
},
beforeDestroy() {
this.topicSdk?.destroy();
},
};
</script>