npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@dyb-dev/vant-pro

v0.0.4

Published

基于 Vue3 + TS + Vant 二次封装的移动端组件库

Downloads

159

Readme

Vant-Pro

license

简介

vant-pro 是一个使用 Vue3 + TS + Vant 二次封装的移动端组件库,目前仅支持浏览器环境。

特性

  • 🎉 支持 Vue3 写法
  • 🎉 支持完整的TS中文类型提示
  • 🎉 支持组件函数式调用
  • 🎉 支持源代码和在线预览示例
  • 🎉 支持 Vant 主题定制
  • 🎉 支持深色模式
  • 🎉 支持现代浏览器

环境要求

  • Node.js 版本 >= 18.0.0
  • 如果包管理器为 pnpm,版本需 >= 8.15.5

安装与使用

在安装 vant-pro 之前,需要具备以下前置条件:

# 安装 Vue3 最新版本
pnpm i vue

# 安装 vant 组件库 最新版本
pnpm i vant

# 安装 Vue 3 官方提供的组合式 API 和 工具函数 最新版本
pnpm i @vueuse/core

安装 vant 组件库之后,还需引入其提供的样式文件:

import { createApp } from "vue"
// 引入 vant 组件库样式
import "vant/lib/index.css"

const app = createApp()

⚠️注意:

如果 vant 的样式为按需加载的,那么会造成组件无法正常使用,这是由于当你在使用按需加载时,使用 vant-pro 的组件并不会去自动引入其内部 vant 组件的样式文件。

前置条件完成后,可以通过 pnpm 进行安装:

# 当然你也可以通过 npm、yarn 或 bun 进行安装
pnpm i @dyb-dev/vant-pro

快速上手

import { createApp } from "vue"
// 1. 引入 `ListPro` 组件
import { ListPro } from "@dyb-dev/vant-pro"
// 2. 引入 vant-pro 组件库样式
import "@dyb-dev/vant-pro/dist/style.css"

const app = createApp()

// 3. 注册 `ListPro` 组件

// 方式一. 通过 app.use 注册
app.use(ListPro)

// 方式二. 通过 app.component 注册
app.component(ListPro.name, ListPro)

更多内容请参阅快速上手

链接

开源协议

本项目基于 MIT 协议,请自由地享受和参与开源。