Commit d1c4d558 by cen

fix: 优化二手车tab

1 parent ec05c6fe
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
/> />
<GeneralPopup ref="calendarGeneralPopup" popupClass="calendarGeneralPopup" :showClose="false" :showTitle="false" @confirm="confirmCalendar"> <GeneralPopup ref="calendarGeneralPopup" popupClass="calendarGeneralPopup" :showClose="false" :showTitle="false" @confirm="confirmCalendar">
<template #content> <template #content>
<uni-calendar class="calendar" :showMonth="false" :date="defaultDate" :startDate="startDate" @change="calendarChange" /> <uni-calendar class="calendar" :showMonth="false" :date="defaultDate" :startDate="startDate" :endDate="endDate" @change="calendarChange" />
</template> </template>
</GeneralPopup> </GeneralPopup>
<GeneralPopup ref="tipsPopup" popupClass="tipsPopup" type="center" :showClose="true" :showTitle="false" :noTitle="true"> <GeneralPopup ref="tipsPopup" popupClass="tipsPopup" type="center" :showClose="true" :showTitle="false" :noTitle="true">
...@@ -1004,7 +1004,7 @@ export default { ...@@ -1004,7 +1004,7 @@ export default {
if (field.endDate) { if (field.endDate) {
this.endDate = dayjs().format('YYYY-MM-DD') this.endDate = dayjs().format('YYYY-MM-DD')
} else { } else {
this.endDate = '' this.endDate = '2039-5-20'
} }
this.$refs.calendarGeneralPopup this.$refs.calendarGeneralPopup
.open() .open()
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
</template> </template>
</scroll-view> </scroll-view>
</view> </view>
<view class="tab-panel-container">
<view class="tab-panel" :class="{ 'no-bac': activeTabKey != 'carLicense' && activeTabKey != 'carInfo' }"> <view class="tab-panel" :class="{ 'no-bac': activeTabKey != 'carLicense' && activeTabKey != 'carInfo' }">
<!-- 动态标题 --> <!-- 动态标题 -->
<view class="tab-panel-title" v-if="activeTabKey == 'carInfo' || activeTabKey == 'carLicense'">{{ tabs.find(tab => tab.key === activeTabKey) ? tabs.find(tab => tab.key === activeTabKey).name : '' }}</view> <view class="tab-panel-title" v-if="activeTabKey == 'carInfo' || activeTabKey == 'carLicense'">{{ tabs.find(tab => tab.key === activeTabKey) ? tabs.find(tab => tab.key === activeTabKey).name : '' }}</view>
...@@ -409,6 +410,7 @@ ...@@ -409,6 +410,7 @@
</view> </view>
</view> </view>
</view> </view>
</view>
</template> </template>
<script> <script>
...@@ -796,8 +798,8 @@ export default { ...@@ -796,8 +798,8 @@ export default {
backdrop-filter: blur(toRpx(16)); backdrop-filter: blur(toRpx(16));
box-shadow: inset 0 0 toRpx(16) 0 #ffffff; box-shadow: inset 0 0 toRpx(16) 0 #ffffff;
border-radius: toRpx(48); border-radius: toRpx(48);
overflow: auto; overflow: hidden;
padding: toRpx(32) toRpx(48) toRpx(42); padding: 0 0 toRpx(42);
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
&::after { &::after {
...@@ -826,6 +828,12 @@ export default { ...@@ -826,6 +828,12 @@ export default {
} }
.tab-container { .tab-container {
margin-bottom: toRpx(32); margin-bottom: toRpx(32);
margin-top: toRpx(32);
position: sticky;
top: 0;
z-index: 10;
border-radius: toRpx(48) toRpx(48) 0 0;
padding: 0 toRpx(48);
.tab-scroll { .tab-scroll {
width: 100%; width: 100%;
display: flex; display: flex;
...@@ -869,10 +877,16 @@ export default { ...@@ -869,10 +877,16 @@ export default {
} }
} }
} }
.tab-panel-container {
padding: 0 toRpx(48);
overflow: auto;
height: calc(100% - #{toRpx(114)});
}
.tab-panel { .tab-panel {
border-radius: toRpx(16); border-radius: toRpx(16);
background: #ffffff; background: #ffffff;
padding: toRpx(24) toRpx(32) 0 toRpx(32); padding: toRpx(24) toRpx(32) 0 toRpx(32);
.tab-panel-title { .tab-panel-title {
font-size: toRpx(32); font-size: toRpx(32);
font-weight: 600; font-weight: 600;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!