mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-06-06 00:18:51 +08:00
chore: update deps
This commit is contained in:
parent
1585606a2f
commit
f8fde9107b
1170
package-lock.json
generated
1170
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
@ -18,7 +18,7 @@
|
||||
"@amap/amap-jsapi-loader": "^1.0.1",
|
||||
"@logicflow/core": "^0.4.6",
|
||||
"@logicflow/extension": "^0.4.6",
|
||||
"@vueuse/core": "^4.9.1",
|
||||
"@vueuse/core": "^5.0.3",
|
||||
"await-to-js": "^3.0.0",
|
||||
"axios": "^0.21.1",
|
||||
"cropperjs": "^1.5.11",
|
||||
@ -33,7 +33,7 @@
|
||||
"nprogress": "^0.2.0",
|
||||
"path": "^0.12.7",
|
||||
"path-to-regexp": "^6.2.0",
|
||||
"pinia": "^2.0.0-alpha.19",
|
||||
"pinia": "^2.0.0-beta.2",
|
||||
"resize-observer-polyfill": "^1.5.1",
|
||||
"v-contextmenu": "^3.0.0",
|
||||
"vue": "^3.1.1",
|
||||
@ -41,19 +41,19 @@
|
||||
"vue-json-pretty": "^2.0.2",
|
||||
"vue-router": "^4.0.8",
|
||||
"vue-types": "^3.0.2",
|
||||
"vuedraggable": "^4.0.1",
|
||||
"vxe-table": "^4.0.18-beta.0",
|
||||
"vuedraggable": "^4.0.3",
|
||||
"vxe-table": "^4.0.21-beta.0",
|
||||
"wangeditor": "^4.0.3",
|
||||
"xe-ajax": "^4.0.5",
|
||||
"xe-utils": "^3.2.1",
|
||||
"xgplayer": "^2.20.3"
|
||||
"xgplayer": "^2.22.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mockjs": "^1.0.3",
|
||||
"@types/node": "^14.14.14",
|
||||
"@types/nprogress": "^0.2.0",
|
||||
"@vitejs/plugin-vue": "^1.2.3",
|
||||
"@vitejs/plugin-vue-jsx": "^1.1.3",
|
||||
"@vitejs/plugin-vue-jsx": "^1.1.5",
|
||||
"@vue/compiler-sfc": "^3.1.1",
|
||||
"autoprefixer": "^10.2.4",
|
||||
"babel-plugin-transform-remove-console": "^6.9.4",
|
||||
|
@ -1,31 +1,31 @@
|
||||
import { AxiosRequestConfig } from "axios"
|
||||
import { excludeProps } from "./utils"
|
||||
import { AxiosRequestConfig } from "axios";
|
||||
import { excludeProps } from "./utils";
|
||||
/**
|
||||
* 默认配置
|
||||
*/
|
||||
export const defaultConfig: AxiosRequestConfig = {
|
||||
baseURL: '/api',
|
||||
baseURL: "",
|
||||
timeout: 10000, //10秒超时
|
||||
headers: {
|
||||
Accept: "application/json, text/plain, */*",
|
||||
"Content-Type": "application/json",
|
||||
"X-Requested-With": "XMLHttpRequest"
|
||||
"X-Requested-With": "XMLHttpRequest",
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
export function genConfig(config?: AxiosRequestConfig): AxiosRequestConfig {
|
||||
if (!config) {
|
||||
return defaultConfig
|
||||
return defaultConfig;
|
||||
}
|
||||
|
||||
const { headers } = config
|
||||
const { headers } = config;
|
||||
if (headers && typeof headers === "object") {
|
||||
defaultConfig.headers = {
|
||||
...defaultConfig.headers,
|
||||
...headers
|
||||
}
|
||||
...headers,
|
||||
};
|
||||
}
|
||||
return { ...excludeProps(config!, "headers"), ...defaultConfig }
|
||||
return { ...excludeProps(config!, "headers"), ...defaultConfig };
|
||||
}
|
||||
|
||||
export const METHODS = ["post", "get", "put", "delete", "option", "patch"]
|
||||
export const METHODS = ["post", "get", "put", "delete", "option", "patch"];
|
||||
|
Loading…
x
Reference in New Issue
Block a user