@junyul/vue
v1.2.2
Published
Junyul SDK for Vue 3 — useComply composable + ComplyBanner component.
Downloads
230
Readme
@junyul/vue
Vue 3 plugin + component for Junyul.
import { createApp } from 'vue';
import { createComplyPlugin } from '@junyul/vue';
const app = createApp(App);
app.use(createComplyPlugin({ apiKey: import.meta.env.VITE_JUNYUL_KEY }));<script setup lang="ts">
import { ComplyBanner, useComply } from '@junyul/vue';
const { track } = useComply();
async function ask(q: string) {
return track('chatbot_v1', () => fetch('/api/chat', { method: 'POST', body: q }));
}
</script>
<template>
<ComplyBanner asset-id="chatbot_v1" locale="ko" />
</template>