logoDreamk's Blog
  • 首页
  • 归档
  • 分类
  • 关于
首页归档分类关于

Dreamk

Web Developer & Designer
  • githubgithub
  • bilibilibilibili
标签
vue3
C程序设计
瀑布流
vue生命周期
paths
windicss
时间处理
joi
图片懒加载
我的世界
ts
markdown
dayjs
koa
饥荒
nginx
友链
木小天google
鲁ICP备2020040502号-2
全部
vue3
222
饥荒
111
nginx
111
C程序设计
111
瀑布流
111
vue生命周期
111
paths
111
windicss
111
时间处理
111
joi
111
图片懒加载
111
我的世界
111
ts
111
markdown
111
dayjs
111
koa
111
v3-瀑布流组件封装 2025-03-11 10:41:41
记录一下封装的瀑布流组件 ``` <template> <div class="relative" ref="containerRef" :style="{ height: `${contentHeight}px` }"> <div class="item absolute top-0 left-0 transform" v-for="item, index in props.list" :key="index" :style="{ width: `${columnWidth}px` }" > <slot name
0108
vue3
前端
v3自定义指令-图片懒加载 2025-03-11 10:38:14
封装代码: ``` export const useImgLazyLoad = () => { // v-lazy 指令 const vLazy = { // 元素加载完成时 mounted mounted: (el: HTMLImageElement) => { el.src = 'https://i.gifer.com/ZKZg.gif' // 加载占位符 el.addEventListener('error', () => { el.src = 'https://img.ixintu.com/download/jpg/202
0101
vue3
前端

 / 1

鲁ICP备2020040502号-2