【问题标题】:CSS Carousel Not Working in Gridsome App?CSS Carousel 在 Gridsome 应用程序中不起作用?
【发布时间】:2020-05-06 08:39:19
【问题描述】:

我目前正在尝试使用 Buefy CSS 框架设置我的 Gridsome 应用程序的样式。除了 Carousel 之外,其他一切都运行良好(按钮、卡片等)。特别是 <b-carousel> 标记。

这是代码

<template>
  <DefaultLayout>

<template>
    <b-carousel :indicator-inside="false">
        <b-carousel-item v-for="(item, i) in 6" :key="i">
            <span class="image">
              <img :src="getImgUrl(i)">
            </span>
        </b-carousel-item>
        <template slot="indicators" slot-scope="props">
            <span class="al image">
                <img :src="getImgUrl(props.i)" :title="props.i">
            </span>
        </template>
    </b-carousel>
</template>
</DefaultLayout>
</template>

<script>
export default {
  methods: {
      getImgUrl(value) {
          return `https://picsum.photos/id/43${value}/1230/500`
      }
  }
}
</script>

请帮忙

【问题讨论】:

  • 能分享一下控制台截图吗?
  • @Ishu 控制台没有错误。图像没有显示
  • 您是否检查过不同的角落,例如,图像链接是否已正确生成并分配给标记?检查容器是否可见。

标签: javascript css vue.js buefy gridsome


【解决方案1】:

我很傻。问题是我的 Buefy 版本。我是 v0.8.9,我更新到 v0.8.10

【讨论】:

    猜你喜欢
    • 2017-06-10
    • 1970-01-01
    • 1970-01-01
    • 2018-03-27
    • 2019-10-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多