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