mirror of
https://github.com/youzan/vant.git
synced 2025-12-25 02:02:01 +08:00
clean unnecessary docs
This commit is contained in:
@@ -15,11 +15,7 @@
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import MobileComputed from 'components/mobile-computed';
|
||||
|
||||
export default {
|
||||
mixins: [MobileComputed],
|
||||
|
||||
data() {
|
||||
return {
|
||||
show1: false,
|
||||
@@ -59,37 +55,6 @@ export default {
|
||||
|
||||
## ActionSheet 行动按钮
|
||||
|
||||
### 使用指南
|
||||
|
||||
如果你已经按照快速上手中引入了整个`vant`,以下**组件注册**就可以忽略了,因为你已经全局注册了`vant`中的全部组件。
|
||||
|
||||
#### 全局注册
|
||||
|
||||
你可以在全局注册`ActionSheet`组件,比如页面的主文件(`index.js`,`main.js`),这样页面任何地方都可以直接使用`ActionSheet`组件了:
|
||||
|
||||
```js
|
||||
import Vue from 'vue';
|
||||
import { ActionSheet } from 'vant';
|
||||
import 'vant/lib/vant-css/actionSheet.css';
|
||||
|
||||
Vue.component(ActionSheet.name, ActionSheet);
|
||||
```
|
||||
|
||||
#### 局部注册
|
||||
|
||||
如果你只是想在某个组件中使用,你可以在对应组件中注册`ActionSheet`组件,这样只能在你注册的组件中使用`ActionSheet`:
|
||||
|
||||
```js
|
||||
import { ActionSheet } from 'vant';
|
||||
import 'vant/lib/vant-css/actionSheet.css';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
'van-actionSheet': ActionSheet
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
### 代码演示
|
||||
|
||||
#### 基础用法
|
||||
@@ -197,11 +162,6 @@ export default {
|
||||
```
|
||||
:::
|
||||
|
||||
点击以下按钮查看手机端效果:
|
||||
|
||||
<van-button @click="mobileShow = true">点击查看手机端效果</van-button>
|
||||
<mobile-popup v-model="mobileShow" :url="mobileUrl"></mobile-popup>
|
||||
|
||||
### API
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
|
||||
|
||||
Reference in New Issue
Block a user