New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vant-gov

Package Overview
Dependencies
Maintainers
3
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vant-gov

Mobile UI Components built on Vue

  • 0.1.34
  • latest
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

快速开始

安装

# Install Vant 2 for Vue 2 project
npm i vant-gov -S

使用

import Vue from 'vue';
import { Button } from 'vant-gov';
import 'vant-gov/lib/index.css';

Vue.use(Button);

浏览器支持

Vant-gov supports modern browsers and Android >= 4.0、iOS >= 8.0.

开发指南

按照下面的步骤操作,即可在本地开发 Vant 组件。


# 安装依赖
cd vant && npm run bootstrap

# 安装cli依赖
cd vant/packages/vant-cli && yarn || npm i

# 编译cli
tsc

# 进入开发模式,浏览器访问 http://localhost:8082
npm run dev

目录结构

  • 仓库的组件代码位于 src 下,每个组件一个文件夹
  • docs 目录下是文档网站的代码,本地开发时可以在目录下运行 npm run dev 开启文档网站

项目主要目录如下:

vant
├─ build     # 构建
├─ docs      # 文档
├─ src       # 组件
├─ packages  # 子包
├─ test      # 单测
└─ types     # 类型

添加新组件

添加新组件时,请按照下面的目录结构组织文件,并在 vant.config.js 中配置组件名称。

src
└─ button
   ├─ demo             # 示例代码
   ├─ test             # 单元测试
   ├─ index.js         # 组件入口
   ├─ index.less       # 组件样式
   └─ README.zh-CN.md  # 中文文档

Keywords

FAQs

Package last updated on 25 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc