Skip to content

没有显示瀑布的效果 #60

Open
@mahongbo79

Description

@mahongbo79
<template>
  <div class="bg">
    <div class="header">
      <!-- header站位 -->
    </div>

    <div class="banner">
      {{ $t("home.Activities") }}
    </div>

    <Waterfall  :list="list">
      <template #item="{ item, url, index }">
        <div class="card">
          <LazyImg class="card_img" :url="url" />
          <p class="text">这是内容</p>
        </div>
      </template>
    </Waterfall>

  </div>
</template>

<script>
import { LazyImg, Waterfall } from 'vue-waterfall-plugin'
import 'vue-waterfall-plugin/dist/style.css'

export default {
  data() {
    return {
      list: [
      {
        "src": "./1.jpg",
      },
      {
        "src": "./icn-load.png",
      },
      {
        "src": "./icn-pople.png",
      },
      {
        "src": "./1.jpg",
      },
      {
        "src": "./1.jpg",
      },
      {
        "src": "./icn-eye.png",
      },
      {
        "src": "./icn-eye.png",
      },
      {
        "src": "./icn-eye.png",
      },
      {
        "src": "./icn-eye.png",
      },
      {
        "src": "./icn-eye.png",
      },
      {
        "src": "./icn-eye.png",
      },
      {
        "src": "./icn-eye.png",
      },
                   
      ]
    };
  },
  components: { LazyImg, Waterfall }, // 组件列表
}
</script>


<style lang="scss" scoped>
.bg {
  background-color: #ffffff;
  .header {
    width: 100%;
    height: 0.64rem;
    background: #1c2532;
  }

  .banner {
    color: white;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 62px;
    background: url("../../assets/images/toolplatforms/banner.png") no-repeat;
    // background-size: contain;
    background-size: 100%;
    overflow: hidden;
    height: 300px;
  }

  .waterfall-list {
    margin: 0 auto;
    width: 70%;
    position: relative;
    height: 700px;

  }

  .card_img{
    border-radius: 5px;
  }



}
</style>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions