mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2026-01-27 16:48:13 +00:00
优化
This commit is contained in:
parent
85e1d826d3
commit
c38741aa05
@ -53,7 +53,7 @@ request.interceptors.request.use(
|
||||
}
|
||||
|
||||
// 设置请求头中的语言
|
||||
if (!req.headers['language'] !== null) {
|
||||
if (req.headers['language'] !== null) {
|
||||
req.headers['language'] = config.i18n.locale;
|
||||
}
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ export function useUpload() {
|
||||
const { t } = useI18n();
|
||||
|
||||
// 上传
|
||||
async function toUpload(file: File, opts: Upload.Options = {}): Upload.Respose {
|
||||
async function toUpload(file: File, opts: Upload.Options = {}): Upload.Response {
|
||||
return new Promise((resolve, reject) => {
|
||||
const executor = async () => {
|
||||
// 合并配置
|
||||
@ -110,7 +110,7 @@ export function useUpload() {
|
||||
|
||||
if (isLocal) {
|
||||
next({
|
||||
host: '/admin/base/comm/upload'
|
||||
host: 'admin/base/comm/upload'
|
||||
});
|
||||
} else {
|
||||
service.base.comm
|
||||
|
||||
2
src/plugins/upload/types/index.d.ts
vendored
2
src/plugins/upload/types/index.d.ts
vendored
@ -22,7 +22,7 @@ declare namespace Upload {
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
type Respose = Promise<{
|
||||
type Response = Promise<{
|
||||
key: string;
|
||||
url: string;
|
||||
fileId: string;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user