|
@@ -3,7 +3,7 @@
|
|
|
<!-- 头部 -->
|
|
<!-- 头部 -->
|
|
|
<nav-bar height="96" title="任务详情" :onlyTitle="true" :showHeaderborder="true" @GoBack="GoBack"></nav-bar>
|
|
<nav-bar height="96" title="任务详情" :onlyTitle="true" :showHeaderborder="true" @GoBack="GoBack"></nav-bar>
|
|
|
<!-- 吸顶 -->
|
|
<!-- 吸顶 -->
|
|
|
- <uv-sticky style="top:98rpx">
|
|
|
|
|
|
|
+ <uv-sticky offsetTop="0" customNavHeight="98rpx">
|
|
|
<view class="search_tabs" v-if="state.isSticky">
|
|
<view class="search_tabs" v-if="state.isSticky">
|
|
|
<scroll-view class="scroll_tabs" scroll-x="true" scroll-left="0" :show-scrollbar="false">
|
|
<scroll-view class="scroll_tabs" scroll-x="true" scroll-left="0" :show-scrollbar="false">
|
|
|
<view :class="['tab_item',{'selected':item.value==state.tabsSelected}]" v-for="item in state.tabList"
|
|
<view :class="['tab_item',{'selected':item.value==state.tabsSelected}]" v-for="item in state.tabList"
|
|
@@ -13,7 +13,7 @@
|
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
</view>
|
|
</view>
|
|
|
</uv-sticky>
|
|
</uv-sticky>
|
|
|
- <view class="scroll_view_box">
|
|
|
|
|
|
|
+ <view class="scroll_view_box" :style="{'height': state.isSticky ? 'calc(100% - 296rpx)' : 'calc(100% - 96rpx)'}">
|
|
|
<scroll-view
|
|
<scroll-view
|
|
|
class="scroll_view_y"
|
|
class="scroll_view_y"
|
|
|
:scroll-top="state.scrollTop"
|
|
:scroll-top="state.scrollTop"
|
|
@@ -212,6 +212,20 @@
|
|
|
// 展开收起切换
|
|
// 展开收起切换
|
|
|
const toggleExpand = () => {
|
|
const toggleExpand = () => {
|
|
|
state.isExpand = !state.isExpand;
|
|
state.isExpand = !state.isExpand;
|
|
|
|
|
+ nextTick(() => {
|
|
|
|
|
+ const instance = getCurrentInstance();
|
|
|
|
|
+ // 安全保护
|
|
|
|
|
+ if (!instance || !instance.proxy) {
|
|
|
|
|
+ // 备用方案:全局查询(要求元素 class 唯一)
|
|
|
|
|
+ query.select('.page_content_data').boundingClientRect((rect) => {
|
|
|
|
|
+ state.searchBoxTop = rect?.top || 0;
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ query.select('.page_content_data').boundingClientRect((rect) => {
|
|
|
|
|
+ state.searchBoxTop = rect?.top || 0;
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
//切换tab
|
|
//切换tab
|
|
|
const SelectTabsValue = (val) => {
|
|
const SelectTabsValue = (val) => {
|
|
@@ -316,13 +330,15 @@
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
.page_body{
|
|
.page_body{
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
min-height: auto;
|
|
min-height: auto;
|
|
|
.scroll_view_box{
|
|
.scroll_view_box{
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
- height: calc(100% - 96rpx);
|
|
|
|
|
|
|
+ // height: calc(100% - 96rpx);
|
|
|
}
|
|
}
|
|
|
.scroll_view_y {
|
|
.scroll_view_y {
|
|
|
height: 100%;
|
|
height: 100%;
|