add rank.
This commit is contained in:
560
src/auto-imports.d.ts
vendored
560
src/auto-imports.d.ts
vendored
@@ -1,284 +1,284 @@
|
||||
// Generated by 'unplugin-auto-import'
|
||||
export {}
|
||||
declare global {
|
||||
const EffectScope: typeof import('vue')['EffectScope']
|
||||
const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate']
|
||||
const asyncComputed: typeof import('@vueuse/core')['asyncComputed']
|
||||
const autoResetRef: typeof import('@vueuse/core')['autoResetRef']
|
||||
const computed: typeof import('vue')['computed']
|
||||
const computedAsync: typeof import('@vueuse/core')['computedAsync']
|
||||
const computedEager: typeof import('@vueuse/core')['computedEager']
|
||||
const computedInject: typeof import('@vueuse/core')['computedInject']
|
||||
const computedWithControl: typeof import('@vueuse/core')['computedWithControl']
|
||||
const controlledComputed: typeof import('@vueuse/core')['controlledComputed']
|
||||
const controlledRef: typeof import('@vueuse/core')['controlledRef']
|
||||
const createApp: typeof import('vue')['createApp']
|
||||
const createEventHook: typeof import('@vueuse/core')['createEventHook']
|
||||
const createGlobalState: typeof import('@vueuse/core')['createGlobalState']
|
||||
const createInjectionState: typeof import('@vueuse/core')['createInjectionState']
|
||||
const createPinia: typeof import('pinia')['createPinia']
|
||||
const createReactiveFn: typeof import('@vueuse/core')['createReactiveFn']
|
||||
const createSharedComposable: typeof import('@vueuse/core')['createSharedComposable']
|
||||
const createUnrefFn: typeof import('@vueuse/core')['createUnrefFn']
|
||||
const customRef: typeof import('vue')['customRef']
|
||||
const debouncedRef: typeof import('@vueuse/core')['debouncedRef']
|
||||
const debouncedWatch: typeof import('@vueuse/core')['debouncedWatch']
|
||||
const defineAsyncComponent: typeof import('vue')['defineAsyncComponent']
|
||||
const defineComponent: typeof import('vue')['defineComponent']
|
||||
const defineStore: typeof import('pinia')['defineStore']
|
||||
const eagerComputed: typeof import('@vueuse/core')['eagerComputed']
|
||||
const effectScope: typeof import('vue')['effectScope']
|
||||
const extendRef: typeof import('@vueuse/core')['extendRef']
|
||||
const getActivePinia: typeof import('pinia')['getActivePinia']
|
||||
const getCurrentInstance: typeof import('vue')['getCurrentInstance']
|
||||
const getCurrentScope: typeof import('vue')['getCurrentScope']
|
||||
const h: typeof import('vue')['h']
|
||||
const ignorableWatch: typeof import('@vueuse/core')['ignorableWatch']
|
||||
const inject: typeof import('vue')['inject']
|
||||
const isDefined: typeof import('@vueuse/core')['isDefined']
|
||||
const isProxy: typeof import('vue')['isProxy']
|
||||
const isReactive: typeof import('vue')['isReactive']
|
||||
const isReadonly: typeof import('vue')['isReadonly']
|
||||
const isRef: typeof import('vue')['isRef']
|
||||
const makeDestructurable: typeof import('@vueuse/core')['makeDestructurable']
|
||||
const mapActions: typeof import('pinia')['mapActions']
|
||||
const mapGetters: typeof import('pinia')['mapGetters']
|
||||
const mapState: typeof import('pinia')['mapState']
|
||||
const mapStores: typeof import('pinia')['mapStores']
|
||||
const mapWritableState: typeof import('pinia')['mapWritableState']
|
||||
const markRaw: typeof import('vue')['markRaw']
|
||||
const nextTick: typeof import('vue')['nextTick']
|
||||
const onActivated: typeof import('vue')['onActivated']
|
||||
const onBeforeMount: typeof import('vue')['onBeforeMount']
|
||||
const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
|
||||
const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
|
||||
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
|
||||
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
|
||||
const onClickOutside: typeof import('@vueuse/core')['onClickOutside']
|
||||
const onDeactivated: typeof import('vue')['onDeactivated']
|
||||
const onErrorCaptured: typeof import('vue')['onErrorCaptured']
|
||||
const onKeyStroke: typeof import('@vueuse/core')['onKeyStroke']
|
||||
const onLongPress: typeof import('@vueuse/core')['onLongPress']
|
||||
const onMounted: typeof import('vue')['onMounted']
|
||||
const onRenderTracked: typeof import('vue')['onRenderTracked']
|
||||
const onRenderTriggered: typeof import('vue')['onRenderTriggered']
|
||||
const onScopeDispose: typeof import('vue')['onScopeDispose']
|
||||
const onServerPrefetch: typeof import('vue')['onServerPrefetch']
|
||||
const onStartTyping: typeof import('@vueuse/core')['onStartTyping']
|
||||
const onUnmounted: typeof import('vue')['onUnmounted']
|
||||
const onUpdated: typeof import('vue')['onUpdated']
|
||||
const pausableWatch: typeof import('@vueuse/core')['pausableWatch']
|
||||
const provide: typeof import('vue')['provide']
|
||||
const reactify: typeof import('@vueuse/core')['reactify']
|
||||
const reactifyObject: typeof import('@vueuse/core')['reactifyObject']
|
||||
const reactive: typeof import('vue')['reactive']
|
||||
const reactiveComputed: typeof import('@vueuse/core')['reactiveComputed']
|
||||
const reactiveOmit: typeof import('@vueuse/core')['reactiveOmit']
|
||||
const reactivePick: typeof import('@vueuse/core')['reactivePick']
|
||||
const readonly: typeof import('vue')['readonly']
|
||||
const ref: typeof import('vue')['ref']
|
||||
const refAutoReset: typeof import('@vueuse/core')['refAutoReset']
|
||||
const refDebounced: typeof import('@vueuse/core')['refDebounced']
|
||||
const refDefault: typeof import('@vueuse/core')['refDefault']
|
||||
const refThrottled: typeof import('@vueuse/core')['refThrottled']
|
||||
const refWithControl: typeof import('@vueuse/core')['refWithControl']
|
||||
const resolveComponent: typeof import('vue')['resolveComponent']
|
||||
const resolveDirective: typeof import('vue')['resolveDirective']
|
||||
const resolveRef: typeof import('@vueuse/core')['resolveRef']
|
||||
const resolveUnref: typeof import('@vueuse/core')['resolveUnref']
|
||||
const setActivePinia: typeof import('pinia')['setActivePinia']
|
||||
const setMapStoreSuffix: typeof import('pinia')['setMapStoreSuffix']
|
||||
const shallowReactive: typeof import('vue')['shallowReactive']
|
||||
const shallowReadonly: typeof import('vue')['shallowReadonly']
|
||||
const shallowRef: typeof import('vue')['shallowRef']
|
||||
const storeToRefs: typeof import('pinia')['storeToRefs']
|
||||
const syncRef: typeof import('@vueuse/core')['syncRef']
|
||||
const syncRefs: typeof import('@vueuse/core')['syncRefs']
|
||||
const templateRef: typeof import('@vueuse/core')['templateRef']
|
||||
const throttledRef: typeof import('@vueuse/core')['throttledRef']
|
||||
const throttledWatch: typeof import('@vueuse/core')['throttledWatch']
|
||||
const toRaw: typeof import('vue')['toRaw']
|
||||
const toReactive: typeof import('@vueuse/core')['toReactive']
|
||||
const toRef: typeof import('vue')['toRef']
|
||||
const toRefs: typeof import('vue')['toRefs']
|
||||
const triggerRef: typeof import('vue')['triggerRef']
|
||||
const tryOnBeforeMount: typeof import('@vueuse/core')['tryOnBeforeMount']
|
||||
const tryOnBeforeUnmount: typeof import('@vueuse/core')['tryOnBeforeUnmount']
|
||||
const tryOnMounted: typeof import('@vueuse/core')['tryOnMounted']
|
||||
const tryOnScopeDispose: typeof import('@vueuse/core')['tryOnScopeDispose']
|
||||
const tryOnUnmounted: typeof import('@vueuse/core')['tryOnUnmounted']
|
||||
const unref: typeof import('vue')['unref']
|
||||
const unrefElement: typeof import('@vueuse/core')['unrefElement']
|
||||
const until: typeof import('@vueuse/core')['until']
|
||||
const useActiveElement: typeof import('@vueuse/core')['useActiveElement']
|
||||
const useArrayEvery: typeof import('@vueuse/core')['useArrayEvery']
|
||||
const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter']
|
||||
const useArrayFind: typeof import('@vueuse/core')['useArrayFind']
|
||||
const useArrayFindIndex: typeof import('@vueuse/core')['useArrayFindIndex']
|
||||
const useArrayJoin: typeof import('@vueuse/core')['useArrayJoin']
|
||||
const useArrayMap: typeof import('@vueuse/core')['useArrayMap']
|
||||
const useArrayReduce: typeof import('@vueuse/core')['useArrayReduce']
|
||||
const useArraySome: typeof import('@vueuse/core')['useArraySome']
|
||||
const useArrayUnique: typeof import('@vueuse/core')['useArrayUnique']
|
||||
const useAsyncQueue: typeof import('@vueuse/core')['useAsyncQueue']
|
||||
const useAsyncState: typeof import('@vueuse/core')['useAsyncState']
|
||||
const useAttrs: typeof import('vue')['useAttrs']
|
||||
const useBase64: typeof import('@vueuse/core')['useBase64']
|
||||
const useBattery: typeof import('@vueuse/core')['useBattery']
|
||||
const useBluetooth: typeof import('@vueuse/core')['useBluetooth']
|
||||
const useBreakpoints: typeof import('@vueuse/core')['useBreakpoints']
|
||||
const useBroadcastChannel: typeof import('@vueuse/core')['useBroadcastChannel']
|
||||
const useBrowserLocation: typeof import('@vueuse/core')['useBrowserLocation']
|
||||
const useCached: typeof import('@vueuse/core')['useCached']
|
||||
const useClipboard: typeof import('@vueuse/core')['useClipboard']
|
||||
const useCloned: typeof import('@vueuse/core')['useCloned']
|
||||
const useColorMode: typeof import('@vueuse/core')['useColorMode']
|
||||
const useConfirmDialog: typeof import('@vueuse/core')['useConfirmDialog']
|
||||
const useCounter: typeof import('@vueuse/core')['useCounter']
|
||||
const useCssModule: typeof import('vue')['useCssModule']
|
||||
const useCssVar: typeof import('@vueuse/core')['useCssVar']
|
||||
const useCssVars: typeof import('vue')['useCssVars']
|
||||
const useCurrentElement: typeof import('@vueuse/core')['useCurrentElement']
|
||||
const useCycleList: typeof import('@vueuse/core')['useCycleList']
|
||||
const useDark: typeof import('@vueuse/core')['useDark']
|
||||
const useDateFormat: typeof import('@vueuse/core')['useDateFormat']
|
||||
const useDebounce: typeof import('@vueuse/core')['useDebounce']
|
||||
const useDebounceFn: typeof import('@vueuse/core')['useDebounceFn']
|
||||
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']
|
||||
const useDevicesList: typeof import('@vueuse/core')['useDevicesList']
|
||||
const useDialog: typeof import('naive-ui')['useDialog']
|
||||
const useDisplayMedia: typeof import('@vueuse/core')['useDisplayMedia']
|
||||
const useDocumentVisibility: typeof import('@vueuse/core')['useDocumentVisibility']
|
||||
const useDraggable: typeof import('@vueuse/core')['useDraggable']
|
||||
const useDropZone: typeof import('@vueuse/core')['useDropZone']
|
||||
const useElementBounding: typeof import('@vueuse/core')['useElementBounding']
|
||||
const useElementByPoint: typeof import('@vueuse/core')['useElementByPoint']
|
||||
const useElementHover: typeof import('@vueuse/core')['useElementHover']
|
||||
const useElementSize: typeof import('@vueuse/core')['useElementSize']
|
||||
const useElementVisibility: typeof import('@vueuse/core')['useElementVisibility']
|
||||
const useEventBus: typeof import('@vueuse/core')['useEventBus']
|
||||
const useEventListener: typeof import('@vueuse/core')['useEventListener']
|
||||
const useEventSource: typeof import('@vueuse/core')['useEventSource']
|
||||
const useEyeDropper: typeof import('@vueuse/core')['useEyeDropper']
|
||||
const useFavicon: typeof import('@vueuse/core')['useFavicon']
|
||||
const useFetch: typeof import('@vueuse/core')['useFetch']
|
||||
const useFileDialog: typeof import('@vueuse/core')['useFileDialog']
|
||||
const useFileSystemAccess: typeof import('@vueuse/core')['useFileSystemAccess']
|
||||
const useFocus: typeof import('@vueuse/core')['useFocus']
|
||||
const useFocusWithin: typeof import('@vueuse/core')['useFocusWithin']
|
||||
const useFps: typeof import('@vueuse/core')['useFps']
|
||||
const useFullscreen: typeof import('@vueuse/core')['useFullscreen']
|
||||
const useGamepad: typeof import('@vueuse/core')['useGamepad']
|
||||
const useGeolocation: typeof import('@vueuse/core')['useGeolocation']
|
||||
const useIdle: typeof import('@vueuse/core')['useIdle']
|
||||
const useImage: typeof import('@vueuse/core')['useImage']
|
||||
const useInfiniteScroll: typeof import('@vueuse/core')['useInfiniteScroll']
|
||||
const useIntersectionObserver: typeof import('@vueuse/core')['useIntersectionObserver']
|
||||
const useInterval: typeof import('@vueuse/core')['useInterval']
|
||||
const useIntervalFn: typeof import('@vueuse/core')['useIntervalFn']
|
||||
const useKeyModifier: typeof import('@vueuse/core')['useKeyModifier']
|
||||
const useLastChanged: typeof import('@vueuse/core')['useLastChanged']
|
||||
const useLink: typeof import('vue-router')['useLink']
|
||||
const useLoadingBar: typeof import('naive-ui')['useLoadingBar']
|
||||
const useLocalStorage: typeof import('@vueuse/core')['useLocalStorage']
|
||||
const useMagicKeys: typeof import('@vueuse/core')['useMagicKeys']
|
||||
const useManualRefHistory: typeof import('@vueuse/core')['useManualRefHistory']
|
||||
const useMediaControls: typeof import('@vueuse/core')['useMediaControls']
|
||||
const useMediaQuery: typeof import('@vueuse/core')['useMediaQuery']
|
||||
const useMemoize: typeof import('@vueuse/core')['useMemoize']
|
||||
const useMemory: typeof import('@vueuse/core')['useMemory']
|
||||
const useMessage: typeof import('naive-ui')['useMessage']
|
||||
const useMounted: typeof import('@vueuse/core')['useMounted']
|
||||
const useMouse: typeof import('@vueuse/core')['useMouse']
|
||||
const useMouseInElement: typeof import('@vueuse/core')['useMouseInElement']
|
||||
const useMousePressed: typeof import('@vueuse/core')['useMousePressed']
|
||||
const useMutationObserver: typeof import('@vueuse/core')['useMutationObserver']
|
||||
const useNavigatorLanguage: typeof import('@vueuse/core')['useNavigatorLanguage']
|
||||
const useNetwork: typeof import('@vueuse/core')['useNetwork']
|
||||
const useNotification: typeof import('naive-ui')['useNotification']
|
||||
const useNow: typeof import('@vueuse/core')['useNow']
|
||||
const useObjectUrl: typeof import('@vueuse/core')['useObjectUrl']
|
||||
const useOffsetPagination: typeof import('@vueuse/core')['useOffsetPagination']
|
||||
const useOnline: typeof import('@vueuse/core')['useOnline']
|
||||
const usePageLeave: typeof import('@vueuse/core')['usePageLeave']
|
||||
const useParallax: typeof import('@vueuse/core')['useParallax']
|
||||
const usePermission: typeof import('@vueuse/core')['usePermission']
|
||||
const usePointer: typeof import('@vueuse/core')['usePointer']
|
||||
const usePointerLock: typeof import('@vueuse/core')['usePointerLock']
|
||||
const usePointerSwipe: typeof import('@vueuse/core')['usePointerSwipe']
|
||||
const usePreferredColorScheme: typeof import('@vueuse/core')['usePreferredColorScheme']
|
||||
const usePreferredContrast: typeof import('@vueuse/core')['usePreferredContrast']
|
||||
const usePreferredDark: typeof import('@vueuse/core')['usePreferredDark']
|
||||
const usePreferredLanguages: typeof import('@vueuse/core')['usePreferredLanguages']
|
||||
const usePreferredReducedMotion: typeof import('@vueuse/core')['usePreferredReducedMotion']
|
||||
const useRafFn: typeof import('@vueuse/core')['useRafFn']
|
||||
const useRefHistory: typeof import('@vueuse/core')['useRefHistory']
|
||||
const useResizeObserver: typeof import('@vueuse/core')['useResizeObserver']
|
||||
const useRoute: typeof import('vue-router')['useRoute']
|
||||
const useRouter: typeof import('vue-router')['useRouter']
|
||||
const useScreenOrientation: typeof import('@vueuse/core')['useScreenOrientation']
|
||||
const useScreenSafeArea: typeof import('@vueuse/core')['useScreenSafeArea']
|
||||
const useScriptTag: typeof import('@vueuse/core')['useScriptTag']
|
||||
const useScroll: typeof import('@vueuse/core')['useScroll']
|
||||
const useScrollLock: typeof import('@vueuse/core')['useScrollLock']
|
||||
const useSessionStorage: typeof import('@vueuse/core')['useSessionStorage']
|
||||
const useShare: typeof import('@vueuse/core')['useShare']
|
||||
const useSlots: typeof import('vue')['useSlots']
|
||||
const useSorted: typeof import('@vueuse/core')['useSorted']
|
||||
const useSpeechRecognition: typeof import('@vueuse/core')['useSpeechRecognition']
|
||||
const useSpeechSynthesis: typeof import('@vueuse/core')['useSpeechSynthesis']
|
||||
const useStepper: typeof import('@vueuse/core')['useStepper']
|
||||
const useStorage: typeof import('@vueuse/core')['useStorage']
|
||||
const useStorageAsync: typeof import('@vueuse/core')['useStorageAsync']
|
||||
const useStyleTag: typeof import('@vueuse/core')['useStyleTag']
|
||||
const useSupported: typeof import('@vueuse/core')['useSupported']
|
||||
const useSwipe: typeof import('@vueuse/core')['useSwipe']
|
||||
const useTemplateRefsList: typeof import('@vueuse/core')['useTemplateRefsList']
|
||||
const useTextDirection: typeof import('@vueuse/core')['useTextDirection']
|
||||
const useTextSelection: typeof import('@vueuse/core')['useTextSelection']
|
||||
const useTextareaAutosize: typeof import('@vueuse/core')['useTextareaAutosize']
|
||||
const useThrottle: typeof import('@vueuse/core')['useThrottle']
|
||||
const useThrottleFn: typeof import('@vueuse/core')['useThrottleFn']
|
||||
const useThrottledRefHistory: typeof import('@vueuse/core')['useThrottledRefHistory']
|
||||
const useTimeAgo: typeof import('@vueuse/core')['useTimeAgo']
|
||||
const useTimeout: typeof import('@vueuse/core')['useTimeout']
|
||||
const useTimeoutFn: typeof import('@vueuse/core')['useTimeoutFn']
|
||||
const useTimeoutPoll: typeof import('@vueuse/core')['useTimeoutPoll']
|
||||
const useTimestamp: typeof import('@vueuse/core')['useTimestamp']
|
||||
const useTitle: typeof import('@vueuse/core')['useTitle']
|
||||
const useToNumber: typeof import('@vueuse/core')['useToNumber']
|
||||
const useToString: typeof import('@vueuse/core')['useToString']
|
||||
const useToggle: typeof import('@vueuse/core')['useToggle']
|
||||
const useTransition: typeof import('@vueuse/core')['useTransition']
|
||||
const useUrlSearchParams: typeof import('@vueuse/core')['useUrlSearchParams']
|
||||
const useUserMedia: typeof import('@vueuse/core')['useUserMedia']
|
||||
const useVModel: typeof import('@vueuse/core')['useVModel']
|
||||
const useVModels: typeof import('@vueuse/core')['useVModels']
|
||||
const useVibrate: typeof import('@vueuse/core')['useVibrate']
|
||||
const useVirtualList: typeof import('@vueuse/core')['useVirtualList']
|
||||
const useWakeLock: typeof import('@vueuse/core')['useWakeLock']
|
||||
const useWebNotification: typeof import('@vueuse/core')['useWebNotification']
|
||||
const useWebSocket: typeof import('@vueuse/core')['useWebSocket']
|
||||
const useWebWorker: typeof import('@vueuse/core')['useWebWorker']
|
||||
const useWebWorkerFn: typeof import('@vueuse/core')['useWebWorkerFn']
|
||||
const useWindowFocus: typeof import('@vueuse/core')['useWindowFocus']
|
||||
const useWindowScroll: typeof import('@vueuse/core')['useWindowScroll']
|
||||
const useWindowSize: typeof import('@vueuse/core')['useWindowSize']
|
||||
const watch: typeof import('vue')['watch']
|
||||
const watchArray: typeof import('@vueuse/core')['watchArray']
|
||||
const watchAtMost: typeof import('@vueuse/core')['watchAtMost']
|
||||
const watchDebounced: typeof import('@vueuse/core')['watchDebounced']
|
||||
const watchEffect: typeof import('vue')['watchEffect']
|
||||
const watchIgnorable: typeof import('@vueuse/core')['watchIgnorable']
|
||||
const watchOnce: typeof import('@vueuse/core')['watchOnce']
|
||||
const watchPausable: typeof import('@vueuse/core')['watchPausable']
|
||||
const watchPostEffect: typeof import('vue')['watchPostEffect']
|
||||
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
|
||||
const watchThrottled: typeof import('@vueuse/core')['watchThrottled']
|
||||
const watchTriggerable: typeof import('@vueuse/core')['watchTriggerable']
|
||||
const watchWithFilter: typeof import('@vueuse/core')['watchWithFilter']
|
||||
const whenever: typeof import('@vueuse/core')['whenever']
|
||||
const EffectScope: typeof import("vue")["EffectScope"]
|
||||
const acceptHMRUpdate: typeof import("pinia")["acceptHMRUpdate"]
|
||||
const asyncComputed: typeof import("@vueuse/core")["asyncComputed"]
|
||||
const autoResetRef: typeof import("@vueuse/core")["autoResetRef"]
|
||||
const computed: typeof import("vue")["computed"]
|
||||
const computedAsync: typeof import("@vueuse/core")["computedAsync"]
|
||||
const computedEager: typeof import("@vueuse/core")["computedEager"]
|
||||
const computedInject: typeof import("@vueuse/core")["computedInject"]
|
||||
const computedWithControl: typeof import("@vueuse/core")["computedWithControl"]
|
||||
const controlledComputed: typeof import("@vueuse/core")["controlledComputed"]
|
||||
const controlledRef: typeof import("@vueuse/core")["controlledRef"]
|
||||
const createApp: typeof import("vue")["createApp"]
|
||||
const createEventHook: typeof import("@vueuse/core")["createEventHook"]
|
||||
const createGlobalState: typeof import("@vueuse/core")["createGlobalState"]
|
||||
const createInjectionState: typeof import("@vueuse/core")["createInjectionState"]
|
||||
const createPinia: typeof import("pinia")["createPinia"]
|
||||
const createReactiveFn: typeof import("@vueuse/core")["createReactiveFn"]
|
||||
const createSharedComposable: typeof import("@vueuse/core")["createSharedComposable"]
|
||||
const createUnrefFn: typeof import("@vueuse/core")["createUnrefFn"]
|
||||
const customRef: typeof import("vue")["customRef"]
|
||||
const debouncedRef: typeof import("@vueuse/core")["debouncedRef"]
|
||||
const debouncedWatch: typeof import("@vueuse/core")["debouncedWatch"]
|
||||
const defineAsyncComponent: typeof import("vue")["defineAsyncComponent"]
|
||||
const defineComponent: typeof import("vue")["defineComponent"]
|
||||
const defineStore: typeof import("pinia")["defineStore"]
|
||||
const eagerComputed: typeof import("@vueuse/core")["eagerComputed"]
|
||||
const effectScope: typeof import("vue")["effectScope"]
|
||||
const extendRef: typeof import("@vueuse/core")["extendRef"]
|
||||
const getActivePinia: typeof import("pinia")["getActivePinia"]
|
||||
const getCurrentInstance: typeof import("vue")["getCurrentInstance"]
|
||||
const getCurrentScope: typeof import("vue")["getCurrentScope"]
|
||||
const h: typeof import("vue")["h"]
|
||||
const ignorableWatch: typeof import("@vueuse/core")["ignorableWatch"]
|
||||
const inject: typeof import("vue")["inject"]
|
||||
const isDefined: typeof import("@vueuse/core")["isDefined"]
|
||||
const isProxy: typeof import("vue")["isProxy"]
|
||||
const isReactive: typeof import("vue")["isReactive"]
|
||||
const isReadonly: typeof import("vue")["isReadonly"]
|
||||
const isRef: typeof import("vue")["isRef"]
|
||||
const makeDestructurable: typeof import("@vueuse/core")["makeDestructurable"]
|
||||
const mapActions: typeof import("pinia")["mapActions"]
|
||||
const mapGetters: typeof import("pinia")["mapGetters"]
|
||||
const mapState: typeof import("pinia")["mapState"]
|
||||
const mapStores: typeof import("pinia")["mapStores"]
|
||||
const mapWritableState: typeof import("pinia")["mapWritableState"]
|
||||
const markRaw: typeof import("vue")["markRaw"]
|
||||
const nextTick: typeof import("vue")["nextTick"]
|
||||
const onActivated: typeof import("vue")["onActivated"]
|
||||
const onBeforeMount: typeof import("vue")["onBeforeMount"]
|
||||
const onBeforeRouteLeave: typeof import("vue-router")["onBeforeRouteLeave"]
|
||||
const onBeforeRouteUpdate: typeof import("vue-router")["onBeforeRouteUpdate"]
|
||||
const onBeforeUnmount: typeof import("vue")["onBeforeUnmount"]
|
||||
const onBeforeUpdate: typeof import("vue")["onBeforeUpdate"]
|
||||
const onClickOutside: typeof import("@vueuse/core")["onClickOutside"]
|
||||
const onDeactivated: typeof import("vue")["onDeactivated"]
|
||||
const onErrorCaptured: typeof import("vue")["onErrorCaptured"]
|
||||
const onKeyStroke: typeof import("@vueuse/core")["onKeyStroke"]
|
||||
const onLongPress: typeof import("@vueuse/core")["onLongPress"]
|
||||
const onMounted: typeof import("vue")["onMounted"]
|
||||
const onRenderTracked: typeof import("vue")["onRenderTracked"]
|
||||
const onRenderTriggered: typeof import("vue")["onRenderTriggered"]
|
||||
const onScopeDispose: typeof import("vue")["onScopeDispose"]
|
||||
const onServerPrefetch: typeof import("vue")["onServerPrefetch"]
|
||||
const onStartTyping: typeof import("@vueuse/core")["onStartTyping"]
|
||||
const onUnmounted: typeof import("vue")["onUnmounted"]
|
||||
const onUpdated: typeof import("vue")["onUpdated"]
|
||||
const pausableWatch: typeof import("@vueuse/core")["pausableWatch"]
|
||||
const provide: typeof import("vue")["provide"]
|
||||
const reactify: typeof import("@vueuse/core")["reactify"]
|
||||
const reactifyObject: typeof import("@vueuse/core")["reactifyObject"]
|
||||
const reactive: typeof import("vue")["reactive"]
|
||||
const reactiveComputed: typeof import("@vueuse/core")["reactiveComputed"]
|
||||
const reactiveOmit: typeof import("@vueuse/core")["reactiveOmit"]
|
||||
const reactivePick: typeof import("@vueuse/core")["reactivePick"]
|
||||
const readonly: typeof import("vue")["readonly"]
|
||||
const ref: typeof import("vue")["ref"]
|
||||
const refAutoReset: typeof import("@vueuse/core")["refAutoReset"]
|
||||
const refDebounced: typeof import("@vueuse/core")["refDebounced"]
|
||||
const refDefault: typeof import("@vueuse/core")["refDefault"]
|
||||
const refThrottled: typeof import("@vueuse/core")["refThrottled"]
|
||||
const refWithControl: typeof import("@vueuse/core")["refWithControl"]
|
||||
const resolveComponent: typeof import("vue")["resolveComponent"]
|
||||
const resolveDirective: typeof import("vue")["resolveDirective"]
|
||||
const resolveRef: typeof import("@vueuse/core")["resolveRef"]
|
||||
const resolveUnref: typeof import("@vueuse/core")["resolveUnref"]
|
||||
const setActivePinia: typeof import("pinia")["setActivePinia"]
|
||||
const setMapStoreSuffix: typeof import("pinia")["setMapStoreSuffix"]
|
||||
const shallowReactive: typeof import("vue")["shallowReactive"]
|
||||
const shallowReadonly: typeof import("vue")["shallowReadonly"]
|
||||
const shallowRef: typeof import("vue")["shallowRef"]
|
||||
const storeToRefs: typeof import("pinia")["storeToRefs"]
|
||||
const syncRef: typeof import("@vueuse/core")["syncRef"]
|
||||
const syncRefs: typeof import("@vueuse/core")["syncRefs"]
|
||||
const templateRef: typeof import("@vueuse/core")["templateRef"]
|
||||
const throttledRef: typeof import("@vueuse/core")["throttledRef"]
|
||||
const throttledWatch: typeof import("@vueuse/core")["throttledWatch"]
|
||||
const toRaw: typeof import("vue")["toRaw"]
|
||||
const toReactive: typeof import("@vueuse/core")["toReactive"]
|
||||
const toRef: typeof import("vue")["toRef"]
|
||||
const toRefs: typeof import("vue")["toRefs"]
|
||||
const triggerRef: typeof import("vue")["triggerRef"]
|
||||
const tryOnBeforeMount: typeof import("@vueuse/core")["tryOnBeforeMount"]
|
||||
const tryOnBeforeUnmount: typeof import("@vueuse/core")["tryOnBeforeUnmount"]
|
||||
const tryOnMounted: typeof import("@vueuse/core")["tryOnMounted"]
|
||||
const tryOnScopeDispose: typeof import("@vueuse/core")["tryOnScopeDispose"]
|
||||
const tryOnUnmounted: typeof import("@vueuse/core")["tryOnUnmounted"]
|
||||
const unref: typeof import("vue")["unref"]
|
||||
const unrefElement: typeof import("@vueuse/core")["unrefElement"]
|
||||
const until: typeof import("@vueuse/core")["until"]
|
||||
const useActiveElement: typeof import("@vueuse/core")["useActiveElement"]
|
||||
const useArrayEvery: typeof import("@vueuse/core")["useArrayEvery"]
|
||||
const useArrayFilter: typeof import("@vueuse/core")["useArrayFilter"]
|
||||
const useArrayFind: typeof import("@vueuse/core")["useArrayFind"]
|
||||
const useArrayFindIndex: typeof import("@vueuse/core")["useArrayFindIndex"]
|
||||
const useArrayJoin: typeof import("@vueuse/core")["useArrayJoin"]
|
||||
const useArrayMap: typeof import("@vueuse/core")["useArrayMap"]
|
||||
const useArrayReduce: typeof import("@vueuse/core")["useArrayReduce"]
|
||||
const useArraySome: typeof import("@vueuse/core")["useArraySome"]
|
||||
const useArrayUnique: typeof import("@vueuse/core")["useArrayUnique"]
|
||||
const useAsyncQueue: typeof import("@vueuse/core")["useAsyncQueue"]
|
||||
const useAsyncState: typeof import("@vueuse/core")["useAsyncState"]
|
||||
const useAttrs: typeof import("vue")["useAttrs"]
|
||||
const useBase64: typeof import("@vueuse/core")["useBase64"]
|
||||
const useBattery: typeof import("@vueuse/core")["useBattery"]
|
||||
const useBluetooth: typeof import("@vueuse/core")["useBluetooth"]
|
||||
const useBreakpoints: typeof import("@vueuse/core")["useBreakpoints"]
|
||||
const useBroadcastChannel: typeof import("@vueuse/core")["useBroadcastChannel"]
|
||||
const useBrowserLocation: typeof import("@vueuse/core")["useBrowserLocation"]
|
||||
const useCached: typeof import("@vueuse/core")["useCached"]
|
||||
const useClipboard: typeof import("@vueuse/core")["useClipboard"]
|
||||
const useCloned: typeof import("@vueuse/core")["useCloned"]
|
||||
const useColorMode: typeof import("@vueuse/core")["useColorMode"]
|
||||
const useConfirmDialog: typeof import("@vueuse/core")["useConfirmDialog"]
|
||||
const useCounter: typeof import("@vueuse/core")["useCounter"]
|
||||
const useCssModule: typeof import("vue")["useCssModule"]
|
||||
const useCssVar: typeof import("@vueuse/core")["useCssVar"]
|
||||
const useCssVars: typeof import("vue")["useCssVars"]
|
||||
const useCurrentElement: typeof import("@vueuse/core")["useCurrentElement"]
|
||||
const useCycleList: typeof import("@vueuse/core")["useCycleList"]
|
||||
const useDark: typeof import("@vueuse/core")["useDark"]
|
||||
const useDateFormat: typeof import("@vueuse/core")["useDateFormat"]
|
||||
const useDebounce: typeof import("@vueuse/core")["useDebounce"]
|
||||
const useDebounceFn: typeof import("@vueuse/core")["useDebounceFn"]
|
||||
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"]
|
||||
const useDevicesList: typeof import("@vueuse/core")["useDevicesList"]
|
||||
const useDialog: typeof import("naive-ui")["useDialog"]
|
||||
const useDisplayMedia: typeof import("@vueuse/core")["useDisplayMedia"]
|
||||
const useDocumentVisibility: typeof import("@vueuse/core")["useDocumentVisibility"]
|
||||
const useDraggable: typeof import("@vueuse/core")["useDraggable"]
|
||||
const useDropZone: typeof import("@vueuse/core")["useDropZone"]
|
||||
const useElementBounding: typeof import("@vueuse/core")["useElementBounding"]
|
||||
const useElementByPoint: typeof import("@vueuse/core")["useElementByPoint"]
|
||||
const useElementHover: typeof import("@vueuse/core")["useElementHover"]
|
||||
const useElementSize: typeof import("@vueuse/core")["useElementSize"]
|
||||
const useElementVisibility: typeof import("@vueuse/core")["useElementVisibility"]
|
||||
const useEventBus: typeof import("@vueuse/core")["useEventBus"]
|
||||
const useEventListener: typeof import("@vueuse/core")["useEventListener"]
|
||||
const useEventSource: typeof import("@vueuse/core")["useEventSource"]
|
||||
const useEyeDropper: typeof import("@vueuse/core")["useEyeDropper"]
|
||||
const useFavicon: typeof import("@vueuse/core")["useFavicon"]
|
||||
const useFetch: typeof import("@vueuse/core")["useFetch"]
|
||||
const useFileDialog: typeof import("@vueuse/core")["useFileDialog"]
|
||||
const useFileSystemAccess: typeof import("@vueuse/core")["useFileSystemAccess"]
|
||||
const useFocus: typeof import("@vueuse/core")["useFocus"]
|
||||
const useFocusWithin: typeof import("@vueuse/core")["useFocusWithin"]
|
||||
const useFps: typeof import("@vueuse/core")["useFps"]
|
||||
const useFullscreen: typeof import("@vueuse/core")["useFullscreen"]
|
||||
const useGamepad: typeof import("@vueuse/core")["useGamepad"]
|
||||
const useGeolocation: typeof import("@vueuse/core")["useGeolocation"]
|
||||
const useIdle: typeof import("@vueuse/core")["useIdle"]
|
||||
const useImage: typeof import("@vueuse/core")["useImage"]
|
||||
const useInfiniteScroll: typeof import("@vueuse/core")["useInfiniteScroll"]
|
||||
const useIntersectionObserver: typeof import("@vueuse/core")["useIntersectionObserver"]
|
||||
const useInterval: typeof import("@vueuse/core")["useInterval"]
|
||||
const useIntervalFn: typeof import("@vueuse/core")["useIntervalFn"]
|
||||
const useKeyModifier: typeof import("@vueuse/core")["useKeyModifier"]
|
||||
const useLastChanged: typeof import("@vueuse/core")["useLastChanged"]
|
||||
const useLink: typeof import("vue-router")["useLink"]
|
||||
const useLoadingBar: typeof import("naive-ui")["useLoadingBar"]
|
||||
const useLocalStorage: typeof import("@vueuse/core")["useLocalStorage"]
|
||||
const useMagicKeys: typeof import("@vueuse/core")["useMagicKeys"]
|
||||
const useManualRefHistory: typeof import("@vueuse/core")["useManualRefHistory"]
|
||||
const useMediaControls: typeof import("@vueuse/core")["useMediaControls"]
|
||||
const useMediaQuery: typeof import("@vueuse/core")["useMediaQuery"]
|
||||
const useMemoize: typeof import("@vueuse/core")["useMemoize"]
|
||||
const useMemory: typeof import("@vueuse/core")["useMemory"]
|
||||
const useMessage: typeof import("naive-ui")["useMessage"]
|
||||
const useMounted: typeof import("@vueuse/core")["useMounted"]
|
||||
const useMouse: typeof import("@vueuse/core")["useMouse"]
|
||||
const useMouseInElement: typeof import("@vueuse/core")["useMouseInElement"]
|
||||
const useMousePressed: typeof import("@vueuse/core")["useMousePressed"]
|
||||
const useMutationObserver: typeof import("@vueuse/core")["useMutationObserver"]
|
||||
const useNavigatorLanguage: typeof import("@vueuse/core")["useNavigatorLanguage"]
|
||||
const useNetwork: typeof import("@vueuse/core")["useNetwork"]
|
||||
const useNotification: typeof import("naive-ui")["useNotification"]
|
||||
const useNow: typeof import("@vueuse/core")["useNow"]
|
||||
const useObjectUrl: typeof import("@vueuse/core")["useObjectUrl"]
|
||||
const useOffsetPagination: typeof import("@vueuse/core")["useOffsetPagination"]
|
||||
const useOnline: typeof import("@vueuse/core")["useOnline"]
|
||||
const usePageLeave: typeof import("@vueuse/core")["usePageLeave"]
|
||||
const useParallax: typeof import("@vueuse/core")["useParallax"]
|
||||
const usePermission: typeof import("@vueuse/core")["usePermission"]
|
||||
const usePointer: typeof import("@vueuse/core")["usePointer"]
|
||||
const usePointerLock: typeof import("@vueuse/core")["usePointerLock"]
|
||||
const usePointerSwipe: typeof import("@vueuse/core")["usePointerSwipe"]
|
||||
const usePreferredColorScheme: typeof import("@vueuse/core")["usePreferredColorScheme"]
|
||||
const usePreferredContrast: typeof import("@vueuse/core")["usePreferredContrast"]
|
||||
const usePreferredDark: typeof import("@vueuse/core")["usePreferredDark"]
|
||||
const usePreferredLanguages: typeof import("@vueuse/core")["usePreferredLanguages"]
|
||||
const usePreferredReducedMotion: typeof import("@vueuse/core")["usePreferredReducedMotion"]
|
||||
const useRafFn: typeof import("@vueuse/core")["useRafFn"]
|
||||
const useRefHistory: typeof import("@vueuse/core")["useRefHistory"]
|
||||
const useResizeObserver: typeof import("@vueuse/core")["useResizeObserver"]
|
||||
const useRoute: typeof import("vue-router")["useRoute"]
|
||||
const useRouter: typeof import("vue-router")["useRouter"]
|
||||
const useScreenOrientation: typeof import("@vueuse/core")["useScreenOrientation"]
|
||||
const useScreenSafeArea: typeof import("@vueuse/core")["useScreenSafeArea"]
|
||||
const useScriptTag: typeof import("@vueuse/core")["useScriptTag"]
|
||||
const useScroll: typeof import("@vueuse/core")["useScroll"]
|
||||
const useScrollLock: typeof import("@vueuse/core")["useScrollLock"]
|
||||
const useSessionStorage: typeof import("@vueuse/core")["useSessionStorage"]
|
||||
const useShare: typeof import("@vueuse/core")["useShare"]
|
||||
const useSlots: typeof import("vue")["useSlots"]
|
||||
const useSorted: typeof import("@vueuse/core")["useSorted"]
|
||||
const useSpeechRecognition: typeof import("@vueuse/core")["useSpeechRecognition"]
|
||||
const useSpeechSynthesis: typeof import("@vueuse/core")["useSpeechSynthesis"]
|
||||
const useStepper: typeof import("@vueuse/core")["useStepper"]
|
||||
const useStorage: typeof import("@vueuse/core")["useStorage"]
|
||||
const useStorageAsync: typeof import("@vueuse/core")["useStorageAsync"]
|
||||
const useStyleTag: typeof import("@vueuse/core")["useStyleTag"]
|
||||
const useSupported: typeof import("@vueuse/core")["useSupported"]
|
||||
const useSwipe: typeof import("@vueuse/core")["useSwipe"]
|
||||
const useTemplateRefsList: typeof import("@vueuse/core")["useTemplateRefsList"]
|
||||
const useTextDirection: typeof import("@vueuse/core")["useTextDirection"]
|
||||
const useTextSelection: typeof import("@vueuse/core")["useTextSelection"]
|
||||
const useTextareaAutosize: typeof import("@vueuse/core")["useTextareaAutosize"]
|
||||
const useThrottle: typeof import("@vueuse/core")["useThrottle"]
|
||||
const useThrottleFn: typeof import("@vueuse/core")["useThrottleFn"]
|
||||
const useThrottledRefHistory: typeof import("@vueuse/core")["useThrottledRefHistory"]
|
||||
const useTimeAgo: typeof import("@vueuse/core")["useTimeAgo"]
|
||||
const useTimeout: typeof import("@vueuse/core")["useTimeout"]
|
||||
const useTimeoutFn: typeof import("@vueuse/core")["useTimeoutFn"]
|
||||
const useTimeoutPoll: typeof import("@vueuse/core")["useTimeoutPoll"]
|
||||
const useTimestamp: typeof import("@vueuse/core")["useTimestamp"]
|
||||
const useTitle: typeof import("@vueuse/core")["useTitle"]
|
||||
const useToNumber: typeof import("@vueuse/core")["useToNumber"]
|
||||
const useToString: typeof import("@vueuse/core")["useToString"]
|
||||
const useToggle: typeof import("@vueuse/core")["useToggle"]
|
||||
const useTransition: typeof import("@vueuse/core")["useTransition"]
|
||||
const useUrlSearchParams: typeof import("@vueuse/core")["useUrlSearchParams"]
|
||||
const useUserMedia: typeof import("@vueuse/core")["useUserMedia"]
|
||||
const useVModel: typeof import("@vueuse/core")["useVModel"]
|
||||
const useVModels: typeof import("@vueuse/core")["useVModels"]
|
||||
const useVibrate: typeof import("@vueuse/core")["useVibrate"]
|
||||
const useVirtualList: typeof import("@vueuse/core")["useVirtualList"]
|
||||
const useWakeLock: typeof import("@vueuse/core")["useWakeLock"]
|
||||
const useWebNotification: typeof import("@vueuse/core")["useWebNotification"]
|
||||
const useWebSocket: typeof import("@vueuse/core")["useWebSocket"]
|
||||
const useWebWorker: typeof import("@vueuse/core")["useWebWorker"]
|
||||
const useWebWorkerFn: typeof import("@vueuse/core")["useWebWorkerFn"]
|
||||
const useWindowFocus: typeof import("@vueuse/core")["useWindowFocus"]
|
||||
const useWindowScroll: typeof import("@vueuse/core")["useWindowScroll"]
|
||||
const useWindowSize: typeof import("@vueuse/core")["useWindowSize"]
|
||||
const watch: typeof import("vue")["watch"]
|
||||
const watchArray: typeof import("@vueuse/core")["watchArray"]
|
||||
const watchAtMost: typeof import("@vueuse/core")["watchAtMost"]
|
||||
const watchDebounced: typeof import("@vueuse/core")["watchDebounced"]
|
||||
const watchEffect: typeof import("vue")["watchEffect"]
|
||||
const watchIgnorable: typeof import("@vueuse/core")["watchIgnorable"]
|
||||
const watchOnce: typeof import("@vueuse/core")["watchOnce"]
|
||||
const watchPausable: typeof import("@vueuse/core")["watchPausable"]
|
||||
const watchPostEffect: typeof import("vue")["watchPostEffect"]
|
||||
const watchSyncEffect: typeof import("vue")["watchSyncEffect"]
|
||||
const watchThrottled: typeof import("@vueuse/core")["watchThrottled"]
|
||||
const watchTriggerable: typeof import("@vueuse/core")["watchTriggerable"]
|
||||
const watchWithFilter: typeof import("@vueuse/core")["watchWithFilter"]
|
||||
const whenever: typeof import("@vueuse/core")["whenever"]
|
||||
}
|
||||
|
||||
2
src/components.d.ts
vendored
2
src/components.d.ts
vendored
@@ -20,7 +20,7 @@ declare module '@vue/runtime-core' {
|
||||
NCard: typeof import('naive-ui')['NCard']
|
||||
NCode: typeof import('naive-ui')['NCode']
|
||||
NConfigProvider: typeof import('naive-ui')['NConfigProvider']
|
||||
NCountdown: typeof import('naive-ui')['NCountdown']
|
||||
NCountdown: typeof import("naive-ui")["NCountdown"]
|
||||
NDataTable: typeof import('naive-ui')['NDataTable']
|
||||
NDescriptions: typeof import('naive-ui')['NDescriptions']
|
||||
NDescriptionsItem: typeof import('naive-ui')['NDescriptionsItem']
|
||||
|
||||
@@ -1,111 +1,111 @@
|
||||
# 11
|
||||
|
||||
## 1
|
||||
|
||||
哈哈
|
||||
|
||||
```c {3-4}
|
||||
#include<stdio.h>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
123
|
||||
|
||||
# 11
|
||||
|
||||
## 1
|
||||
|
||||
哈哈
|
||||
|
||||
```c {3-4}
|
||||
#include<stdio.h>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
123
|
||||
|
||||
# 11
|
||||
|
||||
## 1
|
||||
|
||||
哈哈
|
||||
|
||||
```c {3-4}
|
||||
#include<stdio.h>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
123
|
||||
|
||||
# 11
|
||||
|
||||
## 1
|
||||
|
||||
哈哈
|
||||
|
||||
```c {3-4}
|
||||
#include<stdio.h>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
123
|
||||
|
||||
# 11
|
||||
|
||||
## 1
|
||||
|
||||
哈哈
|
||||
|
||||
```c {3-4}
|
||||
#include<stdio.h>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
123
|
||||
|
||||
# 11
|
||||
|
||||
## 1
|
||||
|
||||
哈哈
|
||||
|
||||
```c {3-4}
|
||||
#include<stdio.h>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
123
|
||||
|
||||
# 11
|
||||
|
||||
## 1
|
||||
|
||||
哈哈
|
||||
|
||||
```c {3-4}
|
||||
#include<stdio.h>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
123
|
||||
# 11
|
||||
|
||||
## 1
|
||||
|
||||
哈哈
|
||||
|
||||
```c {3-4}
|
||||
#include<stdio.h>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
123
|
||||
|
||||
# 11
|
||||
|
||||
## 1
|
||||
|
||||
哈哈
|
||||
|
||||
```c {3-4}
|
||||
#include<stdio.h>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
123
|
||||
|
||||
# 11
|
||||
|
||||
## 1
|
||||
|
||||
哈哈
|
||||
|
||||
```c {3-4}
|
||||
#include<stdio.h>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
123
|
||||
|
||||
# 11
|
||||
|
||||
## 1
|
||||
|
||||
哈哈
|
||||
|
||||
```c {3-4}
|
||||
#include<stdio.h>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
123
|
||||
|
||||
# 11
|
||||
|
||||
## 1
|
||||
|
||||
哈哈
|
||||
|
||||
```c {3-4}
|
||||
#include<stdio.h>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
123
|
||||
|
||||
# 11
|
||||
|
||||
## 1
|
||||
|
||||
哈哈
|
||||
|
||||
```c {3-4}
|
||||
#include<stdio.h>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
123
|
||||
|
||||
# 11
|
||||
|
||||
## 1
|
||||
|
||||
哈哈
|
||||
|
||||
```c {3-4}
|
||||
#include<stdio.h>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
123
|
||||
|
||||
@@ -1 +1 @@
|
||||
asas
|
||||
asas
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Code } from "~/utils/types"
|
||||
|
||||
export const code = reactive<Code>({
|
||||
value: "",
|
||||
language: "C",
|
||||
})
|
||||
import { Code } from "~/utils/types"
|
||||
|
||||
export const code = reactive<Code>({
|
||||
value: "",
|
||||
language: "C",
|
||||
})
|
||||
|
||||
@@ -1,12 +1,25 @@
|
||||
<script setup lang="ts">
|
||||
import { ContestRank } from "~/utils/types"
|
||||
import { ContestRank, ProblemFiltered } from "~/utils/types"
|
||||
|
||||
defineProps<{ rank: ContestRank }>()
|
||||
interface Props {
|
||||
rank: ContestRank
|
||||
}
|
||||
const props = defineProps<Props>()
|
||||
const router = useRouter()
|
||||
|
||||
function goto() {
|
||||
router.push({
|
||||
name: "contest submissions",
|
||||
query: { username: props.rank.user.username },
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
{{ rank.accepted_number }} /
|
||||
<n-button text type="primary">{{ rank.submission_number }}</n-button>
|
||||
<n-button text type="primary" @click="goto">
|
||||
{{ rank.submission_number }}
|
||||
</n-button>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
<script setup lang="ts">
|
||||
import { Contest } from "~/utils/types"
|
||||
import { ContestType } from "~/utils/constants"
|
||||
|
||||
defineProps<{ contest: Contest }>()
|
||||
</script>
|
||||
<template>
|
||||
<n-space>
|
||||
<span>{{ contest.title }}</span>
|
||||
<n-icon
|
||||
class="lockIcon"
|
||||
v-if="contest.contest_type === ContestType.private"
|
||||
>
|
||||
<i-ep-lock />
|
||||
</n-icon>
|
||||
</n-space>
|
||||
</template>
|
||||
<style scoped>
|
||||
.lockIcon {
|
||||
transform: translateY(2px);
|
||||
}
|
||||
</style>
|
||||
<script setup lang="ts">
|
||||
import { Contest } from "~/utils/types"
|
||||
import { ContestType } from "~/utils/constants"
|
||||
|
||||
defineProps<{ contest: Contest }>()
|
||||
</script>
|
||||
<template>
|
||||
<n-space>
|
||||
<span>{{ contest.title }}</span>
|
||||
<n-icon
|
||||
class="lockIcon"
|
||||
v-if="contest.contest_type === ContestType.private"
|
||||
>
|
||||
<i-ep-lock />
|
||||
</n-icon>
|
||||
</n-space>
|
||||
</template>
|
||||
<style scoped>
|
||||
.lockIcon {
|
||||
transform: translateY(2px);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
<script setup lang="ts">
|
||||
import { Contest } from "~/utils/types"
|
||||
import { ContestType } from "~/utils/constants"
|
||||
|
||||
interface Props {
|
||||
contest: Contest
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
|
||||
const isPrivate = computed(
|
||||
() => props.contest.contest_type === ContestType.private
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-tag :type="isPrivate ? 'error' : 'default'">
|
||||
{{ isPrivate ? "需要密码" : "公开" }}
|
||||
</n-tag>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { Contest } from "~/utils/types"
|
||||
import { ContestType } from "~/utils/constants"
|
||||
|
||||
interface Props {
|
||||
contest: Contest
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
|
||||
const isPrivate = computed(
|
||||
() => props.contest.contest_type === ContestType.private
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-tag :type="isPrivate ? 'error' : 'default'">
|
||||
{{ isPrivate ? "需要密码" : "公开" }}
|
||||
</n-tag>
|
||||
</template>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { CONTEST_STATUS, ContestType } from "utils/constants"
|
||||
|
||||
import { isDesktop, isMobile } from "~/shared/composables/breakpoints"
|
||||
import { useContestStore } from "../store/contest"
|
||||
import { DropdownOption } from "naive-ui"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<template></template>
|
||||
|
||||
<style scoped></style>
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<template></template>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
<script setup lang="ts">
|
||||
import { DataTableColumn } from "naive-ui"
|
||||
import { ProblemFiltered } from "utils/types"
|
||||
import ProblemStatus from "~/oj/problem/components/ProblemStatus.vue"
|
||||
import { useContestStore } from "~/oj/store/contest"
|
||||
|
||||
const props = defineProps<{ contestID: string }>()
|
||||
|
||||
const router = useRouter()
|
||||
const contestStore = useContestStore()
|
||||
const problemsColumns: DataTableColumn<ProblemFiltered>[] = [
|
||||
{
|
||||
title: "状态",
|
||||
key: "status",
|
||||
width: 60,
|
||||
render: (row) => h(ProblemStatus, { status: row.status }),
|
||||
},
|
||||
{ title: "编号", key: "_id", width: 60 },
|
||||
{ title: "题目", key: "title", minWidth: 200 },
|
||||
{ title: "总提交数", key: "submission", width: 100 },
|
||||
{ title: "通过率", key: "rate", width: 100 },
|
||||
]
|
||||
|
||||
function rowProps(row: ProblemFiltered) {
|
||||
return {
|
||||
style: "cursor: pointer",
|
||||
onClick() {
|
||||
router.push(`/contest/${props.contestID}/problem/${row._id}`)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-data-table
|
||||
striped
|
||||
size="small"
|
||||
class="problems"
|
||||
:data="contestStore.problems"
|
||||
:columns="problemsColumns"
|
||||
:row-props="rowProps"
|
||||
v-if="contestStore.problems?.length"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
<script setup lang="ts">
|
||||
import { DataTableColumn } from "naive-ui"
|
||||
import { ProblemFiltered } from "utils/types"
|
||||
import ProblemStatus from "~/oj/problem/components/ProblemStatus.vue"
|
||||
import { useContestStore } from "~/oj/store/contest"
|
||||
|
||||
const props = defineProps<{ contestID: string }>()
|
||||
|
||||
const router = useRouter()
|
||||
const contestStore = useContestStore()
|
||||
const problemsColumns: DataTableColumn<ProblemFiltered>[] = [
|
||||
{
|
||||
title: "状态",
|
||||
key: "status",
|
||||
width: 60,
|
||||
render: (row) => h(ProblemStatus, { status: row.status }),
|
||||
},
|
||||
{ title: "编号", key: "_id", width: 60 },
|
||||
{ title: "题目", key: "title", minWidth: 200 },
|
||||
{ title: "总提交数", key: "submission", width: 100 },
|
||||
{ title: "通过率", key: "rate", width: 100 },
|
||||
]
|
||||
|
||||
function rowProps(row: ProblemFiltered) {
|
||||
return {
|
||||
style: "cursor: pointer",
|
||||
onClick() {
|
||||
router.push(`/contest/${props.contestID}/problem/${row._id}`)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-data-table
|
||||
striped
|
||||
size="small"
|
||||
class="problems"
|
||||
:data="contestStore.problems"
|
||||
:columns="problemsColumns"
|
||||
:row-props="rowProps"
|
||||
v-if="contestStore.problems?.length"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
@@ -1,171 +1,171 @@
|
||||
<script setup lang="ts">
|
||||
import { DataTableColumn, NButton } from "naive-ui"
|
||||
import Pagination from "~/shared/Pagination.vue"
|
||||
import AcAndSubmission from "../components/AcAndSubmission.vue"
|
||||
import { getContestProblems, getContestRank } from "oj/api"
|
||||
import { ContestRank, ProblemFiltered } from "~/utils/types"
|
||||
import { secondsToDuration } from "utils/functions"
|
||||
|
||||
interface Props {
|
||||
contestID: string
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const total = ref(0)
|
||||
const data = ref<ContestRank[]>([])
|
||||
const chart = ref<ContestRank[]>([])
|
||||
const problems = ref<ProblemFiltered[]>([])
|
||||
|
||||
const query = reactive({
|
||||
limit: 50,
|
||||
page: 1,
|
||||
})
|
||||
|
||||
const columns = ref<DataTableColumn<ContestRank>[]>([
|
||||
{
|
||||
title: "排名",
|
||||
key: "id",
|
||||
width: 60,
|
||||
fixed: "left",
|
||||
align: "center",
|
||||
render: (_, index) => index + (query.page - 1) * query.limit + 1,
|
||||
},
|
||||
{
|
||||
title: "用户",
|
||||
key: "username",
|
||||
width: 120,
|
||||
fixed: "left",
|
||||
align: "center",
|
||||
render: (row) =>
|
||||
h(NButton, { text: true, type: "info" }, () => row.user.username),
|
||||
},
|
||||
{
|
||||
title: "正确数/总提交",
|
||||
key: "submission",
|
||||
width: 120,
|
||||
align: "center",
|
||||
render: (row) => h(AcAndSubmission, { rank: row }),
|
||||
},
|
||||
{
|
||||
title: "总时间",
|
||||
key: "total_time",
|
||||
width: 120,
|
||||
align: "center",
|
||||
render: (row) => secondsToDuration(row.total_time),
|
||||
},
|
||||
])
|
||||
|
||||
async function listRanks() {
|
||||
const res = await getContestRank(props.contestID, {
|
||||
limit: query.limit,
|
||||
offset: query.limit * (query.page - 1),
|
||||
})
|
||||
total.value = res.data.total
|
||||
data.value = res.data.results
|
||||
if (query.page === 1) {
|
||||
chart.value = data.value
|
||||
}
|
||||
}
|
||||
|
||||
async function addColumns() {
|
||||
try {
|
||||
problems.value = await getContestProblems(props.contestID)
|
||||
problems.value.map((problem, index) => {
|
||||
columns.value.push({
|
||||
align: "center",
|
||||
title: () =>
|
||||
h(
|
||||
NButton,
|
||||
{
|
||||
text: true,
|
||||
type: "primary",
|
||||
onClick: () =>
|
||||
router.push({
|
||||
name: "contest problem",
|
||||
params: {
|
||||
contestID: route.params.contestID,
|
||||
problemID: problem._id,
|
||||
},
|
||||
}),
|
||||
},
|
||||
() => `${index + 1}`
|
||||
),
|
||||
render: (row) => {
|
||||
if (row.submission_info[problem.id]) {
|
||||
const status = row.submission_info[problem.id]
|
||||
let acTime
|
||||
let errorNumber
|
||||
if (status.is_ac) {
|
||||
acTime = h("span", secondsToDuration(status.ac_time))
|
||||
}
|
||||
if (status.error_number) {
|
||||
errorNumber = h(
|
||||
"p",
|
||||
{ style: "margin: 0" },
|
||||
`(-${status.error_number})`
|
||||
)
|
||||
}
|
||||
return h("div", [acTime, errorNumber])
|
||||
}
|
||||
},
|
||||
cellProps: (row) => {
|
||||
let backgroundColor = ""
|
||||
let color = ""
|
||||
if (row.submission_info[problem.id]) {
|
||||
const status = row.submission_info[problem.id]
|
||||
if (status.is_first_ac) {
|
||||
backgroundColor = "#3c9"
|
||||
color = "#3c763d"
|
||||
} else if (status.is_ac) {
|
||||
backgroundColor = "#dff0d8"
|
||||
} else {
|
||||
backgroundColor = "#f2dede"
|
||||
color = "#a94442"
|
||||
}
|
||||
}
|
||||
return { style: { backgroundColor, color } }
|
||||
},
|
||||
key: problem.id,
|
||||
width: 150,
|
||||
})
|
||||
})
|
||||
} catch (err) {
|
||||
problems.value = []
|
||||
}
|
||||
}
|
||||
|
||||
watch(() => query.page, listRanks)
|
||||
watch(
|
||||
() => query.limit,
|
||||
() => {
|
||||
query.page = 1
|
||||
listRanks()
|
||||
}
|
||||
)
|
||||
|
||||
onMounted(() => {
|
||||
listRanks()
|
||||
addColumns()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-data-table
|
||||
striped
|
||||
:single-line="false"
|
||||
:scroll-x="1200"
|
||||
size="small"
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
/>
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="query.page"
|
||||
v-model:limit="query.limit"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
<script setup lang="ts">
|
||||
import { DataTableColumn, NButton } from "naive-ui"
|
||||
import Pagination from "~/shared/Pagination.vue"
|
||||
import AcAndSubmission from "../components/AcAndSubmission.vue"
|
||||
import { getContestProblems, getContestRank } from "oj/api"
|
||||
import { ContestRank, ProblemFiltered } from "~/utils/types"
|
||||
import { secondsToDuration } from "utils/functions"
|
||||
|
||||
interface Props {
|
||||
contestID: string
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const total = ref(0)
|
||||
const data = ref<ContestRank[]>([])
|
||||
const chart = ref<ContestRank[]>([])
|
||||
const problems = ref<ProblemFiltered[]>([])
|
||||
|
||||
const query = reactive({
|
||||
limit: 50,
|
||||
page: 1,
|
||||
})
|
||||
|
||||
const columns = ref<DataTableColumn<ContestRank>[]>([
|
||||
{
|
||||
title: "排名",
|
||||
key: "id",
|
||||
width: 60,
|
||||
fixed: "left",
|
||||
align: "center",
|
||||
render: (_, index) => index + (query.page - 1) * query.limit + 1,
|
||||
},
|
||||
{
|
||||
title: "用户",
|
||||
key: "username",
|
||||
width: 120,
|
||||
fixed: "left",
|
||||
align: "center",
|
||||
render: (row) =>
|
||||
h(NButton, { text: true, type: "info" }, () => row.user.username),
|
||||
},
|
||||
{
|
||||
title: "正确数/总提交",
|
||||
key: "submission",
|
||||
width: 120,
|
||||
align: "center",
|
||||
render: (row) => h(AcAndSubmission, { rank: row }),
|
||||
},
|
||||
{
|
||||
title: "总时间",
|
||||
key: "total_time",
|
||||
width: 120,
|
||||
align: "center",
|
||||
render: (row) => secondsToDuration(row.total_time),
|
||||
},
|
||||
])
|
||||
|
||||
async function listRanks() {
|
||||
const res = await getContestRank(props.contestID, {
|
||||
limit: query.limit,
|
||||
offset: query.limit * (query.page - 1),
|
||||
})
|
||||
total.value = res.data.total
|
||||
data.value = res.data.results
|
||||
if (query.page === 1) {
|
||||
chart.value = data.value
|
||||
}
|
||||
}
|
||||
|
||||
async function addColumns() {
|
||||
try {
|
||||
problems.value = await getContestProblems(props.contestID)
|
||||
problems.value.map((problem, index) => {
|
||||
columns.value.push({
|
||||
align: "center",
|
||||
title: () =>
|
||||
h(
|
||||
NButton,
|
||||
{
|
||||
text: true,
|
||||
type: "primary",
|
||||
onClick: () =>
|
||||
router.push({
|
||||
name: "contest problem",
|
||||
params: {
|
||||
contestID: route.params.contestID,
|
||||
problemID: problem._id,
|
||||
},
|
||||
}),
|
||||
},
|
||||
() => `${index + 1}`
|
||||
),
|
||||
render: (row) => {
|
||||
if (row.submission_info[problem.id]) {
|
||||
const status = row.submission_info[problem.id]
|
||||
let acTime
|
||||
let errorNumber
|
||||
if (status.is_ac) {
|
||||
acTime = h("span", secondsToDuration(status.ac_time))
|
||||
}
|
||||
if (status.error_number) {
|
||||
errorNumber = h(
|
||||
"p",
|
||||
{ style: "margin: 0" },
|
||||
`(-${status.error_number})`
|
||||
)
|
||||
}
|
||||
return h("div", [acTime, errorNumber])
|
||||
}
|
||||
},
|
||||
cellProps: (row) => {
|
||||
let backgroundColor = ""
|
||||
let color = ""
|
||||
if (row.submission_info[problem.id]) {
|
||||
const status = row.submission_info[problem.id]
|
||||
if (status.is_first_ac) {
|
||||
backgroundColor = "#3c9"
|
||||
color = "#3c763d"
|
||||
} else if (status.is_ac) {
|
||||
backgroundColor = "#dff0d8"
|
||||
} else {
|
||||
backgroundColor = "#f2dede"
|
||||
color = "#a94442"
|
||||
}
|
||||
}
|
||||
return { style: { backgroundColor, color } }
|
||||
},
|
||||
key: problem.id,
|
||||
width: 150,
|
||||
})
|
||||
})
|
||||
} catch (err) {
|
||||
problems.value = []
|
||||
}
|
||||
}
|
||||
|
||||
watch(() => query.page, listRanks)
|
||||
watch(
|
||||
() => query.limit,
|
||||
() => {
|
||||
query.page = 1
|
||||
listRanks()
|
||||
}
|
||||
)
|
||||
|
||||
onMounted(() => {
|
||||
listRanks()
|
||||
addColumns()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-data-table
|
||||
striped
|
||||
:single-line="false"
|
||||
:scroll-x="1200"
|
||||
size="small"
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
/>
|
||||
<Pagination
|
||||
:total="total"
|
||||
v-model:page="query.page"
|
||||
v-model:limit="query.limit"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
<script setup lang="ts">
|
||||
import { Select, SemiSelect } from "@element-plus/icons-vue"
|
||||
import { useThemeVars } from "naive-ui"
|
||||
|
||||
const theme = useThemeVars()
|
||||
const props = defineProps<{
|
||||
status: "not_test" | "passed" | "failed"
|
||||
}>()
|
||||
|
||||
const showIcon = computed(() => props.status !== "not_test")
|
||||
const color = computed(() => {
|
||||
if (props.status === "passed") return theme.value.successColor
|
||||
if (props.status === "failed") return theme.value.errorColor
|
||||
})
|
||||
|
||||
const Icon = computed(() => {
|
||||
if (props.status === "passed") return Select
|
||||
if (props.status === "failed") return SemiSelect
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-icon v-if="showIcon" :color="color">
|
||||
<component :is="Icon"></component>
|
||||
</n-icon>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
<script setup lang="ts">
|
||||
import { Select, SemiSelect } from "@element-plus/icons-vue"
|
||||
import { useThemeVars } from "naive-ui"
|
||||
|
||||
const theme = useThemeVars()
|
||||
const props = defineProps<{
|
||||
status: "not_test" | "passed" | "failed"
|
||||
}>()
|
||||
|
||||
const showIcon = computed(() => props.status !== "not_test")
|
||||
const color = computed(() => {
|
||||
if (props.status === "passed") return theme.value.successColor
|
||||
if (props.status === "failed") return theme.value.errorColor
|
||||
})
|
||||
|
||||
const Icon = computed(() => {
|
||||
if (props.status === "passed") return Select
|
||||
if (props.status === "failed") return SemiSelect
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-icon v-if="showIcon" :color="color">
|
||||
<component :is="Icon"></component>
|
||||
</n-icon>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
@@ -1,233 +1,233 @@
|
||||
<script setup lang="ts">
|
||||
import { code } from "oj/composables/code"
|
||||
import party from "party-js"
|
||||
import { Ref } from "vue"
|
||||
import { SOURCES, JUDGE_STATUS, SubmissionStatus } from "utils/constants"
|
||||
import { submissionMemoryFormat, submissionTimeFormat } from "utils/functions"
|
||||
import { Problem, Submission, SubmitCodePayload } from "utils/types"
|
||||
import { getSubmission, submitCode } from "oj/api"
|
||||
import SubmissionResultTag from "~/shared/SubmissionResultTag.vue"
|
||||
import type { DataTableColumn } from "naive-ui"
|
||||
|
||||
const problem = inject<Ref<Problem>>("problem")
|
||||
|
||||
const route = useRoute()
|
||||
const contestID = <string>route.params.contestID ?? ""
|
||||
|
||||
const submissionId = ref("")
|
||||
const submission = ref<Submission>()
|
||||
const [submitted] = useToggle()
|
||||
|
||||
const { start: submitPending, isPending } = useTimeout(5000, {
|
||||
controls: true,
|
||||
immediate: false,
|
||||
})
|
||||
|
||||
const { start: fetchSubmission } = useTimeoutFn(
|
||||
async () => {
|
||||
const res = await getSubmission(submissionId.value)
|
||||
submission.value = res.data
|
||||
const result = submission.value.result
|
||||
if (
|
||||
result === SubmissionStatus.judging ||
|
||||
result === SubmissionStatus.pending
|
||||
) {
|
||||
fetchSubmission()
|
||||
} else {
|
||||
submitted.value = false
|
||||
}
|
||||
},
|
||||
2000,
|
||||
{ immediate: false }
|
||||
)
|
||||
|
||||
const judging = computed(
|
||||
() =>
|
||||
!!(submission.value && submission.value.result === SubmissionStatus.judging)
|
||||
)
|
||||
|
||||
const pending = computed(
|
||||
() =>
|
||||
!!(submission.value && submission.value.result === SubmissionStatus.pending)
|
||||
)
|
||||
|
||||
const submitting = computed(
|
||||
() =>
|
||||
!!(
|
||||
submission.value &&
|
||||
submission.value.result === SubmissionStatus.submitting
|
||||
)
|
||||
)
|
||||
|
||||
const submitDisabled = computed(() => {
|
||||
const value = code.value
|
||||
if (
|
||||
value.trim() === "" ||
|
||||
value === problem!.value.template[code.language] ||
|
||||
value === SOURCES[code.language]
|
||||
) {
|
||||
return true
|
||||
}
|
||||
if (judging.value || pending.value || submitting.value) {
|
||||
return true
|
||||
}
|
||||
if (submitted.value) {
|
||||
return true
|
||||
}
|
||||
if (isPending.value) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
const submitLabel = computed(() => {
|
||||
if (submitting.value) {
|
||||
return "正在提交"
|
||||
}
|
||||
if (judging.value || pending.value) {
|
||||
return "正在评分"
|
||||
}
|
||||
if (isPending.value) {
|
||||
return "运行结果"
|
||||
}
|
||||
return "点击提交"
|
||||
})
|
||||
|
||||
const msg = computed(() => {
|
||||
let msg = ""
|
||||
const result = submission.value && submission.value.result
|
||||
if (
|
||||
result === SubmissionStatus.compile_error ||
|
||||
result === SubmissionStatus.runtime_error
|
||||
) {
|
||||
msg += "请仔细检查,看看代码的格式是不是写错了!\n\n"
|
||||
}
|
||||
if (
|
||||
submission.value &&
|
||||
submission.value.statistic_info &&
|
||||
submission.value.statistic_info.err_info
|
||||
) {
|
||||
msg += submission.value.statistic_info.err_info
|
||||
}
|
||||
return msg
|
||||
})
|
||||
|
||||
const infoTable = computed(() => {
|
||||
if (
|
||||
submission.value &&
|
||||
submission.value.result !== SubmissionStatus.accepted &&
|
||||
submission.value.result !== SubmissionStatus.compile_error &&
|
||||
submission.value.result !== SubmissionStatus.runtime_error &&
|
||||
submission.value.info &&
|
||||
submission.value.info.data &&
|
||||
submission.value.info.data.length
|
||||
) {
|
||||
const data = submission.value.info.data
|
||||
if (data.some((item) => item.result === 0)) {
|
||||
return submission.value.info.data
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
})
|
||||
|
||||
const columns: DataTableColumn<Submission["info"]["data"][number]>[] = [
|
||||
{ title: "测试用例", key: "test_case" },
|
||||
{
|
||||
title: "测试状态",
|
||||
key: "result",
|
||||
render: (row) => h(SubmissionResultTag, { result: row.result }),
|
||||
},
|
||||
{
|
||||
title: "占用内存",
|
||||
key: "memory",
|
||||
render: (row) => submissionMemoryFormat(row.memory),
|
||||
},
|
||||
{
|
||||
title: "执行耗时",
|
||||
key: "real_time",
|
||||
render: (row) => submissionTimeFormat(row.real_time),
|
||||
},
|
||||
{ title: "信号", key: "signal" },
|
||||
]
|
||||
|
||||
async function submit() {
|
||||
const data: SubmitCodePayload = {
|
||||
problem_id: problem!.value.id,
|
||||
language: code.language,
|
||||
code: code.value,
|
||||
}
|
||||
if (contestID) {
|
||||
data.contest_id = parseInt(contestID)
|
||||
}
|
||||
submission.value = { result: 9 } as Submission
|
||||
const res = await submitCode(data)
|
||||
submissionId.value = res.data.submission_id
|
||||
// 防止重复提交
|
||||
submitPending()
|
||||
submitted.value = true
|
||||
// 查询结果
|
||||
fetchSubmission()
|
||||
}
|
||||
|
||||
watch(
|
||||
() => submission?.value?.result,
|
||||
(result) => {
|
||||
if (result === SubmissionStatus.accepted) {
|
||||
party.confetti(document.body, {
|
||||
count: party.variation.range(200, 400),
|
||||
size: party.variation.skew(2, 0.3),
|
||||
})
|
||||
}
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-popover
|
||||
trigger="click"
|
||||
placement="bottom-end"
|
||||
scrollable
|
||||
:show-arrow="false"
|
||||
style="max-height: 600px"
|
||||
>
|
||||
<template #trigger>
|
||||
<n-button type="primary" :disabled="submitDisabled" @click="submit">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<i-ep-loading v-if="judging || pending || submitting" />
|
||||
<i-ep-bell v-else-if="isPending" />
|
||||
<i-ep-caret-right v-else />
|
||||
</n-icon>
|
||||
</template>
|
||||
{{ submitLabel }}
|
||||
</n-button>
|
||||
</template>
|
||||
<template #header>
|
||||
<n-alert
|
||||
v-if="submission"
|
||||
:type="JUDGE_STATUS[submission.result]['type']"
|
||||
:title="JUDGE_STATUS[submission.result]['name']"
|
||||
/>
|
||||
</template>
|
||||
<n-space vertical v-if="msg || infoTable.length">
|
||||
<n-card v-if="msg" embedded class="msg">{{ msg }}</n-card>
|
||||
<n-data-table
|
||||
v-if="infoTable.length"
|
||||
size="small"
|
||||
striped
|
||||
:data="infoTable"
|
||||
:columns="columns"
|
||||
/>
|
||||
</n-space>
|
||||
</n-popover>
|
||||
</template>
|
||||
<style scoped>
|
||||
.msg {
|
||||
white-space: pre;
|
||||
word-break: break-all;
|
||||
line-height: 1.5;
|
||||
}
|
||||
</style>
|
||||
<script setup lang="ts">
|
||||
import { code } from "oj/composables/code"
|
||||
import party from "party-js"
|
||||
import { Ref } from "vue"
|
||||
import { SOURCES, JUDGE_STATUS, SubmissionStatus } from "utils/constants"
|
||||
import { submissionMemoryFormat, submissionTimeFormat } from "utils/functions"
|
||||
import { Problem, Submission, SubmitCodePayload } from "utils/types"
|
||||
import { getSubmission, submitCode } from "oj/api"
|
||||
import SubmissionResultTag from "~/shared/SubmissionResultTag.vue"
|
||||
import type { DataTableColumn } from "naive-ui"
|
||||
|
||||
const problem = inject<Ref<Problem>>("problem")
|
||||
|
||||
const route = useRoute()
|
||||
const contestID = <string>route.params.contestID ?? ""
|
||||
|
||||
const submissionId = ref("")
|
||||
const submission = ref<Submission>()
|
||||
const [submitted] = useToggle()
|
||||
|
||||
const { start: submitPending, isPending } = useTimeout(5000, {
|
||||
controls: true,
|
||||
immediate: false,
|
||||
})
|
||||
|
||||
const { start: fetchSubmission } = useTimeoutFn(
|
||||
async () => {
|
||||
const res = await getSubmission(submissionId.value)
|
||||
submission.value = res.data
|
||||
const result = submission.value.result
|
||||
if (
|
||||
result === SubmissionStatus.judging ||
|
||||
result === SubmissionStatus.pending
|
||||
) {
|
||||
fetchSubmission()
|
||||
} else {
|
||||
submitted.value = false
|
||||
}
|
||||
},
|
||||
2000,
|
||||
{ immediate: false }
|
||||
)
|
||||
|
||||
const judging = computed(
|
||||
() =>
|
||||
!!(submission.value && submission.value.result === SubmissionStatus.judging)
|
||||
)
|
||||
|
||||
const pending = computed(
|
||||
() =>
|
||||
!!(submission.value && submission.value.result === SubmissionStatus.pending)
|
||||
)
|
||||
|
||||
const submitting = computed(
|
||||
() =>
|
||||
!!(
|
||||
submission.value &&
|
||||
submission.value.result === SubmissionStatus.submitting
|
||||
)
|
||||
)
|
||||
|
||||
const submitDisabled = computed(() => {
|
||||
const value = code.value
|
||||
if (
|
||||
value.trim() === "" ||
|
||||
value === problem!.value.template[code.language] ||
|
||||
value === SOURCES[code.language]
|
||||
) {
|
||||
return true
|
||||
}
|
||||
if (judging.value || pending.value || submitting.value) {
|
||||
return true
|
||||
}
|
||||
if (submitted.value) {
|
||||
return true
|
||||
}
|
||||
if (isPending.value) {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
const submitLabel = computed(() => {
|
||||
if (submitting.value) {
|
||||
return "正在提交"
|
||||
}
|
||||
if (judging.value || pending.value) {
|
||||
return "正在评分"
|
||||
}
|
||||
if (isPending.value) {
|
||||
return "运行结果"
|
||||
}
|
||||
return "点击提交"
|
||||
})
|
||||
|
||||
const msg = computed(() => {
|
||||
let msg = ""
|
||||
const result = submission.value && submission.value.result
|
||||
if (
|
||||
result === SubmissionStatus.compile_error ||
|
||||
result === SubmissionStatus.runtime_error
|
||||
) {
|
||||
msg += "请仔细检查,看看代码的格式是不是写错了!\n\n"
|
||||
}
|
||||
if (
|
||||
submission.value &&
|
||||
submission.value.statistic_info &&
|
||||
submission.value.statistic_info.err_info
|
||||
) {
|
||||
msg += submission.value.statistic_info.err_info
|
||||
}
|
||||
return msg
|
||||
})
|
||||
|
||||
const infoTable = computed(() => {
|
||||
if (
|
||||
submission.value &&
|
||||
submission.value.result !== SubmissionStatus.accepted &&
|
||||
submission.value.result !== SubmissionStatus.compile_error &&
|
||||
submission.value.result !== SubmissionStatus.runtime_error &&
|
||||
submission.value.info &&
|
||||
submission.value.info.data &&
|
||||
submission.value.info.data.length
|
||||
) {
|
||||
const data = submission.value.info.data
|
||||
if (data.some((item) => item.result === 0)) {
|
||||
return submission.value.info.data
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
} else {
|
||||
return []
|
||||
}
|
||||
})
|
||||
|
||||
const columns: DataTableColumn<Submission["info"]["data"][number]>[] = [
|
||||
{ title: "测试用例", key: "test_case" },
|
||||
{
|
||||
title: "测试状态",
|
||||
key: "result",
|
||||
render: (row) => h(SubmissionResultTag, { result: row.result }),
|
||||
},
|
||||
{
|
||||
title: "占用内存",
|
||||
key: "memory",
|
||||
render: (row) => submissionMemoryFormat(row.memory),
|
||||
},
|
||||
{
|
||||
title: "执行耗时",
|
||||
key: "real_time",
|
||||
render: (row) => submissionTimeFormat(row.real_time),
|
||||
},
|
||||
{ title: "信号", key: "signal" },
|
||||
]
|
||||
|
||||
async function submit() {
|
||||
const data: SubmitCodePayload = {
|
||||
problem_id: problem!.value.id,
|
||||
language: code.language,
|
||||
code: code.value,
|
||||
}
|
||||
if (contestID) {
|
||||
data.contest_id = parseInt(contestID)
|
||||
}
|
||||
submission.value = { result: 9 } as Submission
|
||||
const res = await submitCode(data)
|
||||
submissionId.value = res.data.submission_id
|
||||
// 防止重复提交
|
||||
submitPending()
|
||||
submitted.value = true
|
||||
// 查询结果
|
||||
fetchSubmission()
|
||||
}
|
||||
|
||||
watch(
|
||||
() => submission?.value?.result,
|
||||
(result) => {
|
||||
if (result === SubmissionStatus.accepted) {
|
||||
party.confetti(document.body, {
|
||||
count: party.variation.range(200, 400),
|
||||
size: party.variation.skew(2, 0.3),
|
||||
})
|
||||
}
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<n-popover
|
||||
trigger="click"
|
||||
placement="bottom-end"
|
||||
scrollable
|
||||
:show-arrow="false"
|
||||
style="max-height: 600px"
|
||||
>
|
||||
<template #trigger>
|
||||
<n-button type="primary" :disabled="submitDisabled" @click="submit">
|
||||
<template #icon>
|
||||
<n-icon>
|
||||
<i-ep-loading v-if="judging || pending || submitting" />
|
||||
<i-ep-bell v-else-if="isPending" />
|
||||
<i-ep-caret-right v-else />
|
||||
</n-icon>
|
||||
</template>
|
||||
{{ submitLabel }}
|
||||
</n-button>
|
||||
</template>
|
||||
<template #header>
|
||||
<n-alert
|
||||
v-if="submission"
|
||||
:type="JUDGE_STATUS[submission.result]['type']"
|
||||
:title="JUDGE_STATUS[submission.result]['name']"
|
||||
/>
|
||||
</template>
|
||||
<n-space vertical v-if="msg || infoTable.length">
|
||||
<n-card v-if="msg" embedded class="msg">{{ msg }}</n-card>
|
||||
<n-data-table
|
||||
v-if="infoTable.length"
|
||||
size="small"
|
||||
striped
|
||||
:data="infoTable"
|
||||
:columns="columns"
|
||||
/>
|
||||
</n-space>
|
||||
</n-popover>
|
||||
</template>
|
||||
<style scoped>
|
||||
.msg {
|
||||
white-space: pre;
|
||||
word-break: break-all;
|
||||
line-height: 1.5;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -170,7 +170,12 @@ function rowProps(row: ProblemFiltered) {
|
||||
/>
|
||||
</n-form-item>
|
||||
<n-form-item label="搜索">
|
||||
<n-input placeholder="输入编号或标题后回车" clearable @change="search" />
|
||||
<n-input
|
||||
placeholder="输入编号或标题后回车"
|
||||
clearable
|
||||
v-model:value="query.keyword"
|
||||
@change="search"
|
||||
/>
|
||||
</n-form-item>
|
||||
<n-form-item>
|
||||
<n-space>
|
||||
|
||||
@@ -1,88 +1,88 @@
|
||||
<script setup lang="ts">
|
||||
import { Bar } from "vue-chartjs"
|
||||
import { Rank } from "~/utils/types"
|
||||
|
||||
const props = defineProps<{ rankData: Rank[] }>()
|
||||
|
||||
const data = computed(() => ({
|
||||
labels: props.rankData.map((rank) => rank.user.username),
|
||||
datasets: [
|
||||
{
|
||||
label: "已解决",
|
||||
data: props.rankData.map((rank) => rank.accepted_number),
|
||||
backgroundColor: [
|
||||
"rgba(255, 99, 132, 0.2)",
|
||||
"rgba(255, 159, 64, 0.2)",
|
||||
"rgba(55, 66, 250, 0.2)",
|
||||
"rgba(75, 192, 192, 0.2)",
|
||||
"rgba(54, 162, 235, 0.2)",
|
||||
"rgba(153, 102, 255, 0.2)",
|
||||
"rgba(48, 51, 107, 0.2)",
|
||||
"rgba(249, 202, 36, 0.2)",
|
||||
"rgba(106, 176, 76, 0.2)",
|
||||
"rgba(119, 139, 235, 0.2)",
|
||||
],
|
||||
borderColor: [
|
||||
"rgba(255, 99, 132, 0.6)",
|
||||
"rgba(255, 159, 64, 0.6)",
|
||||
"rgba(55, 66, 250, 0.6)",
|
||||
"rgba(75, 192, 192, 0.6)",
|
||||
"rgba(54, 162, 235, 0.6)",
|
||||
"rgba(153, 102, 255, 0.6)",
|
||||
"rgba(48, 51, 107, 0.6)",
|
||||
"rgba(249, 202, 36, 0.6)",
|
||||
"rgba(106, 176, 76, 0.6)",
|
||||
"rgba(119, 139, 235, 0.6)",
|
||||
],
|
||||
hoverBackgroundColor: [
|
||||
"rgba(255, 99, 132, 0.8)",
|
||||
"rgba(255, 159, 64, 0.8)",
|
||||
"rgba(55, 66, 250, 0.8)",
|
||||
"rgba(75, 192, 192, 0.8)",
|
||||
"rgba(54, 162, 235, 0.8)",
|
||||
"rgba(153, 102, 255, 0.8)",
|
||||
"rgba(48, 51, 107, 0.8)",
|
||||
"rgba(249, 202, 36, 0.8)",
|
||||
"rgba(106, 176, 76, 0.8)",
|
||||
"rgba(119, 139, 235, 0.8)",
|
||||
],
|
||||
hoverBorderColor: [
|
||||
"rgba(255, 99, 132, 1)",
|
||||
"rgba(255, 159, 64, 1)",
|
||||
"rgba(55, 66, 250, 1)",
|
||||
"rgba(75, 192, 192, 1)",
|
||||
"rgba(54, 162, 235, 1)",
|
||||
"rgba(153, 102, 255, 1)",
|
||||
"rgba(48, 51, 107, 1)",
|
||||
"rgba(249, 202, 36, 1)",
|
||||
"rgba(106, 176, 76, 1)",
|
||||
"rgba(119, 139, 235, 1)",
|
||||
],
|
||||
borderWidth: 2,
|
||||
},
|
||||
{
|
||||
label: "总提交数",
|
||||
data: props.rankData.map((rank) => rank.submission_number),
|
||||
hidden: true,
|
||||
},
|
||||
],
|
||||
}))
|
||||
|
||||
const options = ref({
|
||||
plugins: {
|
||||
title: {
|
||||
text: "全校前十名的用户(不包括超管)",
|
||||
display: true,
|
||||
font: { size: 20 },
|
||||
},
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<template>
|
||||
<Bar class="chart" :data="data" :options="options" />
|
||||
</template>
|
||||
<style scoped>
|
||||
.chart {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
</style>
|
||||
<script setup lang="ts">
|
||||
import { Bar } from "vue-chartjs"
|
||||
import { Rank } from "~/utils/types"
|
||||
|
||||
const props = defineProps<{ rankData: Rank[] }>()
|
||||
|
||||
const data = computed(() => ({
|
||||
labels: props.rankData.map((rank) => rank.user.username),
|
||||
datasets: [
|
||||
{
|
||||
label: "已解决",
|
||||
data: props.rankData.map((rank) => rank.accepted_number),
|
||||
backgroundColor: [
|
||||
"rgba(255, 99, 132, 0.2)",
|
||||
"rgba(255, 159, 64, 0.2)",
|
||||
"rgba(55, 66, 250, 0.2)",
|
||||
"rgba(75, 192, 192, 0.2)",
|
||||
"rgba(54, 162, 235, 0.2)",
|
||||
"rgba(153, 102, 255, 0.2)",
|
||||
"rgba(48, 51, 107, 0.2)",
|
||||
"rgba(249, 202, 36, 0.2)",
|
||||
"rgba(106, 176, 76, 0.2)",
|
||||
"rgba(119, 139, 235, 0.2)",
|
||||
],
|
||||
borderColor: [
|
||||
"rgba(255, 99, 132, 0.6)",
|
||||
"rgba(255, 159, 64, 0.6)",
|
||||
"rgba(55, 66, 250, 0.6)",
|
||||
"rgba(75, 192, 192, 0.6)",
|
||||
"rgba(54, 162, 235, 0.6)",
|
||||
"rgba(153, 102, 255, 0.6)",
|
||||
"rgba(48, 51, 107, 0.6)",
|
||||
"rgba(249, 202, 36, 0.6)",
|
||||
"rgba(106, 176, 76, 0.6)",
|
||||
"rgba(119, 139, 235, 0.6)",
|
||||
],
|
||||
hoverBackgroundColor: [
|
||||
"rgba(255, 99, 132, 0.8)",
|
||||
"rgba(255, 159, 64, 0.8)",
|
||||
"rgba(55, 66, 250, 0.8)",
|
||||
"rgba(75, 192, 192, 0.8)",
|
||||
"rgba(54, 162, 235, 0.8)",
|
||||
"rgba(153, 102, 255, 0.8)",
|
||||
"rgba(48, 51, 107, 0.8)",
|
||||
"rgba(249, 202, 36, 0.8)",
|
||||
"rgba(106, 176, 76, 0.8)",
|
||||
"rgba(119, 139, 235, 0.8)",
|
||||
],
|
||||
hoverBorderColor: [
|
||||
"rgba(255, 99, 132, 1)",
|
||||
"rgba(255, 159, 64, 1)",
|
||||
"rgba(55, 66, 250, 1)",
|
||||
"rgba(75, 192, 192, 1)",
|
||||
"rgba(54, 162, 235, 1)",
|
||||
"rgba(153, 102, 255, 1)",
|
||||
"rgba(48, 51, 107, 1)",
|
||||
"rgba(249, 202, 36, 1)",
|
||||
"rgba(106, 176, 76, 1)",
|
||||
"rgba(119, 139, 235, 1)",
|
||||
],
|
||||
borderWidth: 2,
|
||||
},
|
||||
{
|
||||
label: "总提交数",
|
||||
data: props.rankData.map((rank) => rank.submission_number),
|
||||
hidden: true,
|
||||
},
|
||||
],
|
||||
}))
|
||||
|
||||
const options = ref({
|
||||
plugins: {
|
||||
title: {
|
||||
text: "全校前十名的用户(不包括超管)",
|
||||
display: true,
|
||||
font: { size: 20 },
|
||||
},
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<template>
|
||||
<Bar class="chart" :data="data" :options="options" />
|
||||
</template>
|
||||
<style scoped>
|
||||
.chart {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,70 +1,75 @@
|
||||
import { useUserStore } from "~/shared/store/user"
|
||||
import { ContestType } from "~/utils/constants"
|
||||
import { Contest, Problem } from "~/utils/types"
|
||||
import {
|
||||
getContest,
|
||||
getContestAccess,
|
||||
getContestProblems,
|
||||
checkContestPassword,
|
||||
} from "../api"
|
||||
|
||||
export const useContestStore = defineStore("contest", () => {
|
||||
const userStore = useUserStore()
|
||||
const contest = ref<Contest>()
|
||||
const [access, toggleAccsess] = useToggle()
|
||||
const problems = ref<Problem[]>([])
|
||||
const message = useMessage()
|
||||
|
||||
const contestStatus = computed(() => {
|
||||
return false
|
||||
})
|
||||
|
||||
const isContestAdmin = computed(
|
||||
() =>
|
||||
userStore.isSuperAdmin ||
|
||||
(userStore.isAuthed && contest.value?.created_by.id === userStore.user.id)
|
||||
)
|
||||
|
||||
async function init(contestID: string) {
|
||||
const res = await getContest(contestID)
|
||||
contest.value = res.data
|
||||
if (contest.value?.contest_type === ContestType.private) {
|
||||
const res = await getContestAccess(contestID)
|
||||
toggleAccsess(res.data.access)
|
||||
}
|
||||
_getProblems(contestID)
|
||||
}
|
||||
|
||||
async function checkPassword(contestID: string, password: string) {
|
||||
try {
|
||||
const res = await checkContestPassword(contestID, password)
|
||||
toggleAccsess(res.data)
|
||||
if (res.data) {
|
||||
_getProblems(contestID)
|
||||
}
|
||||
} catch (err) {
|
||||
toggleAccsess(false)
|
||||
message.error("密码错误")
|
||||
}
|
||||
}
|
||||
|
||||
async function _getProblems(contestID: string) {
|
||||
problems.value = []
|
||||
try {
|
||||
problems.value = await getContestProblems(contestID)
|
||||
} catch (err) {
|
||||
problems.value = []
|
||||
toggleAccsess(false)
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
contest,
|
||||
contestStatus,
|
||||
isContestAdmin,
|
||||
access,
|
||||
problems,
|
||||
init,
|
||||
checkPassword,
|
||||
}
|
||||
})
|
||||
import { useUserStore } from "~/shared/store/user"
|
||||
import { ContestType } from "~/utils/constants"
|
||||
import { Contest, Problem } from "~/utils/types"
|
||||
import {
|
||||
getContest,
|
||||
getContestAccess,
|
||||
getContestProblems,
|
||||
checkContestPassword,
|
||||
} from "../api"
|
||||
|
||||
export const useContestStore = defineStore("contest", () => {
|
||||
const userStore = useUserStore()
|
||||
const message = useMessage()
|
||||
const [access, toggleAccess] = useToggle()
|
||||
const contest = ref<Contest>()
|
||||
const problems = ref<Problem[]>([])
|
||||
|
||||
const contestStatus = computed(() => {
|
||||
return false
|
||||
})
|
||||
|
||||
const isContestAdmin = computed(
|
||||
() =>
|
||||
userStore.isSuperAdmin ||
|
||||
(userStore.isAuthed && contest.value?.created_by.id === userStore.user.id)
|
||||
)
|
||||
|
||||
const isPrivate = computed(
|
||||
() => contest.value?.contest_type === ContestType.private
|
||||
)
|
||||
|
||||
async function init(contestID: string) {
|
||||
const res = await getContest(contestID)
|
||||
contest.value = res.data
|
||||
if (contest.value?.contest_type === ContestType.private) {
|
||||
const res = await getContestAccess(contestID)
|
||||
toggleAccess(res.data.access)
|
||||
}
|
||||
_getProblems(contestID)
|
||||
}
|
||||
|
||||
async function checkPassword(contestID: string, password: string) {
|
||||
try {
|
||||
const res = await checkContestPassword(contestID, password)
|
||||
toggleAccess(res.data)
|
||||
if (res.data) {
|
||||
_getProblems(contestID)
|
||||
}
|
||||
} catch (err) {
|
||||
toggleAccess(false)
|
||||
message.error("密码错误")
|
||||
}
|
||||
}
|
||||
|
||||
async function _getProblems(contestID: string) {
|
||||
problems.value = []
|
||||
try {
|
||||
problems.value = await getContestProblems(contestID)
|
||||
} catch (err) {
|
||||
problems.value = []
|
||||
toggleAccess(false)
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
contest,
|
||||
contestStatus,
|
||||
isContestAdmin,
|
||||
access,
|
||||
problems,
|
||||
isPrivate,
|
||||
init,
|
||||
checkPassword,
|
||||
}
|
||||
})
|
||||
|
||||
@@ -150,7 +150,7 @@ const columns = computed(() => {
|
||||
{
|
||||
title: "题目",
|
||||
key: "problem",
|
||||
width: 100,
|
||||
width: 120,
|
||||
render: (row) =>
|
||||
h(
|
||||
NButton,
|
||||
@@ -165,16 +165,16 @@ const columns = computed(() => {
|
||||
{
|
||||
title: "执行耗时",
|
||||
key: "time",
|
||||
width: 100,
|
||||
width: 120,
|
||||
render: (row) => submissionTimeFormat(row.statistic_info.time_cost),
|
||||
},
|
||||
{
|
||||
title: "占用内存",
|
||||
key: "memory",
|
||||
width: 100,
|
||||
width: 120,
|
||||
render: (row) => submissionMemoryFormat(row.statistic_info.memory_cost),
|
||||
},
|
||||
{ title: "语言", key: "language", width: 100 },
|
||||
{ title: "语言", key: "language", width: 120 },
|
||||
{
|
||||
title: "用户",
|
||||
key: "username",
|
||||
@@ -211,7 +211,12 @@ const columns = computed(() => {
|
||||
<n-switch v-model:value="query.myself" />
|
||||
</n-form-item>
|
||||
<n-form-item label="搜索用户">
|
||||
<n-input @change="search" clearable placeholder="输入后回车或点击搜索" />
|
||||
<n-input
|
||||
v-model:value="query.username"
|
||||
@change="search"
|
||||
clearable
|
||||
placeholder="输入后回车或点击搜索"
|
||||
/>
|
||||
</n-form-item>
|
||||
<n-form-item>
|
||||
<n-space>
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
<script setup lang="ts">
|
||||
import { DocumentCopy, Select } from "@element-plus/icons-vue"
|
||||
import copy from "copy-text-to-clipboard"
|
||||
|
||||
defineProps<{ value: string }>()
|
||||
const [copied, toggle] = useToggle()
|
||||
const { start } = useTimeoutFn(() => toggle(false), 1000, { immediate: false })
|
||||
|
||||
function handleClick(value: string) {
|
||||
copy(value)
|
||||
toggle(true)
|
||||
start()
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-icon class="icon" @click="handleClick(value)">
|
||||
<component :is="copied ? Select : DocumentCopy"></component>
|
||||
</n-icon>
|
||||
</template>
|
||||
{{ copied ? "已复制" : "复制" }}
|
||||
</n-tooltip>
|
||||
</template>
|
||||
<style scoped>
|
||||
.icon {
|
||||
cursor: pointer;
|
||||
transform: translateY(2px);
|
||||
}
|
||||
</style>
|
||||
<script setup lang="ts">
|
||||
import { DocumentCopy, Select } from "@element-plus/icons-vue"
|
||||
import copy from "copy-text-to-clipboard"
|
||||
|
||||
defineProps<{ value: string }>()
|
||||
const [copied, toggle] = useToggle()
|
||||
const { start } = useTimeoutFn(() => toggle(false), 1000, { immediate: false })
|
||||
|
||||
function handleClick(value: string) {
|
||||
copy(value)
|
||||
toggle(true)
|
||||
start()
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<n-tooltip trigger="hover">
|
||||
<template #trigger>
|
||||
<n-icon class="icon" @click="handleClick(value)">
|
||||
<component :is="copied ? Select : DocumentCopy"></component>
|
||||
</n-icon>
|
||||
</template>
|
||||
{{ copied ? "已复制" : "复制" }}
|
||||
</n-tooltip>
|
||||
</template>
|
||||
<style scoped>
|
||||
.icon {
|
||||
cursor: pointer;
|
||||
transform: translateY(2px);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
import {
|
||||
Chart as ChartJS,
|
||||
Title,
|
||||
Colors,
|
||||
Tooltip,
|
||||
Legend,
|
||||
BarElement,
|
||||
ArcElement,
|
||||
CategoryScale,
|
||||
LinearScale,
|
||||
} from "chart.js"
|
||||
|
||||
const [isLoaded] = useToggle()
|
||||
|
||||
export function loadChart() {
|
||||
if (isLoaded.value) return
|
||||
ChartJS.register(
|
||||
CategoryScale,
|
||||
LinearScale,
|
||||
BarElement,
|
||||
ArcElement,
|
||||
Colors,
|
||||
Title,
|
||||
Tooltip,
|
||||
Legend
|
||||
)
|
||||
isLoaded.value = true
|
||||
}
|
||||
import {
|
||||
Chart as ChartJS,
|
||||
Title,
|
||||
Colors,
|
||||
Tooltip,
|
||||
Legend,
|
||||
BarElement,
|
||||
ArcElement,
|
||||
CategoryScale,
|
||||
LinearScale,
|
||||
} from "chart.js"
|
||||
|
||||
const [isLoaded] = useToggle()
|
||||
|
||||
export function loadChart() {
|
||||
if (isLoaded.value) return
|
||||
ChartJS.register(
|
||||
CategoryScale,
|
||||
LinearScale,
|
||||
BarElement,
|
||||
ArcElement,
|
||||
Colors,
|
||||
Title,
|
||||
Tooltip,
|
||||
Legend
|
||||
)
|
||||
isLoaded.value = true
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const code = ref("")
|
||||
export const code = ref("")
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
import loader, { Monaco } from "@monaco-editor/loader"
|
||||
|
||||
export const monaco = ref<Monaco>()
|
||||
|
||||
export async function init() {
|
||||
loader.config({
|
||||
paths: { vs: "https://cdn.staticfile.org/monaco-editor/0.34.1/min/vs" },
|
||||
"vs/nls": { availableLanguages: { "*": "zh-cn" } },
|
||||
})
|
||||
|
||||
const [m, light, dark] = await Promise.all([
|
||||
loader.init(),
|
||||
fetch("/light.json").then((t) => t.json()),
|
||||
fetch("/dark.json").then((t) => t.json()),
|
||||
])
|
||||
monaco.value = m
|
||||
monaco.value.editor.defineTheme("light", light)
|
||||
monaco.value.editor.defineTheme("dark", dark)
|
||||
}
|
||||
import loader, { Monaco } from "@monaco-editor/loader"
|
||||
|
||||
export const monaco = ref<Monaco>()
|
||||
|
||||
export async function init() {
|
||||
loader.config({
|
||||
paths: { vs: "https://cdn.staticfile.org/monaco-editor/0.34.1/min/vs" },
|
||||
"vs/nls": { availableLanguages: { "*": "zh-cn" } },
|
||||
})
|
||||
|
||||
const [m, light, dark] = await Promise.all([
|
||||
loader.init(),
|
||||
fetch("/light.json").then((t) => t.json()),
|
||||
fetch("/dark.json").then((t) => t.json()),
|
||||
])
|
||||
monaco.value = m
|
||||
monaco.value.editor.defineTheme("light", light)
|
||||
monaco.value.editor.defineTheme("dark", dark)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user