Bladeren bron

依赖包升级,删除excel

tongshangming 3 maanden geleden
bovenliggende
commit
27b287d924

+ 0 - 2
.env.production

@@ -1,4 +1,2 @@
-NODE_ENV = 'production'
-
 VITE_BASE_API = /admin
 VITE_BASE_PATH = 

+ 71 - 0
env.d.ts

@@ -3,6 +3,77 @@
 declare module 'splitpanes'
 declare module 'element-plus/dist/locale/zh-cn.mjs'
 
+declare module 'vite-plugin-eslint' {
+  import type { Plugin } from 'vite'
+
+  interface EslintPluginOptions {
+    /**
+     * Enable linting on start
+     * @default true
+     */
+    lintOnStart?: boolean
+    /**
+     * Enable linting on dev server start
+     * @default true
+     */
+    lintOnDev?: boolean
+    /**
+     * Enable linting on build
+     * @default true
+     */
+    lintOnBuild?: boolean
+    /**
+     * Emit errors instead of warnings
+     * @default false
+     */
+    emitError?: boolean
+    /**
+     * Emit warnings as errors
+     * @default false
+     */
+    emitWarning?: boolean
+    /**
+     * Cache errors and warnings
+     * @default true
+     */
+    cache?: boolean
+    /**
+     * Path to eslint cache file
+     * @default node_modules/.vite/vite-plugin-eslint/cache.json
+     */
+    cacheLocation?: string
+    /**
+     * Path to eslint config file
+     * @default undefined
+     */
+    configFile?: string
+    /**
+     * Fix errors on save
+     * @default false
+     */
+    fix?: boolean
+    /**
+     * Path to eslint ignore file
+     * @default undefined
+     */
+    ignorePath?: string
+    /**
+     * List of files to include
+     * @default ['**\/*.{js,jsx,ts,tsx,vue}']
+     */
+    include?: string | string[]
+    /**
+     * List of files to exclude
+     * @default ['node_modules']
+     */
+    exclude?: string | string[]
+  }
+
+  function eslintPlugin(options?: EslintPluginOptions): Plugin
+
+  export default eslintPlugin
+}
+
 declare interface Window {
   // 是否存在无界
   __POWERED_BY_WUJIE__?: boolean

+ 27 - 27
package.json

@@ -1,6 +1,6 @@
 {
   "name": "fs-admin",
-  "version": "2.5.6",
+  "version": "2.6.0",
   "type": "module",
   "scripts": {
     "dev": "vite --host",
@@ -14,38 +14,38 @@
     "micro": "plop micro"
   },
   "dependencies": {
-    "@element-plus/icons-vue": "^2.3.1",
+    "@amap/amap-jsapi-loader": "^1.0.1",
+    "@element-plus/icons-vue": "^2.3.2",
     "@fskj-admin/core": "^1.5.11",
     "@fskj-admin/micro": "^0.1.0",
     "@icon-park/vue-next": "^1.4.2",
-    "@vueuse/core": "^13.5.0",
-    "@vxe-ui/plugin-render-element": "^4.0.11",
-    "@wangeditor-next/editor": "^5.6.35",
+    "@vueuse/core": "^13.6.0",
+    "@vxe-ui/plugin-render-element": "^4.0.16",
+    "@wangeditor-next/editor": "^5.6.43",
     "@wangeditor-next/editor-for-vue": "^5.1.14",
-    "axios": "^1.10.0",
+    "axios": "^1.11.0",
     "dayjs": "^1.11.13",
-    "element-plus": "^2.10.4",
-    "exceljs": "^4.4.0",
+    "element-plus": "^2.10.6",
     "nprogress": "^0.2.0",
     "pinia": "^3.0.3",
-    "splitpanes": "^4.0.3",
-    "vue": "^3.5.13",
+    "splitpanes": "^4.0.4",
+    "vue": "^3.5.18",
     "vue-cropper": "^1.1.4",
     "vue-router": "^4.5.1",
-    "vxe-pc-ui": "^4.7.12",
-    "vxe-table": "^4.14.4",
-    "wujie-vue3": "^1.0.28",
-    "xe-utils": "^3.7.4"
+    "vxe-pc-ui": "^4.8.13",
+    "vxe-table": "^4.15.6",
+    "wujie-vue3": "^1.0.29",
+    "xe-utils": "^3.7.8"
   },
   "devDependencies": {
-    "@iconify-json/ep": "^1.2.2",
-    "@rushstack/eslint-patch": "^1.11.0",
-    "@tsconfig/node20": "^20.1.5",
-    "@types/node": "^20.17.47",
+    "@iconify-json/ep": "^1.2.3",
+    "@rushstack/eslint-patch": "^1.12.0",
+    "@tsconfig/node20": "^20.1.6",
+    "@types/node": "^20.19.10",
     "@types/nprogress": "^0.2.3",
-    "@types/qs": "^6.9.18",
-    "@vitejs/plugin-vue": "^5.2.4",
-    "@vitejs/plugin-vue-jsx": "^3.1.0",
+    "@types/qs": "^6.14.0",
+    "@vitejs/plugin-vue": "^6.0.1",
+    "@vitejs/plugin-vue-jsx": "^5.0.1",
     "@vue/eslint-config-prettier": "^9.0.0",
     "@vue/eslint-config-typescript": "^12.0.0",
     "@vue/tsconfig": "^0.5.1",
@@ -53,20 +53,20 @@
     "eslint-plugin-vue": "^9.33.0",
     "npm-run-all": "^4.1.5",
     "plop": "^4.0.1",
-    "prettier": "^3.5.3",
-    "sass": "^1.88.0",
+    "prettier": "^3.6.2",
+    "sass": "^1.90.0",
     "typescript": "~5.3.3",
-    "unocss": "^0.61.9",
+    "unocss": "^66.4.2",
     "unplugin-auto-import": "^0.17.8",
     "unplugin-icons": "^0.19.3",
     "unplugin-vue-components": "^0.26.0",
     "unplugin-vue-define-options": "^1.5.5",
-    "vite": "^5.4.19",
+    "vite": "^7.1.2",
     "vite-plugin-eslint": "^1.8.1",
     "vite-plugin-lazy-import": "^1.0.7",
     "vite-plugin-style-import": "^2.0.0",
     "vite-plugin-svg-icons": "^2.0.1",
-    "vite-plugin-vue-devtools": "^7.7.6",
-    "vue-tsc": "^2.2.10"
+    "vite-plugin-vue-devtools": "^8.0.0",
+    "vue-tsc": "^3.0.5"
   }
 }

File diff suppressed because it is too large
+ 241 - 668
pnpm-lock.yaml


+ 1 - 1
src/components/FsMapPicker/components/amap.vue

@@ -1,5 +1,5 @@
 <script setup lang="ts">
-// import AMapLoader from '@amap/amap-jsapi-loader'
+import AMapLoader from '@amap/amap-jsapi-loader'
 import { CircleCheck, Location, Plus, Search } from '@element-plus/icons-vue'
 import { ElMessage, type AutocompleteInstance } from 'element-plus'
 

+ 5 - 3
src/components/FsMapPicker/index.vue

@@ -1,10 +1,12 @@
 <script setup lang="ts">
 import type { MapPickerProps } from './props'
-import { mapPickerEmits } from './props'
 import Amap from './components/amap.vue'
 import BaiDu from './components/baidu.vue'
 
-const emits = defineEmits(mapPickerEmits)
+const emits = defineEmits<{
+  (e: 'done', data: any): void
+  (e: 'update:modelValue', value: boolean): void
+}>()
 
 const props = withDefaults(defineProps<MapPickerProps>(), {
   type: 'amap',
@@ -15,7 +17,7 @@ const props = withDefaults(defineProps<MapPickerProps>(), {
   search: true,
   poi: true,
   poiRadius: 1000,
-  center: [112.569129, 37.863392],
+  center: (): (string | number)[] => [112.569129, 37.863392],
   zoom: 11,
   selectedZoom: 17,
   message: '请选择位置',

+ 0 - 8
src/components/FsMapPicker/props.ts

@@ -32,11 +32,3 @@ export interface MapPickerProps {
   // 输入建议的城市范围
   suggestionCity?: string
 }
-
-/* 事件 */
-export const mapPickerEmits = {
-  // 选择事件
-  done: (_value: any) => true,
-  // 修改modelValue
-  'update:modelValue': (_value: any) => true
-}

+ 1 - 1
src/components/core/GlobalSetting.vue

@@ -61,7 +61,7 @@ const themeNav = computed(() => themeStore.themeNav)
       <el-color-picker
         :model-value="themeColor"
         :predefine="themeColors"
-        @change="(value: string) => themeStore.setThemeColor(value)"
+        @change="(value: any) => themeStore.setThemeColor(value)"
       />
     </el-space>
 

+ 18 - 10
src/components/form/TableSelect.vue

@@ -1,19 +1,19 @@
 <script setup lang="ts">
 import { ElPopover } from 'element-plus'
-import type { VxeTableInstance } from 'vxe-table'
+import type { VxeTableInstance, VxeColumnProps } from 'vxe-table'
 import type { PopoverProps, TagProps } from 'element-plus'
 
-interface TableColumn {
+interface TableColumn extends VxeColumnProps {
   // 类型
-  type?: string
+  type?: VxeColumnProps['type']
   // 列名
-  field?: string
+  field?: VxeColumnProps['field']
   // 表格宽度
-  width?: number | string
+  width?: VxeColumnProps['width']
   // 对齐方式
-  align?: string
+  align?: VxeColumnProps['align']
   // 标题
-  title?: string
+  title?: VxeColumnProps['title']
   // 插槽
   slot?: string
 }
@@ -24,7 +24,7 @@ interface TableConfig {
   // 表格数据
   request: (...args: any) => Promise<any>
   // 每页显示条数
-  pageSize?: Number
+  pageSize?: number
 }
 
 interface TableSelectProps {
@@ -321,7 +321,7 @@ defineExpose({
           :placeholder="multiple && !isEmpty ? '' : placeholder"
           :readonly="true"
           :validateEvent="false"
-          :modelValue="multiple ? '' : selectLabel"
+          :modelValue="multiple ? '' : (selectLabel as string)"
           @focus="onFocus"
           @blur="onBlur"
         >
@@ -377,7 +377,15 @@ defineExpose({
     >
       <vxe-column type="checkbox" width="60" v-if="multiple"></vxe-column>
       <vxe-column type="radio" width="40" v-else> </vxe-column>
-      <vxe-column v-for="(item, index) in tableConfig?.column" :key="index" v-bind="item">
+      <vxe-column
+        v-for="(item, index) in tableConfig?.column"
+        :key="index"
+        :type="item.type"
+        :field="item.field"
+        :width="item.width"
+        :align="item.align"
+        :title="item.title"
+      >
         <template #default="slotProps" v-if="item.slot">
           <slot :name="item.slot" v-bind="slotProps || {}"></slot>
         </template>

+ 0 - 190
src/hooks/useExcel.ts

@@ -1,190 +0,0 @@
-import ExcelJS from 'exceljs'
-
-/* 导出的参数 */
-export interface IExcel {
-  // 文件名称
-  fileName?: string
-  // 表头数据
-  rows: Array<Array<string | number>>
-  // 表格数据
-  data: Array<Array<any>>
-  // 表格列宽
-  width?: Array<number>
-  // 需要合并的表格
-  merge?: Array<any>
-}
-
-export const useExcel = () => {
-  /**
-   * 导入excel
-   * @param file 传入文件
-   * @param fileMaxSize number 最大文件大小 单位 MB
-   */
-  const importExcel = (file: File, fileMaxSize: number = 20) => {
-    return new Promise((resolve, reject) => {
-      if (
-        !['application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'].includes(
-          file.type
-        )
-      ) {
-        reject(new Error('只能选择 excel 文件'))
-        return
-      }
-      if (file.size / 1024 / 1024 > fileMaxSize) {
-        reject(new Error('大小不能超过 20MB'))
-        return
-      }
-      const reader = new FileReader()
-      reader.onload = e => {
-        const workbook = new ExcelJS.Workbook()
-        workbook.xlsx.load(e.target?.result as any).then(() => {
-          const title: string[] = []
-          const list: Record<string, any>[] = []
-          workbook.eachSheet(sheet => {
-            list.splice(0, list.length)
-            sheet.eachRow({ includeEmpty: true }, row => {
-              title.splice(0, title.length)
-              const item: Record<string, any> = {}
-              row.eachCell({ includeEmpty: true }, cell => {
-                const key = cell.address.slice(0, -String(cell.row).length)
-                title.push(key)
-                const isMerged = cell.isMerged && cell.address !== cell.master.address
-                item[key] = {
-                  value: cell.value,
-                  colspan: isMerged ? 0 : 1,
-                  rowspan: isMerged ? 0 : 1
-                }
-              })
-              list.push(item)
-            })
-            // 生成表格的跨行跨列
-            sheet.eachRow({ includeEmpty: true }, row => {
-              row.eachCell({ includeEmpty: true }, cell => {
-                const master = cell.master
-                if (cell.isMerged && cell.address !== master.address) {
-                  const mk = master.address.slice(0, -String(master.row).length)
-                  const mItem = list[Number(master.row) - 1][mk]
-                  const rs = Math.abs(Number(cell.row) - Number(master.row)) + 1
-                  rs > mItem.rowspan && (mItem.rowspan = rs)
-                  const cs = Math.abs(Number(cell.col) - Number(master.col)) + 1
-                  cs > mItem.colspan && (mItem.colspan = cs)
-                }
-              })
-            })
-          })
-          resolve({ title, list })
-        })
-      }
-      reader.readAsArrayBuffer(file)
-    })
-  }
-
-  /**
-   * 导出excel
-   */
-  const exportExcel = (options: IExcel) => {
-    return new Promise((resolve, reject) => {
-      options = Object.assign(
-        {
-          fileName: options.fileName || Date.now()
-        },
-        options
-      )
-      const workbook = new ExcelJS.Workbook()
-      const sheet = workbook.addWorksheet('Sheet1')
-      if (!(Array.isArray(options.rows) && Array.isArray(options.rows[0]))) {
-        reject(new Error('表头数据必须为二维数组'))
-        return
-      }
-      if (!Array.isArray(options.data)) {
-        reject(new Error('表格数据必须为数组'))
-        return
-      }
-      // 设置表格宽度
-      const widths =
-        Array.isArray(options.width) && options.width.length
-          ? options.width
-          : Array.from(Array(options.rows[0].length).keys()).map(() => 16)
-
-      // 设置表头
-      options.rows.forEach(row => {
-        sheet.addRow(row)
-      })
-
-      // 设置列宽
-      options.data.forEach(item => {
-        sheet.addRow(item)
-      })
-
-      // 设置列宽
-      widths.forEach((width, index) => {
-        sheet.getColumn(index + 1).width = width
-      })
-
-      // 设置样式
-      sheet.eachRow({ includeEmpty: true }, (row, rowIndex) => {
-        row.height = 20
-        row.eachCell({ includeEmpty: true }, cell => {
-          cell.border = {
-            top: { style: 'thin' },
-            left: { style: 'thin' },
-            bottom: { style: 'thin' },
-            right: { style: 'thin' }
-          }
-          cell.alignment = {
-            vertical: 'middle',
-            horizontal: 'center'
-          }
-          cell.font = { size: 12, bold: rowIndex < options.rows.length }
-        })
-      })
-
-      // 合并单元格
-      if (Array.isArray(options.merge)) {
-        options.merge.forEach(item => {
-          sheet.mergeCells(item)
-        })
-      }
-      // 下载文件
-      workbook.xlsx.writeBuffer().then(data => {
-        download(data, `${options.fileName}.xlsx`)
-      })
-    })
-  }
-
-  /* 转为二维数组 */
-  const toTwoArray = (list: Record<string, any>[]) => {
-    const arr: Array<Array<string | number | null | undefined>> = []
-    list.forEach((item: any) => {
-      const brr = Object.values(item).map((ite: any) => ite.value)
-      arr.push(brr)
-    })
-    return arr
-  }
-
-  /**
-   * 下载文件
-   * @param data 二进制数据,如果传入是http地址,则直接下载
-   * @param name 文件名
-   * @param type 文件类型
-   */
-  const download = (data: Blob | ArrayBuffer | string, name: string, type?: string) => {
-    let url = ''
-    if (typeof data === 'string') {
-      url = data
-    } else {
-      const blob = new Blob([data], { type: type || 'application/octet-stream' })
-      url = window.URL.createObjectURL(blob)
-    }
-    const a = document.createElement('a')
-    a.href = url
-    a.download = name
-    a.style.display = 'none'
-    document.body.appendChild(a)
-    a.click()
-    document.body.removeChild(a)
-    URL.revokeObjectURL(url)
-  }
-
-  return { importExcel, toTwoArray, exportExcel, download }
-}

+ 0 - 9
src/router/asyncRouter.ts

@@ -299,15 +299,6 @@ const asyncRouter: RouteRecordRaw[] = [
           icon: 'MoreFilled'
         }
       },
-      {
-        path: '/extension/excel',
-        name: 'excel',
-        component: () => import('@/views/extension/excel/index.vue'),
-        meta: {
-          title: '导入导出Excel',
-          icon: 'MoreFilled'
-        }
-      },
       {
         path: '/extension/checkCard',
         name: 'checkCard',

+ 0 - 156
src/views/extension/excel/export.vue

@@ -1,156 +0,0 @@
-<script setup lang="ts">
-import { ElMessage } from 'element-plus'
-import { useExcel, type IExcel } from '@/hooks/useExcel'
-
-const { exportExcel } = useExcel()
-
-const tableData = [
-  {
-    name: '张三',
-    province: '山西',
-    city: '太原',
-    zone: '小店区',
-    street: '平阳路街道',
-    address: '平阳景苑30栋1单元',
-    price: 18
-  },
-  {
-    name: '李四',
-    province: '山东',
-    city: '青岛',
-    zone: '市北区',
-    street: '香港中路',
-    address: '中心大厦1号楼2单元',
-    price: 85
-  },
-  {
-    name: '王五',
-    province: '浙江',
-    city: '杭州',
-    zone: '西湖区',
-    street: '文三路',
-    address: '西溪风景区3栋9单元',
-    price: 8
-  },
-  {
-    name: '赵六',
-    province: '福建',
-    city: '泉州',
-    zone: '丰泽区',
-    street: '南洋街道',
-    address: '南洋村6幢1单元',
-    price: 16
-  },
-  {
-    name: '孙七',
-    province: '河北',
-    city: '武汉',
-    zone: '武昌区',
-    street: '武昌大道',
-    address: '两湖花园16幢2单元',
-    price: 12
-  },
-  {
-    name: '周八',
-    province: '河北',
-    city: '石家庄',
-    zone: '黄山区',
-    street: '汤口镇',
-    address: '温泉村21号',
-    price: 11
-  }
-]
-
-// 选中数据
-const selects = ref([])
-
-/* 导出 */
-const exportFile = () => {
-  const excelParams: IExcel = {
-    fileName: '用户数据',
-    rows: [['用户名', '省', '市', '区', '街道', '详细地址', '金额']],
-    width: [16, 16, 16, 16, 30, 40, 15],
-    data: []
-  }
-  tableData.forEach((item: any) => {
-    excelParams.data.push([item.name, item.province, item.city, item.zone, item.street, item.address, item.price])
-  })
-  exportExcel(excelParams)
-    .then(() => {
-      ElMessage.success('导出成功')
-    })
-    .catch(e => {
-      ElMessage.error(e.message)
-    })
-}
-
-/* 导出合并表格 */
-const exportFile2 = () => {
-  const excelParams: IExcel = {
-    fileName: '用户数据',
-    rows: [
-      ['用户名', '地址', '', '', '', '', '金额'],
-      ['', '省', '市', '区', '街道', '详细地址', '']
-    ],
-    width: [16, 16, 16, 16, 30, 40, 15],
-    data: [],
-    merge: ['A1:A2', 'B1:F1', 'G1:G2'] // 传递合并参数
-  }
-  tableData.forEach((item: any) => {
-    excelParams.data.push([item.name, item.province, item.city, item.zone, item.street, item.address, item.price])
-  })
-  exportExcel(excelParams)
-    .then(() => {
-      console.log()
-    })
-    .catch(e => {
-      ElMessage.error(e.message)
-    })
-}
-
-/* 选择导出 */
-const exportFile3 = () => {
-  const excelParams: IExcel = {
-    fileName: '用户数据',
-    rows: [['用户名', '省', '市', '区', '街道', '详细地址', '金额']],
-    width: [16, 16, 16, 16, 30, 40, 15],
-    data: []
-  }
-  selects.value.forEach((item: any) => {
-    excelParams.data.push([item.name, item.province, item.city, item.zone, item.street, item.address, item.price])
-  })
-  exportExcel(excelParams)
-    .then(() => {
-      console.log()
-    })
-    .catch(e => {
-      ElMessage.error(e.message)
-    })
-}
-
-const handleSelectionChange = (data: any) => {
-  selects.value = data
-}
-</script>
-
-<template>
-  <el-card shadow="never">
-    <el-button type="primary" @click="exportFile">导出</el-button>
-    <el-button type="primary" @click="exportFile2">导出合并表格</el-button>
-    <el-button type="primary" :disabled="!selects.length" @click="exportFile3">导出选中</el-button>
-    <el-table :data="tableData" border style="width: 100%" class="mt-3" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="50" />
-      <el-table-column prop="name" label="用户名"></el-table-column>
-      <el-table-column label="地址" align="center">
-        <el-table-column prop="province" label="省" />
-        <el-table-column prop="city" label="市" />
-        <el-table-column prop="zone" label="区" />
-        <el-table-column prop="street" label="街道" />
-        <el-table-column prop="address" label="详细地址" />
-      </el-table-column>
-      <el-table-column prop="price" label="金额" />
-    </el-table>
-  </el-card>
-</template>
-
-<style scoped></style>

+ 0 - 82
src/views/extension/excel/import.vue

@@ -1,82 +0,0 @@
-<script setup lang="ts">
-import { ElMessage } from 'element-plus'
-import { useExcel } from '@/hooks/useExcel'
-
-const { importExcel, toTwoArray } = useExcel()
-
-// 表格数据
-const tableData = ref<Record<string, any>[]>([])
-// 表格二维数据
-const tableDataTwo = ref<Record<string, any>[]>([])
-// 表头数据
-const column = ref<Array<string>>(['A', 'B', 'C', 'D', 'E', 'F', 'G'])
-
-const importFile = (file: File) => {
-  importExcel(file).then(({ title, list }: any) => {
-    column.value = title
-    tableData.value = list
-
-    tableDataTwo.value = toTwoArray(list)
-  })
-
-  return false
-}
-
-const getTwoData = () => {
-  console.log(tableDataTwo.value)
-  ElMessage.success('数据已打印在控制台')
-}
-</script>
-
-<template>
-  <el-card shadow="never">
-    <div class="flex">
-      <el-upload action="" accept=".xls,.xlsx" :show-upload-list="false" :before-upload="importFile">
-        <el-button type="primary">导入</el-button>
-      </el-upload>
-      <el-button type="primary" @click="getTwoData" class="ml-3">获取表格二维数据</el-button>
-    </div>
-    <table class="table" border="1">
-      <colgroup>
-        <col width="52" />
-        <col v-for="item in column" :key="item" />
-      </colgroup>
-      <thead>
-        <tr>
-          <th></th>
-          <th v-for="item in column" :key="item" style="text-align: center">
-            {{ item }}
-          </th>
-        </tr>
-      </thead>
-      <tbody>
-        <tr v-for="(item, index) in tableData" :key="index">
-          <td style="text-align: center">{{ index + 1 }}</td>
-          <template v-for="key in column">
-            <td
-              v-if="item[key]?.colspan !== 0 && item[key].rowspan !== 0"
-              :key="key"
-              :colspan="item[key].colspan"
-              :rowspan="item[key].rowspan"
-              style="text-align: center"
-            >
-              {{ item[key].value }}
-            </td>
-          </template>
-        </tr>
-        <tr v-if="!tableData.length">
-          <td :colspan="column.length + 1" style="text-align: center; background: none">暂无数据</td>
-        </tr>
-      </tbody>
-    </table>
-  </el-card>
-</template>
-
-<style scoped>
-.table {
-  width: 100%;
-  border-collapse: collapse;
-  border-spacing: 1px;
-  border-color: var(--el-border-color);
-}
-</style>

+ 0 - 17
src/views/extension/excel/index.vue

@@ -1,17 +0,0 @@
-<script setup lang="ts">
-import ImportExcel from './import.vue'
-import ExportExcel from './export.vue'
-</script>
-
-<template>
-  <ExportExcel class="mb-3" />
-  <ImportExcel />
-</template>
-
-<style scoped>
-.table {
-  width: 100%;
-  border-collapse: collapse;
-  border-spacing: 1px;
-}
-</style>

+ 3 - 3
src/views/extension/map/amapTrack.vue

@@ -1,5 +1,5 @@
 <script lang="ts" setup>
-// import AMapLoader from '@amap/amap-jsapi-loader'
+import AMapLoader from '@amap/amap-jsapi-loader'
 
 /* 地图容器 */
 const trackMapRef = ref<HTMLElement | null>(null)
@@ -40,7 +40,7 @@ const renderTrackMap = () => {
     version: '2.0',
     plugins: ['AMap.MoveAnimation', 'AMap.Marker', 'AMap.Polyline']
   })
-    .then(AMap => {
+    .then((AMap: any) => {
       // 渲染地图
       const option = {
         zoom: 17,
@@ -79,7 +79,7 @@ const renderTrackMap = () => {
       // 地图自适应
       mapInsTrack.setFitView()
     })
-    .catch(e => {
+    .catch((e: any) => {
       console.error(e)
     })
 }

+ 0 - 3
src/views/form/Basic.vue

@@ -401,9 +401,6 @@ const handleInputConfirm = () => {
 
 <template>
   <div class="h-full bg-white p-16px pt-20px overflow-auto">
-    <form-title type="primary" class="py-10px mb-4 w-50%">
-      <template #default>基础表单</template>
-    </form-title>
     <pro-form :formConfig="formConfig" :formData="formData" :create="create" :update="update" ref="proFormRef">
       <template #prepend1> test1 </template>
       <template #append1> test1 </template>

+ 4 - 4
src/views/user/UserInfo.vue

@@ -153,10 +153,10 @@ const goCropper = () => {
 }
 const CRUD: ICRUD = {
   create(data) {
-    return new Promise(resolve => console.log(data))
+    return new Promise(() => console.log(data))
   },
   update(data) {
-    return new Promise(resolve => console.log(data))
+    return new Promise(() => console.log(data))
   },
   getList() {
     return new Promise(resolve => {
@@ -167,10 +167,10 @@ const CRUD: ICRUD = {
     })
   },
   delete(data) {
-    return new Promise(resolve => console.log(data))
+    return new Promise(() => console.log(data))
   },
   deleteBatch(data) {
-    return new Promise(resolve => console.log(data))
+    return new Promise(() => console.log(data))
   }
 }
 

+ 1 - 1
tsconfig.json

@@ -18,7 +18,7 @@
       "unplugin-vue-define-options/macros-global"
     ],
     "jsx": "preserve",
-    "moduleResolution": "node"
+    "moduleResolution": "bundler"
   },
   "references": [
     {

+ 1 - 1
tsconfig.node.json

@@ -8,7 +8,7 @@
   ],
   "compilerOptions": {
     "composite": true,
-    "moduleResolution": "node",
+    "moduleResolution": "bundler",
     "module": "ESNext",
     "types": [
       "node"

+ 8 - 4
vite.config.ts

@@ -72,10 +72,14 @@ export default defineConfig(({ mode }) => {
     build: {
       rollupOptions: {
         output: {
-          manualChunks: id => {
-            if (id.includes('node_modules')) {
-              return 'vender'
-            }
+          manualChunks: {
+            vueChunk: ['vue', 'vue-router', 'pinia', '@vueuse/core'],
+            elementPlusChunk: ['element-plus', '@element-plus/icons-vue'],
+            mapChunk: ['@amap/amap-jsapi-loader'],
+            fsChunk: ['@fskj-admin/core', '@fskj-admin/micro'],
+            tableChunk: ['vxe-table', 'vxe-pc-ui', 'xe-utils', '@vxe-ui/plugin-render-element'],
+            editorChunk: ['@wangeditor-next/editor', '@wangeditor-next/editor-for-vue'],
+            otherChunk: ['axios', 'dayjs', 'wujie-vue3']
           }
         }
       }

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