Skip to content

Commit

Permalink
feat: 实验性支持alova
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Oct 28, 2024
1 parent 9541ff8 commit d7b2b28
Show file tree
Hide file tree
Showing 23 changed files with 417 additions and 53 deletions.
4 changes: 2 additions & 2 deletions internal/service/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ func (s *DashboardService) Panel(w http.ResponseWriter, r *http.Request) {
}

Success(w, chix.M{
"name": name,
"language": app.Conf.MustString("app.locale"),
"name": name,
"locale": app.Conf.MustString("app.locale"),
})
}

Expand Down
256 changes: 255 additions & 1 deletion web/.eslintrc-auto-import.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,260 @@
"useTemplateRef": true,
"DirectiveBinding": true,
"MaybeRef": true,
"MaybeRefOrGetter": true
"MaybeRefOrGetter": true,
"acceptHMRUpdate": true,
"createPinia": true,
"defineStore": true,
"getActivePinia": true,
"mapActions": true,
"mapGetters": true,
"mapState": true,
"mapStores": true,
"mapWritableState": true,
"setActivePinia": true,
"setMapStoreSuffix": true,
"storeToRefs": true,
"asyncComputed": true,
"autoResetRef": true,
"computedAsync": true,
"computedEager": true,
"computedInject": true,
"computedWithControl": true,
"controlledComputed": true,
"controlledRef": true,
"createEventHook": true,
"createGlobalState": true,
"createInjectionState": true,
"createReactiveFn": true,
"createReusableTemplate": true,
"createSharedComposable": true,
"createTemplatePromise": true,
"createUnrefFn": true,
"debouncedRef": true,
"debouncedWatch": true,
"eagerComputed": true,
"extendRef": true,
"ignorableWatch": true,
"injectLocal": true,
"isDefined": true,
"makeDestructurable": true,
"onClickOutside": true,
"onKeyStroke": true,
"onLongPress": true,
"onStartTyping": true,
"pausableWatch": true,
"provideLocal": true,
"reactify": true,
"reactifyObject": true,
"reactiveComputed": true,
"reactiveOmit": true,
"reactivePick": true,
"refAutoReset": true,
"refDebounced": true,
"refDefault": true,
"refThrottled": true,
"refWithControl": true,
"resolveRef": true,
"resolveUnref": true,
"syncRef": true,
"syncRefs": true,
"templateRef": true,
"throttledRef": true,
"throttledWatch": true,
"toReactive": true,
"tryOnBeforeMount": true,
"tryOnBeforeUnmount": true,
"tryOnMounted": true,
"tryOnScopeDispose": true,
"tryOnUnmounted": true,
"unrefElement": true,
"until": true,
"useActiveElement": true,
"useAnimate": true,
"useArrayDifference": true,
"useArrayEvery": true,
"useArrayFilter": true,
"useArrayFind": true,
"useArrayFindIndex": true,
"useArrayFindLast": true,
"useArrayIncludes": true,
"useArrayJoin": true,
"useArrayMap": true,
"useArrayReduce": true,
"useArraySome": true,
"useArrayUnique": true,
"useAsyncQueue": true,
"useAsyncState": true,
"useBase64": true,
"useBattery": true,
"useBluetooth": true,
"useBreakpoints": true,
"useBroadcastChannel": true,
"useBrowserLocation": true,
"useCached": true,
"useClipboard": true,
"useClipboardItems": true,
"useCloned": true,
"useColorMode": true,
"useConfirmDialog": true,
"useCounter": true,
"useCssVar": true,
"useCurrentElement": true,
"useCycleList": true,
"useDark": true,
"useDateFormat": true,
"useDebounce": true,
"useDebounceFn": true,
"useDebouncedRefHistory": true,
"useDeviceMotion": true,
"useDeviceOrientation": true,
"useDevicePixelRatio": true,
"useDevicesList": true,
"useDisplayMedia": true,
"useDocumentVisibility": true,
"useDraggable": true,
"useDropZone": true,
"useElementBounding": true,
"useElementByPoint": true,
"useElementHover": true,
"useElementSize": true,
"useElementVisibility": true,
"useEventBus": true,
"useEventListener": true,
"useEventSource": true,
"useEyeDropper": true,
"useFavicon": true,
"useFetch": true,
"useFileDialog": true,
"useFileSystemAccess": true,
"useFocus": true,
"useFocusWithin": true,
"useFps": true,
"useFullscreen": true,
"useGamepad": true,
"useGeolocation": true,
"useIdle": true,
"useImage": true,
"useInfiniteScroll": true,
"useIntersectionObserver": true,
"useInterval": true,
"useIntervalFn": true,
"useKeyModifier": true,
"useLastChanged": true,
"useLocalStorage": true,
"useMagicKeys": true,
"useManualRefHistory": true,
"useMediaControls": true,
"useMediaQuery": true,
"useMemoize": true,
"useMemory": true,
"useMounted": true,
"useMouse": true,
"useMouseInElement": true,
"useMousePressed": true,
"useMutationObserver": true,
"useNavigatorLanguage": true,
"useNetwork": true,
"useNow": true,
"useObjectUrl": true,
"useOffsetPagination": true,
"useOnline": true,
"usePageLeave": true,
"useParallax": true,
"useParentElement": true,
"usePerformanceObserver": true,
"usePermission": true,
"usePointer": true,
"usePointerLock": true,
"usePointerSwipe": true,
"usePreferredColorScheme": true,
"usePreferredContrast": true,
"usePreferredDark": true,
"usePreferredLanguages": true,
"usePreferredReducedMotion": true,
"usePrevious": true,
"useRafFn": true,
"useRefHistory": true,
"useResizeObserver": true,
"useScreenOrientation": true,
"useScreenSafeArea": true,
"useScriptTag": true,
"useScroll": true,
"useScrollLock": true,
"useSessionStorage": true,
"useShare": true,
"useSorted": true,
"useSpeechRecognition": true,
"useSpeechSynthesis": true,
"useStepper": true,
"useStorage": true,
"useStorageAsync": true,
"useStyleTag": true,
"useSupported": true,
"useSwipe": true,
"useTemplateRefsList": true,
"useTextDirection": true,
"useTextSelection": true,
"useTextareaAutosize": true,
"useThrottle": true,
"useThrottleFn": true,
"useThrottledRefHistory": true,
"useTimeAgo": true,
"useTimeout": true,
"useTimeoutFn": true,
"useTimeoutPoll": true,
"useTimestamp": true,
"useTitle": true,
"useToNumber": true,
"useToString": true,
"useToggle": true,
"useTransition": true,
"useUrlSearchParams": true,
"useUserMedia": true,
"useVModel": true,
"useVModels": true,
"useVibrate": true,
"useVirtualList": true,
"useWakeLock": true,
"useWebNotification": true,
"useWebSocket": true,
"useWebWorker": true,
"useWebWorkerFn": true,
"useWindowFocus": true,
"useWindowScroll": true,
"useWindowSize": true,
"watchArray": true,
"watchAtMost": true,
"watchDebounced": true,
"watchDeep": true,
"watchIgnorable": true,
"watchImmediate": true,
"watchOnce": true,
"watchPausable": true,
"watchThrottled": true,
"watchTriggerable": true,
"watchWithFilter": true,
"whenever": true,
"[alias]": true,
"[import-names]": true,
"axios": true,
"useMyFetch": true,
"accessAction": true,
"actionDelegationMiddleware": true,
"createClientTokenAuthentication": true,
"createServerTokenAuthentication": true,
"updateState": true,
"useAutoRequest": true,
"useCaptcha": true,
"useFetcher": true,
"useForm": true,
"usePagination": true,
"useRequest": true,
"useRetriable": true,
"useSQRequest": true,
"useSSE": true,
"useSerialRequest": true,
"useSerialWatcher": true,
"useWatcher": true
}
}
32 changes: 30 additions & 2 deletions web/build/plugins/unplugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,39 @@ import Icons from 'unplugin-icons/vite'

export default [
AutoImport({
imports: ['vue', 'vue-router'],
imports: [
'vue',
'vue-router',
'pinia',
'@vueuse/core',
{
'alova/client': [
'actionDelegationMiddleware',
'accessAction',
'createClientTokenAuthentication',
'createServerTokenAuthentication',
'updateState',
'useAutoRequest',
'useCaptcha',
'useFetcher',
'useForm',
'usePagination',
'useRequest',
'useRetriable',
'useSQRequest',
'useSSE',
'useSerialRequest',
'useSerialWatcher',
'useWatcher'
]
}
],
dts: 'types/auto-imports.d.ts',
eslintrc: {
enabled: true
}
},
vueTemplate: true,
viteOptimizeDeps: true
}),
Icons({
compiler: 'vue3',
Expand Down
1 change: 1 addition & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@xterm/addon-web-links": "^0.11.0",
"@xterm/addon-webgl": "^0.18.0",
"@xterm/xterm": "^5.5.0",
"alova": "^3.1.1",
"axios": "^1.7.7",
"cronstrue": "^2.50.0",
"echarts": "^5.5.1",
Expand Down
Loading

0 comments on commit d7b2b28

Please sign in to comment.