Commit af76f5fa by qlintonger xeno

删除ts错误+4

parent b11be8e3
...@@ -30,7 +30,8 @@ export const alova = createAlova({ ...@@ -30,7 +30,8 @@ export const alova = createAlova({
beforeRequest(method) { beforeRequest(method) {
//开启加载动画 //开启加载动画
const appStore = useAppStore() const appStore = useAppStore()
const loading = method.meta?.loading // @ts-ignore
const loading = method.config?.meta?.loading
if (loading || loading === '') { if (loading || loading === '') {
if (typeof loading === 'string' && loading !== '') { if (typeof loading === 'string' && loading !== '') {
appStore.loadText = loading appStore.loadText = loading
...@@ -71,7 +72,8 @@ export const alova = createAlova({ ...@@ -71,7 +72,8 @@ export const alova = createAlova({
if (response.status >= 400) { if (response.status >= 400) {
throw new Error(response.statusText) throw new Error(response.statusText)
} }
if (method?.meta?.blob) { // @ts-ignore
if (method.config?.meta?.blob) {
return await response.blob() return await response.blob()
} }
const json = await response.json() const json = await response.json()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment