1.0.0 • Published 12 months ago
linxuda-ui v1.0.0
ux-pc-public-ui
Document & Online preview
Install & Use
pnpm i ux-pc-public-ui
# or
npm install ux-pc-public-ui
# or
yarn add ux-pc-public-uiImport and register component
Global
import { createApp } from 'vue'
import App from './App.vue'
import UxPcPublicUI from 'ux-pc-public-ui'
import 'ux-pc-public-ui/css'
const app = createApp(App)
app.use(UxPcPublicUI)Local
<script setup lang="ts">
import { Button } from 'ux-pc-public-ui'
import 'ux-pc-public-ui/css'
</script>Project
- Get the project code
git clone https://github.com/themusecatcher/vue-amazing-ui.git- Install dependencies
cd ux-pc-public-ui
pnpm i- Run project
pnpm dev组件列表
-所有组件均继承element-plus的已有属性,额外属性会在下方说明 Component name | Descriptions -- | -- UxButton | 按钮
UxButton 按钮
| 属性名 | 说明 | 类型 | 默认值 |
|---|
Functions --未开发
| 方法 | 描述 | 参数 |
|---|---|---|
| dateFormat | 简单易用的日期格式化函数! | (timestamp: number|string|Date, format = 'YYYY-MM-DD HH:mm:ss') => string |
| requestAnimationFrame | 针对不同浏览器进行兼容处理! | 使用方式不变 |
| cancelAnimationFrame | 针对不同浏览器进行兼容处理! | 使用方式不变 |
| rafTimeout | 使用 requestAnimationFrame 实现的定时器函数,等效替代 (setTimeout 和 setInterval)! | (func: Function, delay = 0, interval = false) => object |
| cancelRaf | 用于取消 rafTimeout 函数! | (raf: { id: number }) => void |
| throttle | 使用 rafTimeout 实现的节流函数! | (fn: Function, delay = 300) => any |
| debounce | 使用 rafTimeout 实现的防抖函数! | (fn: Function, delay = 300) => any |
| add | 消除js加减精度问题的加法函数! | (num1: number, num2: number) => number |
| downloadFile | 下载文件并自定义文件名! | (url: string, name: string) => void |