clean unnecessary docs

This commit is contained in:
陈嘉涵
2017-08-09 19:12:56 +08:00
parent 1cab7c449c
commit 6fda3568da
65 changed files with 34 additions and 1892 deletions

View File

@@ -43,37 +43,6 @@ export default {
## Switch 开关
### 使用指南
如果你已经按照快速上手中引入了整个`vant`,以下**组件注册**就可以忽略了,因为你已经全局注册了`vant`中的全部组件。
#### 全局注册
你可以在全局注册`Switch`组件,比如页面的主文件(`index.js``main.js`),这样页面任何地方都可以直接使用`Switch`组件了:
```js
import Vue from 'vue';
import { Switch } from 'vant';
import 'vant/lib/vant-css/switch.css';
Vue.component(Switch.name, Switch);
```
#### 局部注册
如果你只是想在某个组件中使用,你可以在对应组件中注册`Switch`组件,这样只能在你注册的组件中使用`Switch`
```js
import { Switch } from 'vant';
import 'vant/lib/vant-css/switch.css';
export default {
components: {
'van-switch': Switch
}
};
```
### 代码演示
#### 基础用法