日常提交

This commit is contained in:
2025-03-11 04:18:18 +08:00
parent 5b2b2e0c78
commit 26069d6f4d
3 changed files with 31 additions and 19 deletions

View File

@ -51,7 +51,21 @@ Component({
},
show:{
type:Boolean,
value:false
value:false,
observer(show){
if(show){
const windowInfo = wx.getWindowInfo();
this.createSelectorQuery().select('#modalViewMain').boundingClientRect((res)=>{
const viewHeight = res.height;
this.setData({
dynamicsStyle:`top:${(windowInfo.windowHeight-viewHeight)/2}px;height:${viewHeight}px;`
})
}).exec();
}
this.setData({
_show:show
})
}
},
overlayClose:{
type:Boolean,
@ -60,7 +74,15 @@ Component({
showCloseButton:{
type:Boolean,
value:false
}
},
autoFocus:{
type:Boolean,
value:false
},
useInput:{
type:Boolean,
value:false
},
},
/**
* 组件的初始数据
@ -112,21 +134,5 @@ Component({
attached(){
console.log('init model view');
}
},
observers:{
"show"(show){
if(show){
const windowInfo = wx.getWindowInfo();
this.createSelectorQuery().select('#modalViewMain').boundingClientRect((res)=>{
const viewHeight = res.height;
this.setData({
dynamicsStyle:`top:${(windowInfo.windowHeight-viewHeight)/2}px;height:${viewHeight}px;`
})
}).exec();
}
this.setData({
_show:show
})
}
}
})

View File

@ -11,7 +11,9 @@
<view class="close-btn" bind:tap="cancelButtonTap" wx:if="{{showCloseButton}}"></view>
</view>
</view>
<textarea class="textarea {{contentMessage?'error':''}}" model:value="{{content}}" row="3" wx:if="{{editable}}"
<input wx:if="{{editable&&useInput}}" model:value="{{content}}"
focus="{{show&&autoFocus}}"/>
<textarea class="textarea {{contentMessage?'error':''}}" model:value="{{content}}" row="3" wx:elif="{{editable}}" focus="{{show&&autoFocus}}"
placeholder="{{contentPlaceholder}}" focus="{{contentFocus}}" animation="{{contentAnimation}}" cursor-spacing="200rpx"></textarea>
<view class="text" wx:else>{{content}}</view>

View File

@ -100,6 +100,10 @@
<view class="key">取件数量</view>
<view class="value">{{orderDetail.package_count}}</view>
</view>
<view class="row">
<view class="key">加价金额</view>
<view class="value money money-normal">{{orderDetail.additional_fee_amount}}</view>
</view>
<view class="row">
<view class="key">订单金额</view>
<view class="value money money-normal">{{orderDetail.original_amount}}</view>