Skip to content

Commit

Permalink
chore: update alova version
Browse files Browse the repository at this point in the history
  • Loading branch information
chansee97 committed Aug 2, 2024
1 parent 70c43a2 commit de4cd17
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 28 deletions.
1 change: 1 addition & 0 deletions locales/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
"documentsVite": "Vite",
"documentsVue": "Vue",
"documentsVueuse": "VueUse (external link)",
"documentsNova": "Nova docs",
"echarts": "Echarts",
"editor": "Editor",
"editorMd": "MarkDown editor",
Expand Down
1 change: 1 addition & 0 deletions locales/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
"documentsVue": "Vue",
"documentsVite": "Vite",
"documentsVueuse": "VueUse(外链)",
"documentsNova": "Nova 文档",
"permission": "权限",
"permissionDemo": "权限示例",
"justSuper": "super可见",
Expand Down
33 changes: 16 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down Expand Up @@ -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"
Expand Down
7 changes: 2 additions & 5 deletions src/service/api/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -61,10 +61,7 @@ export function getBlob(url: string) {

/* 带进度的下载文件 */
export function downloadFile(url: string) {
const methodInstance = blankInstance.Get<Blob>(url, {
// 开启下载进度
enableDownload: true,
})
const methodInstance = blankInstance.Get<Blob>(url)
methodInstance.meta = {
// 标识为blob数据
isBlob: true,
Expand Down
8 changes: 4 additions & 4 deletions src/service/http/alova.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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,

Expand Down
2 changes: 1 addition & 1 deletion src/views/demo/fetch/components/DownLoadWithProgress.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { useRequest } from 'alova'
import { useRequest } from 'alova/client'
import {
downloadFile,
} from '@/service'
Expand Down
1 change: 1 addition & 0 deletions src/views/demo/fetch/components/TokenExpiration.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ async function expiredToken() {

<template>
<n-card title="Token Expiration" size="small">
注意观察第二次的请求,token已刷新
<n-button type="error" @click="expiredToken">
click
</n-button>
Expand Down
3 changes: 2 additions & 1 deletion src/views/demo/fetch/components/UseRequest.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script setup lang="ts">
import { useRequest } from 'alova'
import { useRequest } from 'alova/client'
import {
fetchGet,
} from '@/service'
Expand Down

0 comments on commit de4cd17

Please sign in to comment.