22 changed files with 382 additions and 82 deletions
@ -0,0 +1,65 @@ |
|||||
|
Component({ |
||||
|
data: { |
||||
|
visible: false |
||||
|
}, |
||||
|
properties: { |
||||
|
dialogVisible: { |
||||
|
type: Boolean, |
||||
|
value: false, |
||||
|
observer: function () { |
||||
|
this.setData({ |
||||
|
visible: !this.data.visible |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
title: { |
||||
|
type: String, |
||||
|
value: "" |
||||
|
}, |
||||
|
content: { |
||||
|
type: Array, |
||||
|
value: [] |
||||
|
}, |
||||
|
confirmText: { |
||||
|
type: String, |
||||
|
value: "" |
||||
|
}, |
||||
|
cancelText: { |
||||
|
type: String, |
||||
|
value: "" |
||||
|
} |
||||
|
}, |
||||
|
pageLifetimes: { |
||||
|
show () { |
||||
|
|
||||
|
}, |
||||
|
hide () { |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
lifetimes: { |
||||
|
attached () { |
||||
|
|
||||
|
}, |
||||
|
detached () { |
||||
|
|
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
close () { |
||||
|
this.triggerEvent("close") |
||||
|
this.setData({ |
||||
|
visible: false |
||||
|
}) |
||||
|
}, |
||||
|
confirm () { |
||||
|
this.triggerEvent("confirm") |
||||
|
this.setData({ |
||||
|
visible: false |
||||
|
}) |
||||
|
}, |
||||
|
catchmove () { |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
}) |
@ -0,0 +1,6 @@ |
|||||
|
{ |
||||
|
"component": true, |
||||
|
"usingComponents": { |
||||
|
"wux-icon": "../../../../dist/icon/index" |
||||
|
} |
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
<cover-view class="notice" wx:if="{{visible}}" catchmove="catchmove"> |
||||
|
<cover-view class="box"> |
||||
|
<cover-view class="close"> |
||||
|
<cover-image bindtap="close" src="../../images/delete.png" /> |
||||
|
</cover-view> |
||||
|
<cover-view class="title">{{title}}</cover-view> |
||||
|
<cover-view class="content"> |
||||
|
<cover-view wx:for="{{content}}" wx:key="index" wx:for-item="item" wx:for-index="index">{{item}}</cover-view> |
||||
|
</cover-view> |
||||
|
<cover-view wx:if="{{cancelText !== '' || confirmText !== ''}}" class="border"></cover-view> |
||||
|
<cover-view class="operation"> |
||||
|
<cover-view wx:if="{{cancelText !== ''}}" class="cancel" bindtap="close">{{cancelText}}</cover-view> |
||||
|
<cover-view wx:if="{{confirmText !== ''}}" class="confirm" bindtap="confirm">{{confirmText}}</cover-view> |
||||
|
</cover-view> |
||||
|
</cover-view> |
||||
|
</cover-view> |
@ -0,0 +1,84 @@ |
|||||
|
.notice { |
||||
|
width: 100%; |
||||
|
height: 100vh; |
||||
|
position: fixed; |
||||
|
z-index: 100; |
||||
|
left: 0; |
||||
|
top: 0; |
||||
|
background: rgba(0,0,0, 0.4); |
||||
|
display: flex; |
||||
|
justify-content: center; |
||||
|
align-items: center; |
||||
|
} |
||||
|
.notice .box { |
||||
|
width: 490rpx; |
||||
|
background: #fff; |
||||
|
border-radius: 16rpx; |
||||
|
overflow: hidden; |
||||
|
padding: 0 20rpx; |
||||
|
position: relative; |
||||
|
} |
||||
|
.notice .box .close { |
||||
|
width:100%; |
||||
|
height: 60rpx; |
||||
|
display: flex; |
||||
|
justify-content: flex-end; |
||||
|
align-items: center; |
||||
|
} |
||||
|
.notice .box .close cover-image { |
||||
|
width: 40rpx; |
||||
|
height: 40rpx; |
||||
|
object-fit: cover; |
||||
|
} |
||||
|
.notice .box .title { |
||||
|
height: 60rpx; |
||||
|
line-height: 60rpx; |
||||
|
width: 100%; |
||||
|
text-align:center; |
||||
|
font-size: 36rpx; |
||||
|
color: #333; |
||||
|
margin-bottom: 23rpx; |
||||
|
} |
||||
|
.notice .box .content { |
||||
|
height: auto; |
||||
|
width: 100%; |
||||
|
padding-bottom: 35rpx; |
||||
|
} |
||||
|
.notice .box .content cover-view { |
||||
|
font-size: 30rpx; |
||||
|
line-height: 50rpx; |
||||
|
height: 50rpx; |
||||
|
width: 100%; |
||||
|
text-align: center; |
||||
|
color: #666; |
||||
|
} |
||||
|
.notice .box .border { |
||||
|
width: 100%; |
||||
|
height: 0; |
||||
|
border: 0.5rpx solid #eaeaea; |
||||
|
border-bottom: 1rpx solid transparent; |
||||
|
position: absolute; |
||||
|
left:0; |
||||
|
bottom: 105rpx; |
||||
|
} |
||||
|
.notice .box .operation { |
||||
|
width: calc(100% - 40rpx); |
||||
|
height: 75rpx; |
||||
|
padding: 15rpx 0; |
||||
|
display: flex; |
||||
|
justify-content: space-around; |
||||
|
align-items: center; |
||||
|
margin-left: 20rpx |
||||
|
} |
||||
|
.notice .box .operation cover-view { |
||||
|
flex: 1; |
||||
|
color: #999; |
||||
|
font-size: 36rpx; |
||||
|
width: 49%; |
||||
|
height: 100%; |
||||
|
line-height: 75rpx; |
||||
|
text-align:center; |
||||
|
} |
||||
|
.notice .box .operation .confirm{ |
||||
|
color: #04BCA0; |
||||
|
} |
After Width: | Height: | Size: 1.3 KiB |
@ -1,6 +1,7 @@ |
|||||
{ |
{ |
||||
"navigationBarTitleText": "我要申请", |
"navigationBarTitleText": "我要申请", |
||||
"usingComponents": { |
"usingComponents": { |
||||
"date-time-picker": "../../../../components/DateTimePicker/index" |
"date-time-picker": "../../../../components/DateTimePicker/index", |
||||
|
"notice": "../../components/notice/notice" |
||||
} |
} |
||||
} |
} |
@ -1,4 +1,7 @@ |
|||||
{ |
{ |
||||
"navigationBarTitleText": "申请记录", |
"navigationBarTitleText": "申请记录", |
||||
"usingComponents": {} |
"usingComponents": { |
||||
|
"load-more": "/components/loadMore/loadMore", |
||||
|
"no-data": "/components/nodata/nodata" |
||||
|
} |
||||
} |
} |
Loading…
Reference in new issue