diff --git a/locales/en_US.json b/locales/en_US.json index 3b1cb55..1a4a0a0 100644 --- a/locales/en_US.json +++ b/locales/en_US.json @@ -112,6 +112,7 @@ "documentsVite": "Vite", "documentsVue": "Vue", "documentsVueuse": "VueUse (external link)", + "documentsNova": "Nova docs", "echarts": "Echarts", "editor": "Editor", "editorMd": "MarkDown editor", diff --git a/locales/zh_CN.json b/locales/zh_CN.json index daae9f2..d985e03 100644 --- a/locales/zh_CN.json +++ b/locales/zh_CN.json @@ -140,6 +140,7 @@ "documentsVue": "Vue", "documentsVite": "Vite", "documentsVueuse": "VueUse(外链)", + "documentsNova": "Nova 文档", "permission": "权限", "permissionDemo": "权限示例", "justSuper": "super可见", diff --git a/package.json b/package.json index 451b094..243b2fd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "nova-admin", "type": "module", - "version": "0.9.6", + "version": "0.9.7", "private": true, "description": "a clean and concise back-end management template based on Vue3, Vite5, Typescript, and Naive UI.", "author": { @@ -50,42 +50,41 @@ "sizecheck": "npx vite-bundle-visualizer" }, "dependencies": { - "@alova/scene-vue": "^1.6.0", "@vueuse/core": "^10.11.0", - "alova": "^2.21.3", + "alova": "^3.0.4", "colord": "^2.9.3", "echarts": "^5.5.1", "md-editor-v3": "^4.15.2", - "pinia": "^2.1.7", + "pinia": "^2.2.0", "pinia-plugin-persistedstate": "^3.2.1", "quill": "^2.0.2", "radash": "^12.1.0", - "vue": "^3.4.33", + "vue": "^3.4.35", "vue-i18n": "^9.13.1", - "vue-router": "^4.4.0" + "vue-router": "^4.4.2" }, "devDependencies": { - "@antfu/eslint-config": "^2.23.0", + "@antfu/eslint-config": "^2.24.1", "@iconify-json/icon-park-outline": "^1.1.15", "@iconify/vue": "^4.1.2", - "@types/node": "^20.14.11", - "@vitejs/plugin-vue": "^5.0.5", + "@types/node": "^22.1.0", + "@vitejs/plugin-vue": "^5.1.2", "@vitejs/plugin-vue-jsx": "^4.0.0", - "eslint": "^9.7.0", + "eslint": "^9.8.0", "lint-staged": "^15.2.7", "naive-ui": "^2.39.0", "sass": "^1.77.8", "simple-git-hooks": "^2.11.1", - "typescript": "^5.5.3", - "unocss": "^0.61.5", - "unplugin-auto-import": "^0.18.0", - "unplugin-icons": "^0.19.0", + "typescript": "^5.5.4", + "unocss": "^0.61.9", + "unplugin-auto-import": "^0.18.2", + "unplugin-icons": "^0.19.1", "unplugin-vue-components": "^0.27.3", - "vite": "^5.3.4", + "vite": "^5.3.5", "vite-bundle-visualizer": "^1.2.1", "vite-plugin-compression": "^0.5.1", - "vite-plugin-vue-devtools": "7.3.6", - "vue-tsc": "^2.0.26" + "vite-plugin-vue-devtools": "7.3.7", + "vue-tsc": "^2.0.29" }, "simple-git-hooks": { "pre-commit": "pnpm lint-staged" diff --git a/src/service/api/test.ts b/src/service/api/test.ts index 0d76658..1077687 100644 --- a/src/service/api/test.ts +++ b/src/service/api/test.ts @@ -36,7 +36,7 @@ export function withoutToken() { /* 接口数据转换 */ export function dictData() { return request.Get('/getDictData', { - transformData(rawData, _headers) { + transform(rawData, _headers) { const response = rawData as any return { ...response, @@ -61,10 +61,7 @@ export function getBlob(url: string) { /* 带进度的下载文件 */ export function downloadFile(url: string) { - const methodInstance = blankInstance.Get(url, { - // 开启下载进度 - enableDownload: true, - }) + const methodInstance = blankInstance.Get(url) methodInstance.meta = { // 标识为blob数据 isBlob: true, diff --git a/src/service/http/alova.ts b/src/service/http/alova.ts index 3a0aff2..5eb8147 100644 --- a/src/service/http/alova.ts +++ b/src/service/http/alova.ts @@ -1,7 +1,7 @@ import { createAlova } from 'alova' import VueHook from 'alova/vue' -import GlobalFetch from 'alova/GlobalFetch' -import { createServerTokenAuthentication } from '@alova/scene-vue' +import adapterFetch from 'alova/fetch' +import { createServerTokenAuthentication } from 'alova/client' import { handleBusinessError, handleRefreshToken, @@ -50,8 +50,8 @@ export function createAlovaInstance( return createAlova({ statesHook: VueHook, - requestAdapter: GlobalFetch(), - localCache: null, + requestAdapter: adapterFetch(), + cacheFor: null, baseURL: _alovaConfig.baseURL, timeout: _alovaConfig.timeout, diff --git a/src/views/demo/fetch/components/DownLoadWithProgress.vue b/src/views/demo/fetch/components/DownLoadWithProgress.vue index 8697897..1ef8327 100644 --- a/src/views/demo/fetch/components/DownLoadWithProgress.vue +++ b/src/views/demo/fetch/components/DownLoadWithProgress.vue @@ -1,5 +1,5 @@