Skip to content

vuwe/vuwe

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

VUWE

LOGO

在线预览

介绍

VUWE是一款基于微信WeUI所开发的,专用于Vue2的组件库。

它与WeUI完全解耦。用户通过自定义WeUI的样式文件,可以方便地对VUWE实现定制化。

中文文档

使用

进入一个Vue工程项目,然后执行以下命令:

npm install vuwe --save

加载WeUI

在开始之前,需要在index.html内加载WeUI样式库:

<link rel="stylesheet" href="/weui.min.css">

全局引入

进入工程入口js,写入下列语句:

import Vue from 'vue'
import Vuwe from 'vuwe'

Vue.use(Vuwe)

此时VUWE已经被全局注册,可以在需要的地方直接使用VUWE组件标签。

组件列表看这里

局部引入

在需要引入VUWE组件的地方直接引入:

import { VwButton } from 'vuwe'

export default {
  components: {
    VwButton
  }
}

运行

克隆项目、安装依赖

git clone https://github.com/vuwe/vuwe.git

cd vuwe && npm install

开发模式

npm run dev

生产模式

npm run build

示例模式(产出一个index.html文件,一个app.js文件)

npm run build-demo

MIT