Skip to content

Commit

Permalink
初始化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
goodloving committed Dec 18, 2019
0 parents commit e23815b
Show file tree
Hide file tree
Showing 15 changed files with 11,985 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
### VActionSheet
#### 引入方式:
import {VActionSheet} from 'v-actionsheet'
Vue.use(VActionSheet)

#### 属性:
---------------------------
属性名 | 类型 | 描述
-------- | ------- | ------
menus | Objiect | menus: {
gaodeMap: "高德地图",
baiduMap: "百度地图",
iosMap: "苹果地图"
}
onConfirm | Function | 接受点击的item的值,根据值进行具体操作,完成后隐藏隐藏ActionSheet和蒙层区
onCancel | Function | 点击蒙层区和“取消”隐藏ActionSheet和蒙层区

#### 使用:
this.$actionSheet.show({
menus: this.menus,
onConfirm: index => this.onConfirm(index),
onCancel: () => this.onCancel()
});

##### onConfirm和onCancel函数:
onCancel() {
this.$actionSheet.hide(); //隐藏
},
onConfirm(index) {
alert(index); //具体操作
}
5 changes: 5 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/app'
]
}
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
console.log("欢迎使用V-ActionSheet")

import VActionSheet from "./src/plugins/index.js"

export{
VActionSheet
}
Loading

0 comments on commit e23815b

Please sign in to comment.