小编Fra*_*ati的帖子

Ant Design Vue:当只有一个 div 内容时,轮播箭头消失

我正在使用 Ant Design Vue 的 Carousel 在 Instagram Story Clone 项目中显示一些后端生成的数据。

问题是当轮播中只有一个内容时,箭头和圆点就会消失。

轮播文档:https : //antdv.com/components/carousel

代码沙盒:https : //codesandbox.io/s/brave-blackwell-e6d5c? file =/ src/ App.vue

箭头显示:

<a-carousel arrows>

    <!-- Left Arrow -->
    <div
      slot="prevArrow"
      slot-scope="props"
      class="custom-slick-arrow"
      style="left: 10px;zIndex: 1"
    >
      <a-icon type="left-circle" />
    </div>

    <!-- Right Arrow -->
    <div
      slot="nextArrow" 
      slot-scope="props"
      class="custom-slick-arrow" 
      style="right: 10px"
    >
      <a-icon type="right-circle" />
    </div>

    <div><h3> Content 1 </h3></div>
    <div><h3> Content 2 </h3></div>
  </a-carousel>
Run Code Online (Sandbox Code Playgroud)

箭头不显示:

<a-carousel arrows>

    <!-- Left Arrow -->
    <div
      slot="prevArrow"
      slot-scope="props"
      class="custom-slick-arrow"
      style="left: 10px;zIndex: …
Run Code Online (Sandbox Code Playgroud)

javascript css vue.js vue-component antdv

5
推荐指数
1
解决办法
440
查看次数

如何找到我在 VS Code 中使用的主题的文件夹

我想自定义我正在使用的主题,如何找到它的文件夹?

我想自定义“Atom One Darker”主题,但在app/extensions.

我怎样才能找到它?

visual-studio-code

4
推荐指数
2
解决办法
4334
查看次数

Python 对象返回一个列表

我有一个甲板类,我从中创建了一个甲板对象:

class Deck:
  cards = []

deck = Deck()
Run Code Online (Sandbox Code Playgroud)

如何使甲板对象在调用时返回卡片列表?

print(deck)

# or

for card in deck:
  # do
Run Code Online (Sandbox Code Playgroud)

不必总是调用deck.cards?

python oop python-3.x python-class

1
推荐指数
1
解决办法
95
查看次数