juzser / vue-bot-ui

For the one who is finding a customizable chatbot UI.
MIT License
155 stars 32 forks source link

How to use the action slot "Attach" #54

Closed guisalva closed 7 months ago

guisalva commented 8 months ago

Hey mate, i'm studying this lib and I am trying to add the "Attach" slot, on the action bar.

Can you take a look and clear my doubt ??

<VueBotUI 
    ...
    :slots="slotOptions"
    ... >
</VueBotUI>
data: () => ({
        ...
        botOptions: {
            ...
        },
        slotOptions: {
            action: 'attach',
        },
    }),
juzser commented 8 months ago

Hey @GuiSalva

I guess you can use as normal Vue 2 named slot:

<VueBotUI>
  <template v-slot:actions>
    <your attach component>
  </template>
</VueBotUI>