init project

This commit is contained in:
limqhz
2020-06-21 16:27:58 +08:00
commit e8fe10b5fb
178 changed files with 9964 additions and 0 deletions

View 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;
}
}
})

View File

@@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

View File

@@ -0,0 +1,7 @@
<!--component/actionSheet/actionSheet.wxml-->
<view class='popup-box' catchtouchmove='unMove' catchtap='cancel'>
<view class='body'>
<view class='cell' wx:for="{{value}}" wx:key="{{index}}" catchtap='click' data-index='{{index}}'>{{item.label}}</view>
<view class='cell cancel' catchtap='cancel'>取消</view>
</view>
</view>

View File

@@ -0,0 +1,32 @@
/* component/actionSheet/actionSheet.wxss */
.popup-box {
position: fixed;
top: 0;
left: 0;
display: flex;
align-items: flex-end;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.6);
z-index: 1;
}
.popup-box .body {
flex: 1;
background: #f5f5f5;
}
.popup-box .body .cell {
width: 100%;
height: 80rpx;
margin-bottom: 2rpx;
line-height: 80rpx;
text-align: center;
font-size: 26rpx;
background: #FFF;
}
.popup-box .body .cell.cancel {
margin-top: 8rpx;
}