Commit d6711f20 by 张立顺

Merge branch 'release/venus-usedcar-h5/1.0.0' of 192.168.3.233:monorepo/venus in…

…to release/venus-usedcar-h5/1.0.0
2 parents 773e5d67 653208df
Pipeline #153 for d6711f20 failed in 0 seconds
......@@ -8,6 +8,7 @@
}
html {
overflow-x: hidden;
font-size: 16px;
text-size-adjust: 100%;
scroll-behavior: smooth;
......@@ -16,6 +17,7 @@ html {
body {
padding: 0;
margin: 0;
overflow-x: hidden;
overscroll-behavior: none;
line-height: 1.5;
color: #323233;
......@@ -32,6 +34,7 @@ body {
max-width: 430px;
min-height: 100vh;
margin: 0 auto;
overflow-x: hidden;
background-color: #f7f8fa;
}
......
......@@ -8,16 +8,22 @@
* 可以输入预定的版权声明、个性签名、空行等
-->
<script setup lang="ts">
import { computed } from "vue";
import { useRoute } from "vue-router";
import PageTitle from "@/components/PageTitle.vue";
withDefaults(
defineProps<{
title: string;
/** 宿主小程序带 openType=miniApp 跳转时隐藏标题栏 */
hideTitle?: boolean;
}>(),
{ hideTitle: false },
);
defineProps<{
title: string;
}>();
const route = useRoute();
/** 宿主小程序带 openType=miniApp 跳转时隐藏各 Tab 页顶部标题 */
const hideTitle = computed(() => {
const v = route.query.openType;
return (Array.isArray(v) ? v[0] : v) === "miniApp";
});
</script>
<template>
......
......@@ -65,7 +65,8 @@ function onTabChange(index: number | string) {
const i = tabbarIndex(index);
const tab = tabList[i];
if (tab) {
router.push({ name: tab.routeName });
// 保留 query(如 openType=miniApp),避免 Tab 切换后 PageTop 等依赖 query 的状态丢失
router.push({ name: tab.routeName, query: { ...route.query } });
}
}
</script>
......@@ -111,7 +112,9 @@ function onTabChange(index: number | string) {
display: flex;
flex-direction: column;
width: 100%;
min-width: 0;
min-height: 100vh;
overflow-x: hidden;
background-color: var(--color-bg-page);
// 让 RouterView 内容区占满剩余空间,tabbar 自然沉底
......
......@@ -251,6 +251,8 @@ onMounted(() => {
.inspect-page {
display: flex;
flex-direction: column;
width: 100%;
min-width: 0;
height: 100vh;
// stylelint-disable-next-line declaration-block-no-duplicate-properties
height: calc(100dvh - env(safe-area-inset-top));
......@@ -340,7 +342,9 @@ onMounted(() => {
display: flex;
flex: 1;
flex-direction: column;
min-width: 0;
min-height: 0;
overflow-x: hidden;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
......
......@@ -3,7 +3,7 @@ import type { CardAction, WorkOrderItem } from "@/types/views/home";
import type { AuditStatus, WorkOrderStatus } from "@/types/views/work-order-common";
import { computed, ref, watch } from "vue";
import { useRoute, useRouter } from "vue-router";
import { useRouter } from "vue-router";
import { getWorkOrderCountByStatus, getWorkOrderH5Url, getWorkOrderPage } from "@/api/modules/work-order";
import PageTop from "@/components/PageTop.vue";
......@@ -19,14 +19,7 @@ const pageSize = 20;
const displayList = ref<WorkOrderItem[]>([]);
const currentPage = ref(1);
const scroller = ref<Element | undefined>(undefined);
const route = useRoute();
const router = useRouter();
/** 宿主小程序跳转带 openType=miniApp 时隐藏顶部标题 */
const hidePageTitle = computed(() => {
const v = route.query.openType;
return (Array.isArray(v) ? v[0] : v) === "miniApp";
});
const rejectReasonDialogVisible = ref(false);
const rejectReasonContent = ref("");
const tabCounts = ref({
......@@ -276,7 +269,7 @@ void onRefresh();
<template>
<div class="work-order-page">
<PageTop title="检测工单" :hide-title="hidePageTitle">
<PageTop title="检测工单">
<!-- 顶部状态 Tab -->
<div class="status-tabs">
<div v-for="t in statusTabs"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!