fix(frontend): align settings route query types with vue-router

main
wizardchen 2026-08-25 16:04:42 +08:00 committed by lyingbug
parent d492566d52
commit 0733141251
2 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,7 @@ import { INTEGRATION_TABS, type IntegrationTab } from './integrations'
export const INTEGRATION_SECTION_PREFIX = 'integration-'
type QueryValue = string | number | boolean | null | undefined | Array<string | number | boolean | null>
type QueryValue = string | number | null | undefined | Array<string | number | null>
export type SettingsRouteQuery = Record<string, QueryValue>
export function integrationSectionKey(tab: IntegrationTab): string {

View File

@ -214,6 +214,7 @@
<script setup lang="ts">
import { ref, computed, watch, onMounted, onUnmounted } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import type { LocationQueryRaw } from 'vue-router'
import { useUIStore } from '@/stores/ui'
import { useAuthStore } from '@/stores/auth'
import { useDeploymentCapabilitiesStore } from '@/stores/deploymentCapabilities'
@ -312,7 +313,7 @@ const syncSettingsRoute = (sectionKey: string) => {
if (settingsQueryUnchanged(route.query, query)) return
void router.replace({
path: '/platform/settings',
query,
query: query as LocationQueryRaw,
})
}