[Doc] add introduction page (#452)

This commit is contained in:
neverland 2017-12-19 13:08:09 +08:00 committed by GitHub
parent 79a2b13b63
commit 02a8c2a592
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 161 additions and 38 deletions

View File

@ -1,29 +1,29 @@
<p>
<a href="https://github.com/youzan/"><img alt="logo" width="36px" src="https://img.yzcdn.cn/public_files/2017/02/09/e84aa8cbbf7852688c86218c1f3bbf17.png" alt="youzan">
<a href="https://github.com/youzan/"><img alt="logo" width="36" height="36" src="https://img.yzcdn.cn/public_files/2017/02/09/e84aa8cbbf7852688c86218c1f3bbf17.png" alt="youzan">
</a>
</p>
<p align="center">
<img alt="logo" src="https://img.yzcdn.cn/public_files/2017/12/18/fd78cf6bb5d12e2a119d0576bedfd230.png" width="120" style="margin-bottom: 10px;">
<img alt="logo" src="https://img.yzcdn.cn/public_files/2017/12/18/fd78cf6bb5d12e2a119d0576bedfd230.png" width="120" height="120" style="margin-bottom: 10px;">
</p>
<p align="center">A Vue.js 2.0 Mobile UI at YouZan</p>
[![Build Status](https://travis-ci.org/youzan/vant.svg?branch=master)](https://travis-ci.org/youzan/vant)
[![downloads](https://img.shields.io/npm/dt/vant.svg)](https://www.npmjs.com/package/vant)
[![Build Status](https://travis-ci.org/youzan/vant.svg?branch=master)](https://travis-ci.org/youzan/vant)
[![downloads](https://img.shields.io/npm/dt/vant.svg)](https://www.npmjs.com/package/vant)
[![Coverage Status](https://img.shields.io/codecov/c/github/youzan/vant/dev.svg)](https://codecov.io/github/youzan/vant?branch=dev)
[![npm version](https://img.shields.io/npm/v/vant.svg?style=flat)](https://www.npmjs.com/package/vant)
[![npm version](https://img.shields.io/npm/v/vant.svg?style=flat)](https://www.npmjs.com/package/vant)
[![license](https://img.shields.io/npm/l/vant.svg)](https://www.npmjs.com/package/vant)
[访问中文版](./README.zh-CN.md)
## Features
- 45+ Reusable components
- 90%+ Unit test coverage
- Extensive documentation and demos
- Support [babel-plugin-import](https://github.com/ant-design/babel-plugin-import)
- Support TypeScript
- Support SSR
* 48+ Reusable components
* 90%+ Unit test coverage
* Extensive documentation and demos
* Support [babel-plugin-import](https://github.com/ant-design/babel-plugin-import)
* Support TypeScript
* Support SSR
<p align="center">
<img alt="components preview" src="https://img.yzcdn.cn/public_files/2017/12/05/95f5ee7524b7845abb2f51803a01d65e.png">
@ -34,10 +34,11 @@
```shell
npm i -S vant
```
## Quickstart
#### 1. Use [babel-plugin-import](https://github.com/ant-design/babel-plugin-import) (Recommended)
```bash
# Install babel-plugin-import
npm i babel-plugin-import -D
@ -65,7 +66,7 @@ import { Button } from 'vant/lib/button';
import 'vant/lib/vant-css/base.css';
import 'vant/lib/vant-css/button.css';
```
#### 3. Import all components
```js
@ -87,25 +88,29 @@ Vue.use(Vant);
```
See more in [Quickstart](https://www.youzanyun.com/zanui/vant#/en-US/component/quickstart).
## Contribution
Please make sure to read the [Contributing Guide](./.github/CONTRIBUTING.md) before making a pull request.
## Browser Support
Modern browsers and Android 4.0+, iOS 6+.
## Links
- [Documentation](https://www.youzanyun.com/zanui/vant)
- [Changelog](https://www.youzanyun.com/zanui/vant#/en-US/component/changelog)
- [Weapp UI](https://github.com/youzan/zanui-weapp)
- [Vant Demo](https://github.com/youzan/vant-demo)
- [vue-cli-template-vant](https://github.com/youzan/vue-cli-template-vant)
* [Documentation](https://www.youzanyun.com/zanui/vant)
* [Changelog](https://www.youzanyun.com/zanui/vant#/en-US/component/changelog)
* [Weapp UI](https://github.com/youzan/zanui-weapp)
* [Vant Demo](https://github.com/youzan/vant-demo)
* [vue-cli-template-vant](https://github.com/youzan/vue-cli-template-vant)
## Preview
You can scan the following QR code to access the demo
![qrcode](https://img.yzcdn.cn/v2/image/youzanyun/zanui/pc/zanui_vue_mobile_preview_03.png)
## LICENSE
[MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89)

View File

@ -15,7 +15,7 @@
## 特性
- 48 个经过有赞线上业务检验的组件
- 48+ 个经过有赞线上业务检验的组件
- 单元测试覆盖率超过90%
- 完善的文档和示例
- 支持 [babel-plugin-import](https://github.com/ant-design/babel-plugin-import)
@ -102,7 +102,7 @@ Vue.use(Vant);
## 链接
- [详细文档](https://www.youzanyun.com/zanui/vant)
- [更新日志](https://www.youzanyun.com/zanui/vant#/en-US/component/changelog)
- [更新日志](https://www.youzanyun.com/zanui/vant#/zh-CN/component/changelog)
- [微信小程序组件库](https://github.com/youzan/zanui-weapp)
- [vant-demo](https://github.com/youzan/vant-demo)
- [vue-cli-template-vant](https://github.com/youzan/vue-cli-template-vant)

View File

@ -1,4 +1,4 @@
# Internationalization
## Internationalization
The default language of Vant is Chinese. If you want to use other languages, you can follow the instructions below.
### Switch languages

View File

@ -0,0 +1,38 @@
<div class="van-doc-intro">
<img class="van-doc-intro__youzan" src="//img.yzcdn.cn/public_files/2017/02/09/e84aa8cbbf7852688c86218c1f3bbf17.png">
<img class="van-doc-intro__logo" src="//img.yzcdn.cn/public_files/2017/12/18/fd78cf6bb5d12e2a119d0576bedfd230.png">
<h2>Vant</h2>
<p>A Vue.js 2.0 Mobile UI at YouZan</p>
</div>
### Features
* 48+ Reusable components
* 90%+ Unit test coverage
* Extensive documentation and demos
* Support [babel-plugin-import](https://github.com/ant-design/babel-plugin-import)
* Support TypeScript
* Support SSR
### Quickstart
See in [Quickstart](https://www.youzanyun.com/zanui/vant#/en-US/component/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.
### Browser Support
Modern browsers and Android 4.0+, iOS 6+.
### Links
* [Changelog](https://www.youzanyun.com/zanui/vant#/en-US/component/changelog)
* [Weapp UI](https://github.com/youzan/zanui-weapp)
* [Vant Demo](https://github.com/youzan/vant-demo)
* [vue-cli-template-vant](https://github.com/youzan/vue-cli-template-vant)
### LICENSE
[MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89)

View File

@ -35,6 +35,7 @@ export default {
'zh-CN/i18n': wrapper(r => require.ensure([], () => r(require('./zh-CN/i18n.md')), 'zh-CN/i18n')),
'zh-CN/icon': wrapper(r => require.ensure([], () => r(require('./zh-CN/icon.md')), 'zh-CN/icon')),
'zh-CN/image-preview': wrapper(r => require.ensure([], () => r(require('./zh-CN/image-preview.md')), 'zh-CN/image-preview')),
'zh-CN/intro': wrapper(r => require.ensure([], () => r(require('./zh-CN/intro.md')), 'zh-CN/intro')),
'zh-CN/layout': wrapper(r => require.ensure([], () => r(require('./zh-CN/layout.md')), 'zh-CN/layout')),
'zh-CN/lazyload': wrapper(r => require.ensure([], () => r(require('./zh-CN/lazyload.md')), 'zh-CN/lazyload')),
'zh-CN/loading': wrapper(r => require.ensure([], () => r(require('./zh-CN/loading.md')), 'zh-CN/loading')),
@ -86,6 +87,7 @@ export default {
'en-US/i18n': wrapper(r => require.ensure([], () => r(require('./en-US/i18n.md')), 'en-US/i18n')),
'en-US/icon': wrapper(r => require.ensure([], () => r(require('./en-US/icon.md')), 'en-US/icon')),
'en-US/image-preview': wrapper(r => require.ensure([], () => r(require('./en-US/image-preview.md')), 'en-US/image-preview')),
'en-US/intro': wrapper(r => require.ensure([], () => r(require('./en-US/intro.md')), 'en-US/intro')),
'en-US/layout': wrapper(r => require.ensure([], () => r(require('./en-US/layout.md')), 'en-US/layout')),
'en-US/lazyload': wrapper(r => require.ensure([], () => r(require('./en-US/lazyload.md')), 'en-US/lazyload')),
'en-US/loading': wrapper(r => require.ensure([], () => r(require('./en-US/loading.md')), 'en-US/loading')),

View File

@ -1,4 +1,4 @@
# 国际化
## 国际化
Vant 默认采用中文作为语言,如果需要使用其他语言,可以参考下面的方案
### 多语言切换

View File

@ -0,0 +1,40 @@
<div class="van-doc-intro">
<img class="van-doc-intro__youzan" src="//img.yzcdn.cn/public_files/2017/02/09/e84aa8cbbf7852688c86218c1f3bbf17.png">
<img class="van-doc-intro__logo" src="//img.yzcdn.cn/public_files/2017/12/18/fd78cf6bb5d12e2a119d0576bedfd230.png">
<h2>Vant</h2>
<p>有赞移动端 Vue 组件库</p>
</div>
### 特性
* 48+ 个经过有赞线上业务检验的组件
* 单元测试覆盖率超过 90%
* 完善的文档和示例
* 支持 [babel-plugin-import](https://github.com/ant-design/babel-plugin-import)
* 支持 TypeScript
* 支持 SSR
### 快速上手
请参考 [快速上手](https://www.youzanyun.com/zanui/vant#/zh-CN/component/quickstart).
### 贡献代码
修改代码请阅读我们的 [开发指南](https://github.com/youzan/vant/blob/dev/.github/CONTRIBUTING.zh-CN.md)。
使用过程中发现任何问题都可以提 [Issue](https://github.com/youzan/vant/issues) 给我们,当然,我们也非常欢迎你给我们发 [PR](https://github.com/youzan/vant/pulls)。
### 浏览器支持
现代浏览器以及 Android 4.0+, iOS 6+.
### 链接
* [更新日志](https://www.youzanyun.com/zanui/vant#/zh-CN/component/changelog)
* [微信小程序组件库](https://github.com/youzan/zanui-weapp)
* [vant-demo](https://github.com/youzan/vant-demo)
* [vue-cli-template-vant](https://github.com/youzan/vue-cli-template-vant)
### 开源协议
本项目基于 [MIT](https://zh.wikipedia.org/wiki/MIT%E8%A8%B1%E5%8F%AF%E8%AD%89) 协议,请自由地享受和参与开源。

View File

@ -1,6 +1,4 @@
## Vant
基于`Vue 2.0`的 Mobile 组件库
## 快速上手
### 安装

View File

@ -39,3 +39,33 @@ export default {
}
};
</script>
<style lang="postcss">
.van-doc-intro {
text-align: center;
font-family: "Dosis", "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
&__youzan {
width: 32px;
height: 32px;
display: block;
margin: 25px 0 0;
}
&__logo {
width: 120px;
height: 120px;
}
h2 {
font-size: 32px;
line-height: 60px;
font-weight: normal;
}
p {
font-size: 15px;
color: #455a64;
}
}
</style>

View File

@ -32,6 +32,11 @@ module.exports = {
groups: [
{
list: [
{
path: '/intro',
title: '介绍',
noExample: true
},
{
path: '/quickstart',
title: '快速上手',
@ -315,6 +320,11 @@ module.exports = {
groups: [
{
list: [
{
path: '/intro',
title: 'Introduction',
noExample: true
},
{
path: '/quickstart',
title: 'Getting Started',

View File

@ -22,7 +22,7 @@ const registerRoute = (isExample) => {
} else {
route.push({
path: `/${lang}`,
redirect: `/${lang}/component/quickstart`
redirect: `/${lang}/component/intro`
});
}

View File

@ -72,7 +72,7 @@
"dependency-tree": "^5.12.0",
"eslint-plugin-vue": "^2.1.0",
"extract-text-webpack-plugin": "3.0.2",
"fast-vue-md-loader": "^1.0.2",
"fast-vue-md-loader": "^1.0.3",
"felint": "^0.5.0-alpha.3",
"file-save": "^0.2.0",
"friendly-errors-webpack-plugin": "^1.6.1",
@ -105,7 +105,7 @@
"run-sequence": "^2.1.0",
"sinon": "^2.4.1",
"sinon-chai": "^2.12.0",
"style-loader": "^0.19.0",
"style-loader": "^0.19.1",
"uppercamelcase": "^3.0.0",
"url-loader": "^0.6.2",
"vant-doc": "0.3.19",

View File

@ -2774,9 +2774,9 @@ fast-levenshtein@~2.0.4:
version "2.0.6"
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
fast-vue-md-loader@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/fast-vue-md-loader/-/fast-vue-md-loader-1.0.2.tgz#afa849ba384723d3527b534477f5fcef0388306a"
fast-vue-md-loader@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/fast-vue-md-loader/-/fast-vue-md-loader-1.0.3.tgz#ba1584bd1e2d012575cb2b3260d0c8fe4c1b7fa4"
dependencies:
highlight.js "^9.12.0"
markdown-it "^8.4.0"
@ -7164,9 +7164,9 @@ strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
style-loader@^0.19.0:
version "0.19.0"
resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.19.0.tgz#7258e788f0fee6a42d710eaf7d6c2412a4c50759"
style-loader@^0.19.1:
version "0.19.1"
resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.19.1.tgz#591ffc80bcefe268b77c5d9ebc0505d772619f85"
dependencies:
loader-utils "^1.0.2"
schema-utils "^0.3.0"