项目微调
引入按需自动导入插件,避免开发人员显示导入vue的函数
This commit is contained in:
@@ -5,7 +5,7 @@ VITE_GLOB_APP_TITLE=PQS-9100自动检测平台
|
|||||||
VITE_PORT=18091
|
VITE_PORT=18091
|
||||||
|
|
||||||
# 启动时自动打开浏览器
|
# 启动时自动打开浏览器
|
||||||
VITE_OPEN=false
|
VITE_OPEN=true
|
||||||
|
|
||||||
# 打包后是否生成包分析文件
|
# 打包后是否生成包分析文件
|
||||||
VITE_REPORT=false
|
VITE_REPORT=false
|
||||||
|
|||||||
284
frontend/.eslintrc-auto-import.json
Normal file
284
frontend/.eslintrc-auto-import.json
Normal file
@@ -0,0 +1,284 @@
|
|||||||
|
{
|
||||||
|
"globals": {
|
||||||
|
"Component": true,
|
||||||
|
"ComponentPublicInstance": true,
|
||||||
|
"ComputedRef": true,
|
||||||
|
"EffectScope": true,
|
||||||
|
"ElMessage": true,
|
||||||
|
"ElMessageBox": true,
|
||||||
|
"ElNotification": true,
|
||||||
|
"InjectionKey": true,
|
||||||
|
"PropType": true,
|
||||||
|
"Ref": true,
|
||||||
|
"VNode": true,
|
||||||
|
"asyncComputed": true,
|
||||||
|
"autoResetRef": true,
|
||||||
|
"computed": true,
|
||||||
|
"computedAsync": true,
|
||||||
|
"computedEager": true,
|
||||||
|
"computedInject": true,
|
||||||
|
"computedWithControl": true,
|
||||||
|
"controlledComputed": true,
|
||||||
|
"controlledRef": true,
|
||||||
|
"createApp": true,
|
||||||
|
"createEventHook": true,
|
||||||
|
"createGlobalState": true,
|
||||||
|
"createInjectionState": true,
|
||||||
|
"createReactiveFn": true,
|
||||||
|
"createReusableTemplate": true,
|
||||||
|
"createSharedComposable": true,
|
||||||
|
"createTemplatePromise": true,
|
||||||
|
"createUnrefFn": true,
|
||||||
|
"customRef": true,
|
||||||
|
"debouncedRef": true,
|
||||||
|
"debouncedWatch": true,
|
||||||
|
"defineAsyncComponent": true,
|
||||||
|
"defineComponent": true,
|
||||||
|
"eagerComputed": true,
|
||||||
|
"effectScope": true,
|
||||||
|
"extendRef": true,
|
||||||
|
"getCurrentInstance": true,
|
||||||
|
"getCurrentScope": true,
|
||||||
|
"h": true,
|
||||||
|
"ignorableWatch": true,
|
||||||
|
"inject": true,
|
||||||
|
"isDefined": true,
|
||||||
|
"isProxy": true,
|
||||||
|
"isReactive": true,
|
||||||
|
"isReadonly": true,
|
||||||
|
"isRef": true,
|
||||||
|
"makeDestructurable": true,
|
||||||
|
"markRaw": true,
|
||||||
|
"nextTick": true,
|
||||||
|
"onActivated": true,
|
||||||
|
"onBeforeMount": true,
|
||||||
|
"onBeforeUnmount": true,
|
||||||
|
"onBeforeUpdate": true,
|
||||||
|
"onClickOutside": true,
|
||||||
|
"onDeactivated": true,
|
||||||
|
"onErrorCaptured": true,
|
||||||
|
"onKeyStroke": true,
|
||||||
|
"onLongPress": true,
|
||||||
|
"onMounted": true,
|
||||||
|
"onRenderTracked": true,
|
||||||
|
"onRenderTriggered": true,
|
||||||
|
"onScopeDispose": true,
|
||||||
|
"onServerPrefetch": true,
|
||||||
|
"onStartTyping": true,
|
||||||
|
"onUnmounted": true,
|
||||||
|
"onUpdated": true,
|
||||||
|
"pausableWatch": true,
|
||||||
|
"provide": true,
|
||||||
|
"reactify": true,
|
||||||
|
"reactifyObject": true,
|
||||||
|
"reactive": true,
|
||||||
|
"reactiveComputed": true,
|
||||||
|
"reactiveOmit": true,
|
||||||
|
"reactivePick": true,
|
||||||
|
"readonly": true,
|
||||||
|
"ref": true,
|
||||||
|
"refAutoReset": true,
|
||||||
|
"refDebounced": true,
|
||||||
|
"refDefault": true,
|
||||||
|
"refThrottled": true,
|
||||||
|
"refWithControl": true,
|
||||||
|
"resolveComponent": true,
|
||||||
|
"resolveRef": true,
|
||||||
|
"resolveUnref": true,
|
||||||
|
"shallowReactive": true,
|
||||||
|
"shallowReadonly": true,
|
||||||
|
"shallowRef": true,
|
||||||
|
"syncRef": true,
|
||||||
|
"syncRefs": true,
|
||||||
|
"templateRef": true,
|
||||||
|
"throttledRef": true,
|
||||||
|
"throttledWatch": true,
|
||||||
|
"toRaw": true,
|
||||||
|
"toReactive": true,
|
||||||
|
"toRef": true,
|
||||||
|
"toRefs": true,
|
||||||
|
"toValue": true,
|
||||||
|
"triggerRef": true,
|
||||||
|
"tryOnBeforeMount": true,
|
||||||
|
"tryOnBeforeUnmount": true,
|
||||||
|
"tryOnMounted": true,
|
||||||
|
"tryOnScopeDispose": true,
|
||||||
|
"tryOnUnmounted": true,
|
||||||
|
"unref": 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,
|
||||||
|
"useAttrs": true,
|
||||||
|
"useBase64": true,
|
||||||
|
"useBattery": true,
|
||||||
|
"useBluetooth": true,
|
||||||
|
"useBreakpoints": true,
|
||||||
|
"useBroadcastChannel": true,
|
||||||
|
"useBrowserLocation": true,
|
||||||
|
"useCached": true,
|
||||||
|
"useClipboard": true,
|
||||||
|
"useCloned": true,
|
||||||
|
"useColorMode": true,
|
||||||
|
"useConfirmDialog": true,
|
||||||
|
"useCounter": true,
|
||||||
|
"useCssModule": true,
|
||||||
|
"useCssVar": true,
|
||||||
|
"useCssVars": 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,
|
||||||
|
"useSlots": 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,
|
||||||
|
"watch": true,
|
||||||
|
"watchArray": true,
|
||||||
|
"watchAtMost": true,
|
||||||
|
"watchDebounced": true,
|
||||||
|
"watchDeep": true,
|
||||||
|
"watchEffect": true,
|
||||||
|
"watchIgnorable": true,
|
||||||
|
"watchImmediate": true,
|
||||||
|
"watchOnce": true,
|
||||||
|
"watchPausable": true,
|
||||||
|
"watchPostEffect": true,
|
||||||
|
"watchSyncEffect": true,
|
||||||
|
"watchThrottled": true,
|
||||||
|
"watchTriggerable": true,
|
||||||
|
"watchWithFilter": true,
|
||||||
|
"whenever": true
|
||||||
|
}
|
||||||
|
}
|
||||||
9
frontend/auto-imports.d.ts
vendored
9
frontend/auto-imports.d.ts
vendored
@@ -1,9 +0,0 @@
|
|||||||
/* eslint-disable */
|
|
||||||
/* prettier-ignore */
|
|
||||||
// @ts-nocheck
|
|
||||||
// noinspection JSUnusedGlobalSymbols
|
|
||||||
// Generated by unplugin-auto-import
|
|
||||||
export {}
|
|
||||||
declare global {
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
"sortablejs": "^1.15.0",
|
"sortablejs": "^1.15.0",
|
||||||
"vue": "^3.4.29",
|
"vue": "^3.4.29",
|
||||||
"vue-i18n": "^9.4.0",
|
"vue-i18n": "^9.4.0",
|
||||||
"vue-router": "^4.3.3",
|
"vue-router": "^4.4.5",
|
||||||
"vuedraggable": "^4.1.0"
|
"vuedraggable": "^4.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
"standard-version": "^9.5.0",
|
"standard-version": "^9.5.0",
|
||||||
"tailwindcss": "^3.4.7",
|
"tailwindcss": "^3.4.7",
|
||||||
"typescript": "~5.4.0",
|
"typescript": "~5.4.0",
|
||||||
"unplugin-auto-import": "^0.18.2",
|
"unplugin-auto-import": "^0.18.3",
|
||||||
"unplugin-vue-components": "^0.27.4",
|
"unplugin-vue-components": "^0.27.4",
|
||||||
"unplugin-vue-setup-extend-plus": "^1.0.0",
|
"unplugin-vue-setup-extend-plus": "^1.0.0",
|
||||||
"vite": "^5.3.1",
|
"vite": "^5.3.1",
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
defineOptions({
|
defineOptions({
|
||||||
name: "App",
|
name: "App",
|
||||||
});
|
});
|
||||||
import { onMounted, reactive, computed } from "vue";
|
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "vue-i18n";
|
||||||
import { getBrowserLang } from "@/utils";
|
import { getBrowserLang } from "@/utils";
|
||||||
import { useTheme } from "@/hooks/useTheme";
|
import { useTheme } from "@/hooks/useTheme";
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, defineExpose } from "vue";
|
|
||||||
const dialogVisible = ref<Boolean>(false);
|
const dialogVisible = ref<Boolean>(false);
|
||||||
const dialogTitle = ref<string>("");
|
const dialogTitle = ref<string>("");
|
||||||
const openDialog = (title: string) => {
|
const openDialog = (title: string) => {
|
||||||
|
|||||||
@@ -333,7 +333,7 @@ defineExpose({
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
::v-deep .custom-table-header .el-table__header-wrapper .el-table__header{
|
:deep(.custom-table-header .el-table__header-wrapper .el-table__header){
|
||||||
background-color: red !important; /* 修改为你想要的颜色 */
|
background-color: red !important; /* 修改为你想要的颜色 */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -3,14 +3,6 @@
|
|||||||
<div class="pie" ref="chartsRef"></div>
|
<div class="pie" ref="chartsRef"></div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import {
|
|
||||||
ref,
|
|
||||||
onMounted,
|
|
||||||
defineProps,
|
|
||||||
defineExpose,
|
|
||||||
watch,
|
|
||||||
onUnmounted,
|
|
||||||
} from "vue";
|
|
||||||
import * as echarts from "echarts";
|
import * as echarts from "echarts";
|
||||||
const chartsRef = ref();
|
const chartsRef = ref();
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
1780
frontend/src/types/auto-imports.d.ts
vendored
Normal file
1780
frontend/src/types/auto-imports.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -7,12 +7,12 @@ export {}
|
|||||||
/* prettier-ignore */
|
/* prettier-ignore */
|
||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
403: typeof import('./src/components/ErrorMessage/403.vue')['default']
|
403: typeof import('../components/ErrorMessage/403.vue')['default']
|
||||||
404: typeof import('./src/components/ErrorMessage/404.vue')['default']
|
404: typeof import('../components/ErrorMessage/404.vue')['default']
|
||||||
500: typeof import('./src/components/ErrorMessage/500.vue')['default']
|
500: typeof import('../components/ErrorMessage/500.vue')['default']
|
||||||
ColSetting: typeof import('./src/components/ProTable/components/ColSetting.vue')['default']
|
ColSetting: typeof import('../components/ProTable/components/ColSetting.vue')['default']
|
||||||
Default: typeof import('./src/components/echarts/pie/default.vue')['default']
|
Default: typeof import('../components/echarts/pie/default.vue')['default']
|
||||||
Dialog: typeof import('./src/components/Dialog/index.vue')['default']
|
Dialog: typeof import('../components/Dialog/index.vue')['default']
|
||||||
ElAside: typeof import('element-plus/es')['ElAside']
|
ElAside: typeof import('element-plus/es')['ElAside']
|
||||||
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb']
|
||||||
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem']
|
||||||
@@ -57,18 +57,18 @@ declare module 'vue' {
|
|||||||
ElTimePicker: typeof import('element-plus/es')['ElTimePicker']
|
ElTimePicker: typeof import('element-plus/es')['ElTimePicker']
|
||||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||||
ElTree: typeof import('element-plus/es')['ElTree']
|
ElTree: typeof import('element-plus/es')['ElTree']
|
||||||
Grid: typeof import('./src/components/Grid/index.vue')['default']
|
Grid: typeof import('../components/Grid/index.vue')['default']
|
||||||
GridItem: typeof import('./src/components/Grid/components/GridItem.vue')['default']
|
GridItem: typeof import('../components/Grid/components/GridItem.vue')['default']
|
||||||
ImportExcel: typeof import('./src/components/ImportExcel/index.vue')['default']
|
ImportExcel: typeof import('../components/ImportExcel/index.vue')['default']
|
||||||
Loading: typeof import('./src/components/Loading/index.vue')['default']
|
Loading: typeof import('../components/Loading/index.vue')['default']
|
||||||
Pagination: typeof import('./src/components/ProTable/components/Pagination.vue')['default']
|
Pagination: typeof import('../components/ProTable/components/Pagination.vue')['default']
|
||||||
ProTable: typeof import('./src/components/ProTable/index.vue')['default']
|
ProTable: typeof import('../components/ProTable/index.vue')['default']
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
RouterView: typeof import('vue-router')['RouterView']
|
RouterView: typeof import('vue-router')['RouterView']
|
||||||
SearchForm: typeof import('./src/components/SearchForm/index.vue')['default']
|
SearchForm: typeof import('../components/SearchForm/index.vue')['default']
|
||||||
SearchFormItem: typeof import('./src/components/SearchForm/components/SearchFormItem.vue')['default']
|
SearchFormItem: typeof import('../components/SearchForm/components/SearchFormItem.vue')['default']
|
||||||
SvgIcon: typeof import('./src/components/staticExtend/SvgIcon/src/SvgIcon.vue')['default']
|
SvgIcon: typeof import('../components/staticExtend/SvgIcon/src/SvgIcon.vue')['default']
|
||||||
SwitchDark: typeof import('./src/components/SwitchDark/index.vue')['default']
|
SwitchDark: typeof import('../components/SwitchDark/index.vue')['default']
|
||||||
TableColumn: typeof import('./src/components/ProTable/components/TableColumn.vue')['default']
|
TableColumn: typeof import('../components/ProTable/components/TableColumn.vue')['default']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,41 +1,11 @@
|
|||||||
/* Menu */
|
|
||||||
declare namespace Menu {
|
declare module "*.vue" {
|
||||||
interface MenuOptions {
|
import { DefineComponent } from "vue";
|
||||||
path: string;
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
||||||
name: string;
|
const component: DefineComponent<{}, {}, any>;
|
||||||
component?: string | (() => Promise<unknown>);
|
export default component;
|
||||||
redirect?: string;
|
|
||||||
meta: MetaProps;
|
|
||||||
children?: MenuOptions[];
|
|
||||||
}
|
|
||||||
interface MetaProps {
|
|
||||||
icon: string;
|
|
||||||
title: string;
|
|
||||||
activeMenu?: string;
|
|
||||||
isLink?: string;
|
|
||||||
isHide: boolean;
|
|
||||||
isFull: boolean;
|
|
||||||
isAffix: boolean;
|
|
||||||
isKeepAlive: boolean;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FileType */
|
|
||||||
declare namespace File {
|
|
||||||
type ImageMimeType =
|
|
||||||
| "image/apng"
|
|
||||||
| "image/bmp"
|
|
||||||
| "image/gif"
|
|
||||||
| "image/jpeg"
|
|
||||||
| "image/pjpeg"
|
|
||||||
| "image/png"
|
|
||||||
| "image/svg+xml"
|
|
||||||
| "image/tiff"
|
|
||||||
| "image/webp"
|
|
||||||
| "image/x-icon";
|
|
||||||
|
|
||||||
type ExcelMimeType = "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Vite */
|
/* Vite */
|
||||||
declare type Recordable<T = any> = Record<string, T>;
|
declare type Recordable<T = any> = Record<string, T>;
|
||||||
39
frontend/src/types/global.d.ts
vendored
Normal file
39
frontend/src/types/global.d.ts
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
/* Menu */
|
||||||
|
declare namespace Menu {
|
||||||
|
interface MenuOptions {
|
||||||
|
path: string;
|
||||||
|
name: string;
|
||||||
|
component?: string | (() => Promise<unknown>);
|
||||||
|
redirect?: string;
|
||||||
|
meta: MetaProps;
|
||||||
|
children?: MenuOptions[];
|
||||||
|
}
|
||||||
|
interface MetaProps {
|
||||||
|
icon: string;
|
||||||
|
title: string;
|
||||||
|
activeMenu?: string;
|
||||||
|
isLink?: string;
|
||||||
|
isHide: boolean;
|
||||||
|
isFull: boolean;
|
||||||
|
isAffix: boolean;
|
||||||
|
isKeepAlive: boolean;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* FileType */
|
||||||
|
declare namespace File {
|
||||||
|
type ImageMimeType =
|
||||||
|
| "image/apng"
|
||||||
|
| "image/bmp"
|
||||||
|
| "image/gif"
|
||||||
|
| "image/jpeg"
|
||||||
|
| "image/pjpeg"
|
||||||
|
| "image/png"
|
||||||
|
| "image/svg+xml"
|
||||||
|
| "image/tiff"
|
||||||
|
| "image/webp"
|
||||||
|
| "image/x-icon";
|
||||||
|
|
||||||
|
type ExcelMimeType = "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
||||||
|
}
|
||||||
|
|
||||||
@@ -127,22 +127,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="tsx" name="useProTable">
|
<script setup lang="tsx" name="useProTable">
|
||||||
import { ref, reactive, onMounted } from "vue";
|
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { User } from "@/api/interface";
|
import { User } from "@/api/interface";
|
||||||
import { useHandleData } from "@/hooks/useHandleData";
|
import { useHandleData } from "@/hooks/useHandleData";
|
||||||
import { useDownload } from "@/hooks/useDownload";
|
|
||||||
import { ElMessage, ElMessageBox } from "element-plus";
|
import { ElMessage, ElMessageBox } from "element-plus";
|
||||||
import ProTable from "@/components/ProTable/index.vue";
|
import ProTable from "@/components/ProTable/index.vue";
|
||||||
import ImportExcel from "@/components/ImportExcel/index.vue";
|
|
||||||
import {
|
import {
|
||||||
CirclePlus,
|
|
||||||
Delete,
|
|
||||||
EditPen,
|
|
||||||
Download,
|
|
||||||
Upload,
|
|
||||||
View,
|
|
||||||
Refresh,
|
|
||||||
Search,
|
Search,
|
||||||
} from "@element-plus/icons-vue";
|
} from "@element-plus/icons-vue";
|
||||||
import { getPlanList } from "@/api/plan/planList";
|
import { getPlanList } from "@/api/plan/planList";
|
||||||
@@ -544,9 +534,6 @@ defineExpose({ changeActiveTabs });
|
|||||||
width: 150px !important;
|
width: 150px !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ::v-deep .el-select {
|
|
||||||
// width: 150px !important;
|
|
||||||
// }
|
|
||||||
|
|
||||||
.el-form {
|
.el-form {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -30,7 +30,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, defineExpose, watch } from "vue";
|
|
||||||
import { Menu,Platform} from "@element-plus/icons-vue";
|
import { Menu,Platform} from "@element-plus/icons-vue";
|
||||||
const emit = defineEmits(["jump"]);
|
const emit = defineEmits(["jump"]);
|
||||||
const data: any = ref([]);
|
const data: any = ref([]);
|
||||||
|
|||||||
@@ -30,10 +30,9 @@
|
|||||||
</div> -->
|
</div> -->
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted } from "vue";
|
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { useAuthStore } from "@/stores/modules/auth.ts";
|
import { useAuthStore } from "@/stores/modules/auth";
|
||||||
import model from "./tabs/model.vue";
|
import model from "./tabs/model.vue";
|
||||||
import dashboard from "./tabs/dashboard.vue";
|
import dashboard from "./tabs/dashboard.vue";
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
|
|||||||
@@ -83,14 +83,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, watch } from "vue";
|
|
||||||
import { getStaticTreeData } from "@/api/plan/static";
|
import { getStaticTreeData } from "@/api/plan/static";
|
||||||
import pie from "@/components/echarts/pie/default.vue";
|
import pie from "@/components/echarts/pie/default.vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import tree from "../components/tree.vue";
|
import tree from "../components/tree.vue";
|
||||||
import Table from "../components/table.vue";
|
import Table from "../components/table.vue";
|
||||||
import { data } from "@/api/plan/static.json";
|
import { data } from "@/api/plan/static.json";
|
||||||
import { Refresh, Search } from "@element-plus/icons-vue";
|
|
||||||
const treeRef = ref();
|
const treeRef = ref();
|
||||||
const form: any = ref({
|
const form: any = ref({
|
||||||
activeTabs: 0, //功能选择
|
activeTabs: 0, //功能选择
|
||||||
|
|||||||
@@ -33,10 +33,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted } from "vue";
|
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
import { useAuthStore } from "@/stores/modules/auth.ts";
|
import { useAuthStore } from "@/stores/modules/auth";
|
||||||
const authStore = useAuthStore();
|
const authStore = useAuthStore();
|
||||||
const activeIndex = ref("1-1");
|
const activeIndex = ref("1-1");
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -234,7 +233,7 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
::v-deep .el-sub-menu__title {
|
:deep(.el-sub-menu__title) {
|
||||||
border-bottom: 0 !important;
|
border-bottom: 0 !important;
|
||||||
outline: none !important;
|
outline: none !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,7 +53,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onMounted } from "vue";
|
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { HOME_URL } from "@/config";
|
import { HOME_URL } from "@/config";
|
||||||
import { getTimeState } from "@/utils";
|
import { getTimeState } from "@/utils";
|
||||||
|
|||||||
@@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
<script setup lang="ts" name="login">
|
<script setup lang="ts" name="login">
|
||||||
import LoginForm from "./components/LoginForm.vue";
|
import LoginForm from "./components/LoginForm.vue";
|
||||||
import SwitchDark from "@/components/SwitchDark/index.vue";
|
|
||||||
const title = import.meta.env.VITE_GLOB_APP_TITLE;
|
const title = import.meta.env.VITE_GLOB_APP_TITLE;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
<div>检测脚本</div>
|
<div>检测脚本</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang='ts' setup>
|
<script lang='ts' setup>
|
||||||
import {ref,onMounted} from 'vue';
|
|
||||||
onMounted(()=>{
|
onMounted(()=>{
|
||||||
console.log()
|
console.log()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
<div class="detection"></div>
|
<div class="detection"></div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted } from "vue";
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
console.log();
|
console.log();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -105,7 +105,6 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref,reactive,onMounted, defineExpose } from "vue";
|
|
||||||
import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
|
import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
|
||||||
|
|
||||||
interface RuleForm {
|
interface RuleForm {
|
||||||
|
|||||||
@@ -148,7 +148,6 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="tsx" name="useProTable">
|
<script setup lang="tsx" name="useProTable">
|
||||||
import { ref, reactive, onMounted } from "vue";
|
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { User } from "@/api/interface";
|
import { User } from "@/api/interface";
|
||||||
import { useHandleData } from "@/hooks/useHandleData";
|
import { useHandleData } from "@/hooks/useHandleData";
|
||||||
@@ -452,7 +451,8 @@ onMounted(() => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100vh - 165px);
|
height: calc(100vh - 165px);
|
||||||
}
|
}
|
||||||
::v-deep .el-select {
|
|
||||||
|
:deep(.el-select) {
|
||||||
width: 150px !important;
|
width: 150px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,8 @@
|
|||||||
"src/**/*.d.ts",
|
"src/**/*.d.ts",
|
||||||
"src/**/*.tsx",
|
"src/**/*.tsx",
|
||||||
"src/**/*.vue",
|
"src/**/*.vue",
|
||||||
|
"build/**/*.ts",
|
||||||
|
"build/**/*.d.ts",
|
||||||
"vite.config.ts"
|
"vite.config.ts"
|
||||||
],
|
],
|
||||||
"exclude": ["node_modules", "dist", "**/*.js"]
|
"exclude": ["node_modules", "dist", "**/*.js"]
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { defineConfig, loadEnv, ConfigEnv, UserConfig } from "vite";
|
|||||||
import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
|
import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
|
||||||
import vue from "@vitejs/plugin-vue";
|
import vue from "@vitejs/plugin-vue";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
|
// 处理env环境参数读取
|
||||||
import { wrapperEnv } from "./build/getEnv";
|
import { wrapperEnv } from "./build/getEnv";
|
||||||
import { createProxy } from "./build/proxy";
|
import { createProxy } from "./build/proxy";
|
||||||
// 导入
|
// 导入
|
||||||
@@ -23,18 +24,39 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
|
|||||||
symbolId: "icon-[dir]-[name]",
|
symbolId: "icon-[dir]-[name]",
|
||||||
}),
|
}),
|
||||||
AutoImport({
|
AutoImport({
|
||||||
|
// 自动导入 Vue 相关函数,如:ref, reactive, toRef 等
|
||||||
|
imports: ["vue", "@vueuse/core", "pinia", "vue-router", "vue-i18n"],
|
||||||
resolvers: [
|
resolvers: [
|
||||||
|
// 自动导入 Element Plus 相关函数,如:ElMessage, ElMessageBox... (带样式)
|
||||||
ElementPlusResolver({
|
ElementPlusResolver({
|
||||||
importStyle: "sass",
|
importStyle: "sass",
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
eslintrc: {
|
||||||
|
// 是否自动生成 eslint 规则,建议生成之后设置 false
|
||||||
|
enabled: false,
|
||||||
|
// 指定自动导入函数 eslint 规则的文件
|
||||||
|
filepath: "./.eslintrc-auto-import.json",
|
||||||
|
globalsPropValue: true,
|
||||||
|
},
|
||||||
|
// 是否在 vue 模板中自动导入
|
||||||
|
vueTemplate: true,
|
||||||
|
// 指定自动导入函数TS类型声明文件路径 (false:关闭自动生成)
|
||||||
|
dts: false,
|
||||||
|
// dts: "src/types/auto-imports.d.ts",
|
||||||
}),
|
}),
|
||||||
Components({
|
Components({
|
||||||
resolvers: [
|
resolvers: [
|
||||||
|
// 自动导入 Element Plus 组件
|
||||||
ElementPlusResolver({
|
ElementPlusResolver({
|
||||||
importStyle: "sass",
|
importStyle: "sass",
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
// 指定自定义组件位置(默认:src/components)
|
||||||
|
dirs: ["src/components", "src/**/components"],
|
||||||
|
// 指定自动导入组件TS类型声明文件路径 (false:关闭自动生成)
|
||||||
|
dts: false,
|
||||||
|
// dts: "src/types/components.d.ts",
|
||||||
}),
|
}),
|
||||||
// 增加此行代码
|
// 增加此行代码
|
||||||
vueJsx(),
|
vueJsx(),
|
||||||
|
|||||||
Reference in New Issue
Block a user