ragnarlotus / vue-flux

Image slider which comes with 20 cool transitions
https://ragnarlotus.github.io/vue-flux-docs/demos/demos
MIT License
542 stars 49 forks source link

captions on click or link #49

Closed ab2d3e8 closed 5 years ago

ab2d3e8 commented 5 years ago

Is it possible to have caption like button click or link URL.

ragnarlotus commented 5 years ago

You can using your own caption component.

Take a lookt at this: https://github.com/deulos/vue-flux/wiki/Templating#caption

ab2d3e8 commented 5 years ago

I mean that contains div a property in which elements can be added

ragnarlotus commented 5 years ago

You can pass any string as caption, but vue will strip out all HTML tags to prevent injection.

This is the code of the current FluxCaption component:

<div v-if="caption" class="flux-caption">{{ caption }}</div>

To avoid the HTML stripping you will need to create you own caption component like this:

<div v-if="caption" v-html="caption" class="flux-caption"></div>
ab2d3e8 commented 5 years ago

Thanks