gpt4 book ai didi

vue.js - Vue轮播——设置图标为导航标签

转载 作者:搜寻专家 更新时间:2023-10-30 22:23:59 25 4
gpt4 key购买 nike

我正在使用这个 vue 轮播 package ,我正在尝试将图标设置为导航按钮,如下所示:

<carousel
:perPage="1"
:navigationEnabled="true"
:navigationNextLabel="'<i class="material-icons">keyboard_arrow_right</i>'"
:navigationPrevLabel="'<i class="material-icons">keyboard_arrow_left</i>'"
>
<slide v-for="testimonial of testimonials" :key="testimonial.id">
<img v-if="testimonial.image" :src="testimonial.image.data.path" class="is-96x96">
<h4>{{ testimonial.title }}</h4>
<p>{{ testimonial.excerpt }}</p>
</slide>
</carousel>

但是,由于某种原因,它不起作用,我将其作为 html 中的输出:

enter image description here

最佳答案

这里的 Prop 不是动态的,所以代码应该是

<carousel
perPage="1"
:navigationEnabled="true"
navigationNextLabel="<i class='material-icons'>keyboard_arrow_right</i>"
navigationPrevLabel="<i class='material-icons'>keyboard_arrow_left</i>"
>
<slide v-for="testimonial of testimonials" :key="testimonial.id">
<img v-if="testimonial.image" :src="testimonial.image.data.path" class="is-96x96">
<h4>{{ testimonial.title }}</h4>
<p>{{ testimonial.excerpt }}</p>
</slide>
</carousel>

关于vue.js - Vue轮播——设置图标为导航标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46051009/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com