1.0.7 • Published 6 months ago

vue-leiy-ui v1.0.7

Weekly downloads
-
License
ISC
Repository
-
Last release
6 months ago

vue-leiy-ui

This template should help get you started developing with Vue 3 in Vite.

Recommended IDE Setup

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Type Support for .vue Imports in TS

TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.

If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from the command palette.

Customize configuration

See Vite Configuration Reference.

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Type-Check, Compile and Minify for Production

npm run build

Lint with ESLint

npm run lint

vue-leiy-ui

Document & Online preview

Vue Leiy UI

Install & Use

pnpm i vue-leiy-ui
# or
npm install vue-leiy-ui
# or
yarn add vue-leiy-ui

Import and register component

Global

import { createApp } from 'vue'
import App from './App.vue'

import VueLeiyUI from 'vue-leiy-ui'
import 'vue-leiy-ui/css'

const app = createApp(App)
app.use(VueLeiyUI)

Local

<script setup lang="ts">
import { Button } from 'vue-leiy-ui'
import 'vue-leiy-ui/css'
</script>

Project

  • Get the project code
git clone https://github.com/themusecatcher/vue-leiy-ui.git
  • Install dependencies
cd vue-leiy-ui

pnpm i
  • Run project
pnpm dev

Components

Component nameDescriptionsComponent nameDescriptions
Breadcrumb面包屑Button按钮
Carousel走马灯Cascader级联选择
Checkbox多选框Collapse折叠面板
Countdown倒计时DatePicker日期选择
Dialog对话框Divider分割线
Empty空状态Image图片
InputNumber数字输入框Message全局提示
Modal信息提示Notification通知提醒框
Pagination分页器Progress进度条
QRCode二维码Radio单选框
Rate评分Select选择器
Slider滑动输入条Spin加载中
Steps步骤条Swiper触摸滑动插件
Switch开关Table表格
Tabs标签页TextScroll文字滚动
Timeline时间轴Tooltip文字提示
Upload上传Video播放器
Waterfall瀑布流

Details

My CSDN Blogs

Functions

Function nameDescriptionsArguments
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
1.0.7

6 months ago

1.0.6

6 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago