Vue 轮播 - 将图标设置为导航标签

Lef*_*eff 4 carousel vue.js

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

<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>
Run Code Online (Sandbox Code Playgroud)

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

在此处输入图片说明

Shu*_*tel 6

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

<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>
Run Code Online (Sandbox Code Playgroud)