From fa684b55132029563170a0eca4ce0b11cc0f4570 Mon Sep 17 00:00:00 2001 From: guanxiaohan Date: Fri, 2 Aug 2024 17:31:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E9=AA=81=E7=BF=B0=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.vue | 10 ++++++---- pages/investigation/task.vue | 31 ++++++++++++++++++++++++------- pages/knowledge/index.vue | 2 +- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index ece0606..302752d 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -390,19 +390,21 @@ // background: linear-gradient(180deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%); background: #f8fafb; // border-radius: 24px 24px 0px 0px; - padding: 20rpx 30rpx 0; + padding: 20rpx 30rpx; font-family: Source Han Sans CN, Source Han Sans CN; - position: sticky; + position: fixed; /* top: 418px; */ - top: calc(var(--status-bar-height) + 798rpx); + top: calc(var(--status-bar-height) + 792rpx); z-index: 99; - padding-bottom: 30rpx; + width: 100%; + // padding-bottom: 30rpx; } .Box { .Content { width: calc(100% - 48rpx); padding-bottom: 100rpx; + margin-top: 100rpx; } .Unit { diff --git a/pages/investigation/task.vue b/pages/investigation/task.vue index ad523ed..881e0a2 100644 --- a/pages/investigation/task.vue +++ b/pages/investigation/task.vue @@ -79,7 +79,7 @@ + v-model="formData.roadWidth" placeholder="请输入道路宽度" @focus="focus" @blur="blur" /> {{ formData.roadWidth }} @@ -87,7 +87,7 @@ + v-model="formData.laneCount" placeholder="请输入车道数" @focus="focus" @blur="blur" /> {{ formData.laneCount }} @@ -95,7 +95,7 @@ + v-model="formData.roadStructure" placeholder="请输入路面结构" @focus="focus" @blur="blur" /> {{ formData.roadStructure }} @@ -103,7 +103,7 @@ + v-model="formData.sideProtec" placeholder="请输入路侧防护" @focus="focus" @blur="blur" /> {{ formData.sideProtec }} @@ -111,7 +111,7 @@ + v-model="formData.centerSeparate" placeholder="请输入中央隔离" @focus="focus" @blur="blur" /> {{ formData.centerSeparate }} @@ -119,7 +119,7 @@ + v-model="formData.designSpeed" placeholder="请输入设计时速" @focus="focus" @blur="blur" /> {{ formData.designSpeed }} Km/h @@ -127,7 +127,7 @@ + v-model="formData.limitSpeed" placeholder="请输入限速" @focus="focus" @blur="blur" /> {{ formData.limitSpeed }} Km/h @@ -1896,6 +1896,23 @@ } }).exec(); // 执行查询 }, + blur() { + const query = uni.createSelectorQuery().in(this); + + // 选择我们想要的元素 + query.select('#page').boundingClientRect(data => { + // data是选中元素的大小及位置信息 + if (data) { + // 元素的高度 + const height = data.height; + if (this.isEdit) { + + this.boxHeight = height - 200 + } + console.log('盒子的高度:', height); + } + }).exec(); // 执行查询 + }, focus2() { const query = uni.createSelectorQuery().in(this); diff --git a/pages/knowledge/index.vue b/pages/knowledge/index.vue index c8fbc72..6b77ad0 100644 --- a/pages/knowledge/index.vue +++ b/pages/knowledge/index.vue @@ -11,7 +11,7 @@ 作为你的智能伙伴,我可以为你提供交通领域知识的答疑解惑。 - 你这样试着问我: + 你可以这样问我: