Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ It's welcomed to pull request, And there are some tips about that:
## Getting started

```bash
git clone git@github.com:youzan/vant.git
git clone https://github.com/FEMessage/vant.git

cd vant

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
SSH_PRIVATE_KEY: ${{ secrets.GITEE_RSA_PRIVATE_KEY }}
with:
# 注意替换为你的 GitHub 源仓库地址
source-repo: 'git@github.com:youzan/vant.git'
source-repo: 'git@github.com:FEMessage/vant.git'
# 注意替换为你的 Gitee 目标仓库地址
destination-repo: 'git@gitee.com:vant-contrib/vant.git'

Expand Down
6 changes: 3 additions & 3 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ Vant 是**有赞前端团队**开源的移动端组件库,于 2016 年开源

```bash
# 通过 npm 安装
npm i vant -S
npm i @femessage/vant -S

# 通过 yarn 安装
yarn add vant
yarn add @femessage/vant
```

> Tips: Vue 3 项目请安装 Vant 3.0,参见 [issue#7035](https://github.com/youzan/vant/issues/7035)
Expand All @@ -57,7 +57,7 @@ yarn add vant

```js
import Vue from 'vue';
import { Button } from 'vant';
import { Button } from '@femessage/vant';
import 'vant/lib/index.css';

Vue.use(Button);
Expand Down
4 changes: 2 additions & 2 deletions docs/markdown/contribution.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

```bash
# 克隆仓库
git clone git@github.com:youzan/vant.git
git clone https://github.com/FEMessage/vant.git

# 安装依赖
cd vant && npm run bootstrap
Expand Down Expand Up @@ -82,7 +82,7 @@ src

```bash
# 添加主仓库到 remote,作为 fork 后仓库的上游仓库
git remote add upstream https://github.com/youzan/vant.git
git remote add upstream https://github.com/FEMessage/vant.git

# 拉取主仓库最新代码
git fetch upstream
Expand Down
10 changes: 5 additions & 5 deletions docs/markdown/home.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ See in [Quickstart](#/en-US/quickstart).

### Contribution

Please make sure to read the [Contributing Guide](https://github.com/youzan/vant/blob/dev/.github/CONTRIBUTING.md) before making a pull request.
Please make sure to read the [Contributing Guide](https://github.com/femessage/vant/blob/dev/.github/CONTRIBUTING.md) before making a pull request.

### Browser Support

Expand All @@ -36,13 +36,13 @@ Modern browsers and Android 4.0+, iOS 8.0+.
| [vant-demo](https://github.com/youzan/vant-demo) | Official vant demo collection |
| [vant-weapp](https://github.com/youzan/vant-weapp) | WeChat MiniProgram UI |
| [vant-react](https://github.com/mxdi9i7/vant-react) | Vant React (maintained by the community) |
| [vant-cli](https://github.com/youzan/vant/tree/dev/packages/vant-cli) | Scaffold for UI library |
| [vant-icons](https://github.com/youzan/vant/tree/dev/packages/vant-icons) | Vant icons |
| [vant-touch-emulator](https://github.com/youzan/vant/tree/dev/packages/vant-touch-emulator) | Using vant in desktop browsers |
| [vant-cli](https://github.com/femessage/vant/tree/dev/packages/vant-cli) | Scaffold for UI library |
| [vant-icons](https://github.com/femessage/vant/tree/dev/packages/vant-icons) | Vant icons |
| [vant-touch-emulator](https://github.com/femessage/vant/tree/dev/packages/vant-touch-emulator) | Using vant in desktop browsers |

### Links

- [Feedback](https://github.com/youzan/vant/issues)
- [Feedback](https://github.com/femessage/vant/issues)
- [Changelog](#/en-US/changelog)
- [Gitter](https://gitter.im/vant-contrib/discuss?utm_source=share-link&utm_medium=link&utm_campaign=share-link)

Expand Down
10 changes: 5 additions & 5 deletions docs/markdown/home.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Vant 是**有赞前端团队**开源的移动端组件库,于 2016 年开源

修改代码请阅读我们的[开发指南](#/zh-CN/contribution)。

使用过程中发现任何问题都可以提 [Issue](https://github.com/youzan/vant/issues) 给我们,当然,我们也非常欢迎你给我们发 [PR](https://github.com/youzan/vant/pulls)。
使用过程中发现任何问题都可以提 [Issue](https://github.com/femessage/vant/issues) 给我们,当然,我们也非常欢迎你给我们发 [PR](https://github.com/femessage/vant/pulls)。

### 浏览器支持

Expand All @@ -58,13 +58,13 @@ Vant 是**有赞前端团队**开源的移动端组件库,于 2016 年开源
| [vant-demo](https://github.com/youzan/vant-demo) | Vant 官方示例合集 |
| [vant-weapp](https://github.com/youzan/vant-weapp) | 微信小程序组件库 |
| [vant-react](https://github.com/mxdi9i7/vant-react) | Vant React 版(由社区维护) |
| [vant-cli](https://github.com/youzan/vant/tree/dev/packages/vant-cli) | 开箱即用的组件库搭建工具 |
| [vant-icons](https://github.com/youzan/vant/tree/dev/packages/vant-icons) | Vant 图标库 |
| [vant-touch-emulator](https://github.com/youzan/vant/tree/dev/packages/vant-touch-emulator) | 在桌面端使用 Vant 的辅助库 |
| [vant-cli](https://github.com/femessage/vant/tree/dev/packages/vant-cli) | 开箱即用的组件库搭建工具 |
| [vant-icons](https://github.com/femessage/vant/tree/dev/packages/vant-icons) | Vant 图标库 |
| [vant-touch-emulator](https://github.com/femessage/vant/tree/dev/packages/vant-touch-emulator) | 在桌面端使用 Vant 的辅助库 |

### 链接

- [意见反馈](https://github.com/youzan/vant/issues)
- [意见反馈](https://github.com/femessage/vant/issues)
- [更新日志](#/zh-CN/changelog)
- [码云镜像](https://vant-contrib.gitee.io/vant)
- [Gitter 讨论组](https://gitter.im/vant-contrib/discuss?utm_source=share-link&utm_medium=link&utm_campaign=share-link)
Expand Down
45 changes: 13 additions & 32 deletions docs/markdown/quickstart.en-US.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,16 @@
# Quickstart

### Starter kit

We recomment to use [Vue Cli](https://cli.vuejs.org/zh/) to create a project.

```bash
# Install Vue Cli
npm install -g @vue/cli

# Create a project
vue create hello-world

# Open GUI
vue ui
```

![](https://img.yzcdn.cn/vant/vue-cli-demo-201809030812.png)

In the GUI, click on 'Dependencies' -> `Install Dependencies` and add `vant` to the dependencies.

### Install

```bash
# Using npm
npm i vant -S
npm i @femessage/vant -S

# Using yarn
yarn add vant
yarn add @femessage/vant
```

> Tips: Please install Vant 3.0 for Vue 3 projects, see [issue#7035](https://github.com/youzan/vant/issues/7035)
> Tips: Please install Vant 3.0 for Vue 3 projects, see [issue#7035](https://github.com/femessage/vant/issues/7035)

## Usage

Expand All @@ -48,7 +29,7 @@ npm i babel-plugin-import -D
{
"plugins": [
["import", {
"libraryName": "vant",
"libraryName": "@femessage/vant",
"libraryDirectory": "es",
"style": true
}]
Expand All @@ -59,34 +40,34 @@ npm i babel-plugin-import -D
module.exports = {
plugins: [
['import', {
libraryName: 'vant',
libraryName: '@femessage/vant',
libraryDirectory: 'es',
style: true
}, 'vant']
}, '@femessage/vant']
]
};
```

```js
// Then you can import components from vant
import { Button } from 'vant';
import { Button } from '@femessage/vant';
```

> If you are using TypeScript,please use [ts-import-plugin](https://github.com/Brooooooklyn/ts-import-plugin) instead

### 2. Manually import

```js
import Button from 'vant/lib/button';
import 'vant/lib/button/style';
import Button from '@femessage/vant/lib/button';
import '@femessage/vant/lib/button/style';
```

### 3. Import all components

```js
import Vue from 'vue';
import Vant from 'vant';
import 'vant/lib/index.css';
import Vant from '@femessage/vant';
import '@femessage/vant/lib/index.css';

Vue.use(Vant);
```
Expand All @@ -101,12 +82,12 @@ The easiest way to use Vant is to include a CDN link in the html file, after whi
<!-- import style -->
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/vant@2.10/lib/index.css"
href="https://cdn.jsdelivr.net/npm/@femessage/vant@latest/lib/index.css"
/>

<!-- import script -->
<script src="https://cdn.jsdelivr.net/npm/vue@2.6/dist/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vant@2.10/lib/vant.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@femessage/vant@latest/lib/vant.min.js"></script>

<script>
// Render the Button component
Expand Down
53 changes: 12 additions & 41 deletions docs/markdown/quickstart.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,19 @@
# 快速上手

### 脚手架

在新项目中使用 Vant 时,推荐使用 Vue 官方提供的脚手架 [Vue Cli](https://cli.vuejs.org/zh/) 创建项目

```bash
# 安装 Vue Cli
npm install -g @vue/cli

# 创建一个项目
vue create hello-world

# 创建完成后,可以通过命令打开图形化界面,如下图所示
vue ui
```

![](https://img.yzcdn.cn/vant/vue-cli-demo-201809032000.png)

在图形化界面中,点击`依赖` -> `安装依赖`,然后将 `vant` 添加到依赖中即可。

### 通过 npm 安装

在现有项目中使用 Vant 时,可以通过`npm`或`yarn`安装

```bash
# 通过 npm 安装
npm i vant -S
npm i @femessage/vant -S

# 通过 yarn 安装
yarn add vant
yarn add @femessage/vant
```

> Tips: Vue 3 项目请安装 Vant 3.0,参见 [issue#7035](https://github.com/youzan/vant/issues/7035)

### 示例工程

我们提供了一个基于 Vue Cli 的[示例工程](https://github.com/youzan/vant-demo),示例工程会帮助你了解如下内容:

- 基于 Vant 搭建单页面应用,配置按需引入组件
- 配置基于 Rem 的适配方案
- 配置基于 Viewport 的适配方案
- 配置基于 TypeScript 的工程
- 配置自定义主题色方案

## 引入组件

### 方式一. 自动按需引入组件 (推荐)
Expand All @@ -60,7 +31,7 @@ npm i babel-plugin-import -D
{
"plugins": [
["import", {
"libraryName": "vant",
"libraryName": "@femessage/vant",
"libraryDirectory": "es",
"style": true
}]
Expand All @@ -71,18 +42,18 @@ npm i babel-plugin-import -D
module.exports = {
plugins: [
['import', {
libraryName: 'vant',
libraryName: '@femessage/vant',
libraryDirectory: 'es',
style: true
}, 'vant']
}, '@femessage/vant']
]
};
```

```js
// 接着你可以在代码中直接引入 Vant 组件
// 插件会自动将代码转化为方式二中的按需引入形式
import { Button } from 'vant';
import { Button } from '@femessage/vant';
```

> 如果你在使用 TypeScript,可以使用 [ts-import-plugin](https://github.com/Brooooooklyn/ts-import-plugin) 实现按需引入
Expand All @@ -92,8 +63,8 @@ import { Button } from 'vant';
在不使用插件的情况下,可以手动引入需要的组件

```js
import Button from 'vant/lib/button';
import 'vant/lib/button/style';
import Button from '@femessage/vant/lib/button';
import '@femessage/vant/lib/button/style';
```

### 方式三. 导入所有组件
Expand All @@ -102,8 +73,8 @@ Vant 支持一次性导入所有组件,引入所有组件会增加代码包体

```js
import Vue from 'vue';
import Vant from 'vant';
import 'vant/lib/index.css';
import Vant from '@femessage/vant';
import '@femessage/vant/lib/index.css';

Vue.use(Vant);
```
Expand All @@ -118,12 +89,12 @@ Vue.use(Vant);
<!-- 引入样式文件 -->
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/vant@2.10/lib/index.css"
href="https://cdn.jsdelivr.net/npm/@femessage/vant@latest/lib/index.css"
/>

<!-- 引入 Vue 和 Vant 的 JS 文件 -->
<script src="https://cdn.jsdelivr.net/npm/vue@2.6/dist/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vant@2.10/lib/vant.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@femessage/vant@latest/lib/vant.min.js"></script>

<script>
// 在 #app 标签下渲染一个按钮组件
Expand Down
8 changes: 4 additions & 4 deletions docs/markdown/theme.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ module.exports = {
[
'import',
{
libraryName: 'vant',
libraryName: '@femessage/vant',
libraryDirectory: 'es',
// specify less file path
style: (name) => `${name}/style/less`,
},
'vant',
'@femessage/vant',
],
],
};
Expand All @@ -50,10 +50,10 @@ module.exports = {

```js
// import all styles
import 'vant/lib/index.less';
import '@femessage/vant/lib/index.less';

// import style of single component
import 'vant/lib/button/style/less';
import '@femessage/vant/lib/button/style/less';
```

### Step 2: modify less variables
Expand Down
8 changes: 4 additions & 4 deletions docs/markdown/theme.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ module.exports = {
[
'import',
{
libraryName: 'vant',
libraryName: '@femessage/vant',
libraryDirectory: 'es',
// 指定样式路径
style: (name) => `${name}/style/less`,
},
'vant',
'@femessage/vant',
],
],
};
Expand All @@ -54,10 +54,10 @@ module.exports = {

```js
// 引入全部样式
import 'vant/lib/index.less';
import '@femessage/vant/lib/index.less';

// 引入单个组件样式
import 'vant/lib/button/style/less';
import '@femessage/vant/lib/button/style/less';
```

### 步骤二 修改样式变量
Expand Down
Loading