mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-15 11:58:34 +08:00
fix(wiki): type kbId/pageId props as number|string to prevent ID precision loss
This commit is contained in:
parent
0d94cb1f93
commit
c9f73bbbd5
@ -734,11 +734,11 @@ export const wikiApi = {
|
|||||||
getProcessingStatus: (kbId: number) => http.get(`/wiki/knowledge-bases/${kbId}/processing-status`),
|
getProcessingStatus: (kbId: number) => http.get(`/wiki/knowledge-bases/${kbId}/processing-status`),
|
||||||
|
|
||||||
// RFC-029: Relations
|
// RFC-029: Relations
|
||||||
getRelatedPages: (kbId: number, slug: string, topK = 5) =>
|
getRelatedPages: (kbId: number | string, slug: string, topK = 5) =>
|
||||||
http.get(`/wiki/kb/${kbId}/pages/${encodeURIComponent(slug)}/related`, { params: { topK } }),
|
http.get(`/wiki/kb/${kbId}/pages/${encodeURIComponent(slug)}/related`, { params: { topK } }),
|
||||||
explainRelation: (kbId: number, slugA: string, slugB: string) =>
|
explainRelation: (kbId: number, slugA: string, slugB: string) =>
|
||||||
http.get(`/wiki/kb/${kbId}/pages/${encodeURIComponent(slugA)}/relation/${encodeURIComponent(slugB)}`),
|
http.get(`/wiki/kb/${kbId}/pages/${encodeURIComponent(slugA)}/relation/${encodeURIComponent(slugB)}`),
|
||||||
getPageCitations: (kbId: number, pageId: number) =>
|
getPageCitations: (kbId: number | string, pageId: number | string) =>
|
||||||
http.get(`/wiki/kb/${kbId}/pages/${pageId}/citations`),
|
http.get(`/wiki/kb/${kbId}/pages/${pageId}/citations`),
|
||||||
|
|
||||||
// RFC-030: Jobs
|
// RFC-030: Jobs
|
||||||
|
|||||||
@ -36,8 +36,8 @@ const { t } = useI18n()
|
|||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue: boolean
|
modelValue: boolean
|
||||||
pageId: number
|
pageId: number | string
|
||||||
kbId: number
|
kbId: number | string
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
defineEmits<{
|
defineEmits<{
|
||||||
|
|||||||
@ -35,7 +35,7 @@ import { wikiApi } from '@/api/index'
|
|||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
kbId: number
|
kbId: number | string
|
||||||
slug: string
|
slug: string
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user