Commit 5b97fa80 by zhangxw

图片

1 parent 248646f1
// tabWorkOrder/pages/createOrder/createOrderComponents/Popup/Popup.js
Component({
/**
* 组件的属性列表
*/
properties: {
tipsProps: {
type: Object
},
tipsText: String
},
/**
* 组件的初始数据
*/
data: {},
/**
* 组件的方法列表
*/
methods: {
tapCallback(e) {
let tipsProps = this.properties
let { type } = e.target.dataset
let thisPage = wx.$router.getPageInstance()
if (type == 1) {
tipsProps.showTips = false
this.setData({
tipsProps: false
})
} else {
thisPage.tipsEvent()
}
},
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="tips" wx:if="{{tipsProps.showTips}}">
<image class="tipsIcon" src="../images/tips.png" />
<view class="contentText">
{{tipsProps.tipsText}}
</view>
<image class="closeIcon" wx:if="{{tipsProps.type == 1}}" bindtap="tapCallback" data-type="{{tipsProps.type}}" src="../images/closeIcon.png" />
<view class="btn" wx:if="{{tipsProps.type == 2}}" bindtap="tapCallback" data-type="{{tipsProps.type}}">{{tipsProps.typeText}}</view>
</view>
\ No newline at end of file
.tips {
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-items: center;
padding: 20rpx;
font-weight: 500;
background: #EFF5FE;
height: 72rpx;
width: 100%;
color: #3582EE;
font-size: 24rpx;
}
.tipsIcon,
.closeIcon {
width: 32rpx;
height: 32rpx;
}
.tips .contentText {
margin-left: 20rpx;
margin-right: auto;
display: flex;
font-weight: 500;
flex-direction: column;
justify-content: space-between;
}
.tips .btn {
color: #F24724;
padding: 6rpx 20rpx;
margin-left: auto;
border: 1px solid #F24724;
border-radius: 28rpx;
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!