Browse Source

去除多余导入

李富豪 1 year ago
parent
commit
68c0540d8c
4 changed files with 19 additions and 995 deletions
  1. 18 894
      Web/package-lock.json
  2. 1 6
      Web/package.json
  3. 0 89
      Web/src/typings/components.d.ts
  4. 0 6
      Web/vite.config.ts

File diff suppressed because it is too large
+ 18 - 894
Web/package-lock.json


+ 1 - 6
Web/package.json

@@ -26,15 +26,10 @@
   },
   "devDependencies": {
     "@types/node": "^18.15.0",
-    "@types/urlencode": "^1.1.2",
-    "@vitejs/plugin-vue": "^5.0.5",
-    "@vue/compiler-sfc": "^3.0.5",
-    "rollup-plugin-external-globals": "^0.6.1",
+    "@vitejs/plugin-vue": "^5.0.0",
     "sass": "^1.35.1",
     "typescript": "^4.5.4",
-    "unplugin-vue-components": "^0.27.0",
     "vite": "^5.3.0",
-    "vite-plugin-svg-icons": "^1.1.0",
     "vite-plugin-vconsole": "^1.1.0"
   }
 }

+ 0 - 89
Web/src/typings/components.d.ts

@@ -1,89 +0,0 @@
-/* eslint-disable */
-// @ts-nocheck
-// Generated by unplugin-vue-components
-// Read more: https://github.com/vuejs/core/pull/3399
-export {}
-
-/* prettier-ignore */
-declare module 'vue' {
-  export interface GlobalComponents {
-    AAvatar: typeof import('ant-design-vue/es')['Avatar']
-    AButton: typeof import('ant-design-vue/es')['Button']
-    AButtonGroup: typeof import('ant-design-vue/es')['ButtonGroup']
-    ACol: typeof import('ant-design-vue/es')['Col']
-    ACollapse: typeof import('ant-design-vue/es')['Collapse']
-    ACollapsePanel: typeof import('ant-design-vue/es')['CollapsePanel']
-    AConfigProvider: typeof import('ant-design-vue/es')['ConfigProvider']
-    ADivider: typeof import('ant-design-vue/es')['Divider']
-    ADrawer: typeof import('ant-design-vue/es')['Drawer']
-    ADropdown: typeof import('ant-design-vue/es')['Dropdown']
-    AEmpty: typeof import('ant-design-vue/es')['Empty']
-    AForm: typeof import('ant-design-vue/es')['Form']
-    AFormItem: typeof import('ant-design-vue/es')['FormItem']
-    AImage: typeof import('ant-design-vue/es')['Image']
-    AInput: typeof import('ant-design-vue/es')['Input']
-    AInputNumber: typeof import('ant-design-vue/es')['InputNumber']
-    AInputSearch: typeof import('ant-design-vue/es')['InputSearch']
-    ALayout: typeof import('ant-design-vue/es')['Layout']
-    ALayoutContent: typeof import('ant-design-vue/es')['LayoutContent']
-    ALayoutHeader: typeof import('ant-design-vue/es')['LayoutHeader']
-    ALayoutSider: typeof import('ant-design-vue/es')['LayoutSider']
-    AMenu: typeof import('ant-design-vue/es')['Menu']
-    AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
-    AModal: typeof import('ant-design-vue/es')['Modal']
-    APopconfirm: typeof import('ant-design-vue/es')['Popconfirm']
-    APopover: typeof import('ant-design-vue/es')['Popover']
-    AProgress: typeof import('ant-design-vue/es')['Progress']
-    ARadio: typeof import('ant-design-vue/es')['Radio']
-    ARadioButton: typeof import('ant-design-vue/es')['RadioButton']
-    ARadioGroup: typeof import('ant-design-vue/es')['RadioGroup']
-    ARangePicker: typeof import('ant-design-vue/es')['RangePicker']
-    ARow: typeof import('ant-design-vue/es')['Row']
-    ASelect: typeof import('ant-design-vue/es')['Select']
-    ASelectOption: typeof import('ant-design-vue/es')['SelectOption']
-    ASpin: typeof import('ant-design-vue/es')['Spin']
-    ASwitch: typeof import('ant-design-vue/es')['Switch']
-    ATable: typeof import('ant-design-vue/es')['Table']
-    ATag: typeof import('ant-design-vue/es')['Tag']
-    ATextarea: typeof import('ant-design-vue/es')['Textarea']
-    ATimePicker: typeof import('ant-design-vue/es')['TimePicker']
-    ATooltip: typeof import('ant-design-vue/es')['Tooltip']
-    ATree: typeof import('ant-design-vue/es')['Tree']
-    ATreeNode: typeof import('ant-design-vue/es')['TreeNode']
-    AUpload: typeof import('ant-design-vue/es')['Upload']
-    CreatePlan: typeof import('./../components/task/CreatePlan.vue')['default']
-    DeviceFirmwareStatus: typeof import('./../components/devices/DeviceFirmwareStatus.vue')['default']
-    DeviceFirmwareUpgrade: typeof import('./../components/devices/device-upgrade/DeviceFirmwareUpgrade.vue')['default']
-    DeviceFirmwareUpgradeModal: typeof import('./../components/devices/device-upgrade/DeviceFirmwareUpgradeModal.vue')['default']
-    DeviceHmsDrawer: typeof import('./../components/devices/device-hms/DeviceHmsDrawer.vue')['default']
-    DeviceLogDetailModal: typeof import('./../components/devices/device-log/DeviceLogDetailModal.vue')['default']
-    DeviceLogUploadModal: typeof import('./../components/devices/device-log/DeviceLogUploadModal.vue')['default']
-    DeviceLogUploadRecordDrawer: typeof import('./../components/devices/device-log/DeviceLogUploadRecordDrawer.vue')['default']
-    DeviceSettingBox: typeof import('./../components/g-map/DeviceSettingBox.vue')['default']
-    DeviceSettingPopover: typeof import('./../components/g-map/DeviceSettingPopover.vue')['default']
-    DividerLine: typeof import('./../components/workspace/DividerLine.vue')['default']
-    DockControlPanel: typeof import('./../components/g-map/DockControlPanel.vue')['default']
-    DroneControlInfoPanel: typeof import('./../components/g-map/DroneControlInfoPanel.vue')['default']
-    DroneControlPanel: typeof import('./../components/g-map/DroneControlPanel.vue')['default']
-    DroneControlPopover: typeof import('./../components/g-map/DroneControlPopover.vue')['default']
-    FlightAreaActionIcon: typeof import('./../components/flight-area/FlightAreaActionIcon.vue')['default']
-    FlightAreaDevicePanel: typeof import('./../components/flight-area/FlightAreaDevicePanel.vue')['default']
-    FlightAreaIcon: typeof import('./../components/flight-area/FlightAreaIcon.vue')['default']
-    FlightAreaItem: typeof import('./../components/flight-area/FlightAreaItem.vue')['default']
-    FlightAreaPanel: typeof import('./../components/flight-area/FlightAreaPanel.vue')['default']
-    FlightAreaSyncPanel: typeof import('./../components/flight-area/FlightAreaSyncPanel.vue')['default']
-    GMap: typeof import('./../components/GMap.vue')['default']
-    LayersTree: typeof import('./../components/LayersTree.vue')['default']
-    LivestreamAgora: typeof import('./../components/livestream-agora.vue')['default']
-    LivestreamOthers: typeof import('./../components/livestream-others.vue')['default']
-    MediaPanel: typeof import('./../components/MediaPanel.vue')['default']
-    Nav: typeof import('./../components/common/nav.vue')['default']
-    RouterLink: typeof import('vue-router')['RouterLink']
-    RouterView: typeof import('vue-router')['RouterView']
-    Sidebar: typeof import('./../components/common/sidebar.vue')['default']
-    SvgIcon: typeof import('./../components/svgIcon.vue')['default']
-    TaskPanel: typeof import('./../components/task/TaskPanel.vue')['default']
-    Title: typeof import('./../components/workspace/Title.vue')['default']
-    Topbar: typeof import('./../components/common/topbar.vue')['default']
-  }
-}

+ 0 - 6
Web/vite.config.ts

@@ -1,8 +1,6 @@
 import vue from '@vitejs/plugin-vue'
 import path from 'path'
 import { ConfigEnv, defineConfig, UserConfigExport } from 'vite'
-import Components from 'unplugin-vue-components/vite';
-import { AntDesignVueResolver } from 'unplugin-vue-components/resolvers';
 import { viteVConsole } from 'vite-plugin-vconsole'
 
 export default ({ command, mode }: ConfigEnv): UserConfigExport => defineConfig({
@@ -33,10 +31,6 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => defineConfig(
   },
   plugins: [
     vue(),
-    Components({// 自动导入组件
-      resolvers: [AntDesignVueResolver({ importStyle: false })],
-      dts: 'src/typings/components.d.ts'
-    }),
     viteVConsole({
       entry: path.resolve(__dirname, './src/main.ts'), // 入口文件
       localEnabled: command === 'serve', // serve开发环境下

Some files were not shown because too many files changed in this diff