Skip to content
On this page

快速上手

介绍

常用的 js 函数

使用方式

vue
<script setup lang="ts">
import { dateFormat, throttle, debounce, downloadFile } from "@jqw755/q-ui"
</script>

常用函数列表

函数名描述参数
dateFormat日期格式化函数(timestamp: number|string|Date, format = 'YYYY-MM-DD HH:mm:ss') => string
throttle使用 setTimeout 实现的节流函数(fn: Function, delay = 300) => any
debounce使用 setTimeout 实现的防抖函数(fn: Function, delay = 300) => any
downloadFile下载文件并自定义文件名,未传文件名时,从文件地址中自动获取文件名称(url: string, name: string) => void

License