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

Dreamk

Web Developer & Designer
  • githubgithub
  • bilibilibilibili
标签
vue3
windicss
时间处理
joi
图片懒加载
我的世界
ts
markdown
dayjs
koa
饥荒
nginx
C程序设计
瀑布流
vue生命周期
paths
友链
木小天google
鲁ICP备2020040502号-2
全部
前端
333
笔记
222
游戏服务器搭建
222
web服务器
111
后端
111
css
111
vue
111
typescript
111
C语言
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
0100
vue3
图片懒加载
前端
Day.js的基本用法 2024-06-06 09:25:08
Day.js 设计为链式调用风格,每次调用dayjs的方法都会返回一个dayjs对象。 #### 1. 解析时间 1. 获取当前时间:dayjs() 2. 解析 [ISO 8601(opens new window)](https://en.wikipedia.org/wiki/ISO_8601)格式的字符串:dayjs('2018-04-04T16:00:00.000Z') 3. 解析毫秒级时间戳:dayjs(1318781876406) 4. 解析秒级时间戳:dayjs.unix(1318781876),支持带小数点 5. 时间校验(不严格,只检查该事件能否被dayjs解析,不判断是否
0317
dayjs
时间处理
前端

 / 1

鲁ICP备2020040502号-2