From 111e944b42577af6715af31053961ab2a2dc6372 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Fri, 1 Oct 2021 13:08:27 +0800 Subject: [PATCH] fix: encode module id --- src/client/auto-imports.d.ts | 7 ++++++- src/client/components/ModuleList.vue | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/client/auto-imports.d.ts b/src/client/auto-imports.d.ts index a7df0d4..02becd8 100644 --- a/src/client/auto-imports.d.ts +++ b/src/client/auto-imports.d.ts @@ -26,6 +26,7 @@ declare global { const watch: typeof import('vue')['watch'] const watchEffect: typeof import('vue')['watchEffect'] const defineComponent: typeof import('vue')['defineComponent'] + const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] const getCurrentInstance: typeof import('vue')['getCurrentInstance'] const h: typeof import('vue')['h'] const inject: typeof import('vue')['inject'] @@ -34,7 +35,6 @@ declare global { const useCssModule: typeof import('vue')['useCssModule'] const createApp: typeof import('vue')['createApp'] const triggerRef: typeof import('vue')['triggerRef'] - const defineAsyncComponent: typeof import('vue')['defineAsyncComponent'] const onDeactivated: typeof import('vue')['onDeactivated'] const onServerPrefetch: typeof import('vue')['onServerPrefetch'] const onErrorCaptured: typeof import('vue')['onErrorCaptured'] @@ -76,6 +76,7 @@ declare global { const useTimeout: typeof import('@vueuse/core')['useTimeout'] const useTimeoutFn: typeof import('@vueuse/core')['useTimeoutFn'] const useToggle: typeof import('@vueuse/core')['useToggle'] + const watchAtMost: typeof import('@vueuse/core')['watchAtMost'] const watchWithFilter: typeof import('@vueuse/core')['watchWithFilter'] const whenever: typeof import('@vueuse/core')['whenever'] const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] @@ -94,6 +95,7 @@ declare global { const useClipboard: typeof import('@vueuse/core')['useClipboard'] const useCssVar: typeof import('@vueuse/core')['useCssVar'] const useDark: typeof import('@vueuse/core')['useDark'] + const useDebouncedRefHistory: typeof import('@vueuse/core')['useDebouncedRefHistory'] const useDeviceMotion: typeof import('@vueuse/core')['useDeviceMotion'] const useDeviceOrientation: typeof import('@vueuse/core')['useDeviceOrientation'] const useDevicePixelRatio: typeof import('@vueuse/core')['useDevicePixelRatio'] @@ -137,12 +139,14 @@ declare global { const useRefHistory: typeof import('@vueuse/core')['useRefHistory'] const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver'] const useScriptTag: typeof import('@vueuse/core')['useScriptTag'] + const useScroll: typeof import('@vueuse/core')['useScroll'] const useSessionStorage: typeof import('@vueuse/core')['useSessionStorage'] const useShare: typeof import('@vueuse/core')['useShare'] const useSpeechRecognition: typeof import('@vueuse/core')['useSpeechRecognition'] const useStorage: typeof import('@vueuse/core')['useStorage'] const useSwipe: typeof import('@vueuse/core')['useSwipe'] const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList'] + const useThrottledRefHistory: typeof import('@vueuse/core')['useThrottledRefHistory'] const useTimeAgo: typeof import('@vueuse/core')['useTimeAgo'] const useTimestamp: typeof import('@vueuse/core')['useTimestamp'] const useTitle: typeof import('@vueuse/core')['useTitle'] @@ -151,6 +155,7 @@ declare global { const useUserMedia: typeof import('@vueuse/core')['useUserMedia'] const useVModel: typeof import('@vueuse/core')['useVModel'] const useVModels: typeof import('@vueuse/core')['useVModels'] + const useVirtualList: typeof import('@vueuse/core')['useVirtualList'] const useWakeLock: typeof import('@vueuse/core')['useWakeLock'] const useWebSocket: typeof import('@vueuse/core')['useWebSocket'] const useWebWorker: typeof import('@vueuse/core')['useWebWorker'] diff --git a/src/client/components/ModuleList.vue b/src/client/components/ModuleList.vue index c581e99..d035ec8 100644 --- a/src/client/components/ModuleList.vue +++ b/src/client/components/ModuleList.vue @@ -20,7 +20,7 @@ defineProps<{ v-for="m in modules" :key="m.id" class="block border-b border-main px-3 py-2 text-left font-mono text-sm" - :to="`/module?id=${m.id}`" + :to="`/module?id=${encodeURIComponent(m.id)}`" >