|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<view class="bx-page">
|
|
|
- <view class="topbar">
|
|
|
+ <view class="topbar" :style="safeAreaStyle">
|
|
|
<view class="topbar-left">
|
|
|
<view class="topbar-back" @click="onBack">
|
|
|
<text class="topbar-back-icon">‹</text>
|
|
|
@@ -216,6 +216,9 @@ import { ref, reactive, computed, onMounted } from 'vue'
|
|
|
import { expenseItemApi } from '@/api/bx'
|
|
|
import { statusLabel, adminStatusTagClass } from '@/utils/bxFormat'
|
|
|
import { PAGE_PATHS } from '@/config/api'
|
|
|
+import { getSafeAreaStyle, getGlobalSafeArea } from '@/utils/safeArea'
|
|
|
+
|
|
|
+const safeAreaStyle = getSafeAreaStyle()
|
|
|
|
|
|
const expenseTree = ref([])
|
|
|
const loading = ref(false)
|
|
|
@@ -258,7 +261,7 @@ const dialogTitle = computed(() => {
|
|
|
function measureListHeight() {
|
|
|
try {
|
|
|
const sys = uni.getSystemInfoSync()
|
|
|
- const topbar = 44 + (sys.statusBarHeight || 0)
|
|
|
+ const topbar = getGlobalSafeArea().headerHeight
|
|
|
listHeight.value = `${Math.max(320, (sys.windowHeight || 600) - topbar)}px`
|
|
|
} catch (e) {
|
|
|
listHeight.value = '70vh'
|
|
|
@@ -417,7 +420,7 @@ function handleDelete(item) {
|
|
|
}
|
|
|
|
|
|
function onBack() {
|
|
|
- uni.navigateBack({ fail: () => uni.switchTab({ url: PAGE_PATHS.workbench }) })
|
|
|
+ uni.navigateBack({ fail: () => uni.reLaunch({ url: PAGE_PATHS.workbench }) })
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|