init project
This commit is contained in:
40
component/actionSheet/actionSheet.js
Normal file
40
component/actionSheet/actionSheet.js
Normal file
@@ -0,0 +1,40 @@
|
||||
// component/actionSheet/actionSheet.js
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
value:{
|
||||
type: Array,
|
||||
value: []
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
// 点击取消
|
||||
cancel() {
|
||||
this.triggerEvent('cancel', {}, {});
|
||||
},
|
||||
|
||||
// 点击选择
|
||||
click(e) {
|
||||
let index = e.currentTarget.dataset.index;
|
||||
this.triggerEvent('selected', this.data.value[index], {});
|
||||
},
|
||||
|
||||
// 禁止背景滚动
|
||||
unMove() {
|
||||
return;
|
||||
}
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user