mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2026-02-01 21:08:12 +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;
|
req.headers['language'] = config.i18n.locale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -13,7 +13,7 @@ export function useUpload() {
|
|||||||
const { t } = useI18n();
|
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) => {
|
return new Promise((resolve, reject) => {
|
||||||
const executor = async () => {
|
const executor = async () => {
|
||||||
// 合并配置
|
// 合并配置
|
||||||
@ -110,7 +110,7 @@ export function useUpload() {
|
|||||||
|
|
||||||
if (isLocal) {
|
if (isLocal) {
|
||||||
next({
|
next({
|
||||||
host: '/admin/base/comm/upload'
|
host: 'admin/base/comm/upload'
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
service.base.comm
|
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;
|
[key: string]: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
type Respose = Promise<{
|
type Response = Promise<{
|
||||||
key: string;
|
key: string;
|
||||||
url: string;
|
url: string;
|
||||||
fileId: string;
|
fileId: string;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user