From 66030571bafa99a01c2fe2d217c72a10ace42cc0 Mon Sep 17 00:00:00 2001 From: chen <2659004835@qq.com> Date: Fri, 18 Mar 2022 10:53:34 +0800 Subject: [PATCH] =?UTF-8?q?line-height=E6=9B=BF=E6=8D=A2=E4=B8=BAdisplay:f?= =?UTF-8?q?lex;justify-content:=20center;align-items:=20center;=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E5=BE=AE=E4=BF=A1=E5=B1=85=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commons/flying-monkey.css | 26 +++++++++----------------- pagesB/service-range/service-range.vue | 17 ++++++++++++----- 2 files changed, 21 insertions(+), 22 deletions(-) diff --git a/commons/flying-monkey.css b/commons/flying-monkey.css index 0e49c24..0dac24e 100644 --- a/commons/flying-monkey.css +++ b/commons/flying-monkey.css @@ -25,10 +25,9 @@ color: #03affb; width: 170rpx; height: 45rpx; - line-height: 45rpx; + display: flex;justify-content: center;align-items: center; border-radius: 24rpx; padding: 4rpx 0rpx; - text-align: center; margin-left: 20rpx; } .obtainIng { @@ -39,7 +38,7 @@ .register-radio {transform: scale(0.5);margin-left: -10rpx;margin-right: -10rpx;} uni-radio .uni-radio-input {border: 1rpx solid #444444;} .register-agree-policy {color: #03affb;} -.register-btn {width: 422rpx;height: 76rpx;line-height: 76rpx;text-align: center;margin: 0 auto;border-radius: 76rpx;margin-top: 60rpx; background-color: #03affb;color: #FFFFFF;} +.register-btn {width: 422rpx;height: 76rpx;display: flex;justify-content: center;align-items: center; margin: 0 auto;border-radius: 76rpx;margin-top: 60rpx; background-color: #03affb;color: #FFFFFF;} .clear-box { position: absolute;right: 0; top: 50%; @@ -75,9 +74,8 @@ uni-radio .uni-radio-input {border: 1rpx solid #444444;} border-radius: 50rpx; height: 90rpx; background-color: #02A2ea; - line-height: 90rpx; + display: flex;justify-content: center;align-items: center; color: #FFFFFF; - text-align: center; font-size: 30rpx; } /* 登录 */ @@ -117,8 +115,7 @@ uni-radio .uni-radio-input {border: 1rpx solid #444444;} } .login-btn { height: 80rpx; - line-height: 80rpx; - text-align: center; + display: flex;justify-content: center;align-items: center; background-color: #03affb; border-radius: 10rpx; color: #FFFFFF; @@ -142,8 +139,7 @@ uni-radio .uni-radio-input {border: 1rpx solid #444444;} .forget-btn { width: 422rpx; height: 75rpx; - line-height: 75rpx; - text-align: center; + display: flex;justify-content: center;align-items: center; background-color: #03affb; color: #FFFFFF; border-radius: 75rpx; @@ -163,8 +159,7 @@ uni-radio .uni-radio-input {border: 1rpx solid #444444;} top: -16rpx; width: 40rpx; height: 40rpx; - line-height: 40rpx; - text-align: center; + display: flex;justify-content: center;align-items: center; border-radius: 100%; font-size: 22rpx; background-color: #e93030; @@ -215,8 +210,7 @@ uni-radio .uni-radio-input {border: 1rpx solid #444444;} background-color: #f03232; width: 36rpx; height: 36rpx; - line-height: 36rpx; - text-align: center; + display: flex;justify-content: center;align-items: center; border-radius: 100%; color: #FFFFFF; transform: scale(.8); @@ -225,8 +219,7 @@ uni-radio .uni-radio-input {border: 1rpx solid #444444;} /* 我的页面 */ .my-exit-btn{ height: 88rpx; - line-height: 88rpx; - text-align: center; + display: flex;justify-content: center;align-items: center; border-radius: 88rpx; background-color: #03affb; color: #FFFFFF; @@ -263,8 +256,7 @@ uni-radio .uni-radio-input {border: 1rpx solid #444444;} .person-btn { margin: 0 40rpx; height: 88rpx; - line-height: 88rpx; - text-align: center; + display: flex;justify-content: center;align-items: center; border-radius: 88rpx; background-color: #03affb; color: #FFFFFF; diff --git a/pagesB/service-range/service-range.vue b/pagesB/service-range/service-range.vue index 4b81900..e7828f1 100644 --- a/pagesB/service-range/service-range.vue +++ b/pagesB/service-range/service-range.vue @@ -4,26 +4,26 @@ - 人员状态 * + 人员状态 * {{item}} - 工作时段 * + 工作时段 * {{item}} - * + * 湖南省株洲市芦淞区 - 详细地址 * + 详细地址 * @@ -57,9 +57,16 @@ hoursNum:0, serviceRange:['30KM','80KM','1500KM','其他','其他','其他','其他'], rangeNum:0, - remarkText:'' + remarkText:'', + eareWidth:'' } }, + onReady() { + const query = wx.createSelectorQuery() + query.select('#timeBox').boundingClientRect((rect) => { + this.eareWidth = rect.width; + }).exec() + }, methods: { // 人员状态选择 chooseStatus(index,num){