vue格网图

先看效果
在这里插入图片描述
再看代码

<n-grid
  v-else
  x-gap="20"
  :y-gap="20"
  cols="2 s:2 m:3 l:3 xl:3 2xl:4"
  responsive="screen"
>
  <n-grid-item
    v-for="(item,index) in newSongList"
    :key="item.id"
    class="cursor-pointer
rounded-md transition-colors 
hover:bg-zinc-300/40 dark:hover:bg-gray-700/30"
    @dblclick="handleDBClick(newSongList,onlyId,item,index)"
  >
    <div class="flex h-16 justify-between">
      <div class="relative">
        <load-img
          loading-height="64px"
          class-name="w-16 h-16 rounded-md"
          :src="item.picUrl"
          :show-message="false"
        />
        <play-icon
          :size="15"
          class="position-center cursor-pointer"
          style="opacity: 1;width: 25px;height: 25px;"
        />
      </div>
      <div class="ml-2 flex-1 truncate">
        <p class="mt-1 text-base">
          <n-ellipsis>{{ item.name }}</n-ellipsis>
        </p>
        <p class="mt-2 w-full text-sm opacity-60">
          <n-ellipsis>{{ formateSongsAuthor(item.song.artists) }}</n-ellipsis>
        </p>
      </div>
    </div>
  </n-grid-item>
</n-grid>

相关推荐

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-06-17 15:12:05       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-06-17 15:12:05       106 阅读
  3. 在Django里面运行非项目文件

    2024-06-17 15:12:05       87 阅读
  4. Python语言-面向对象

    2024-06-17 15:12:05       96 阅读

热门阅读

  1. 【Qt 6.3 基础教程 03】第一个Qt应用:Hello World

    2024-06-17 15:12:05       33 阅读
  2. curl命令行发送post/get请求

    2024-06-17 15:12:05       26 阅读
  3. SQL索引结构优化及回表查询知识总结

    2024-06-17 15:12:05       32 阅读
  4. WDF驱动开发-I/O目标与专用USBI/O目标

    2024-06-17 15:12:05       26 阅读
  5. [AIGC] Python在LeetCode刷题中的应用

    2024-06-17 15:12:05       30 阅读
  6. scikit-learn安装

    2024-06-17 15:12:05       30 阅读
  7. 【postman接口测试工具的安装和使用】

    2024-06-17 15:12:05       31 阅读