-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Rem
committed
Dec 31, 2024
1 parent
28a7f26
commit f2ae977
Showing
4 changed files
with
36 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// 全局要用的类型放到这里 | ||
|
||
declare global { | ||
type IResData<T> = { | ||
code: number | ||
msg: string | ||
data: T | ||
} | ||
|
||
// uni.uploadFile文件上传参数 | ||
type IUniUploadFileOptions = { | ||
file?: File | ||
files?: UniApp.UploadFileOptionFiles[] | ||
filePath?: string | ||
name?: string | ||
formData?: any | ||
} | ||
|
||
type IUserInfo = { | ||
nickname?: string | ||
avatar?: string | ||
/** 微信的 openid,非微信没有这个字段 */ | ||
openid?: string | ||
token?: string | ||
} | ||
} | ||
|
||
export {} // 防止模块污染 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,6 @@ | ||
// 全局要用的类型放到这里 | ||
// 枚举定义 | ||
|
||
type IResData<T> = { | ||
code: number | ||
msg: string | ||
data: T | ||
} | ||
|
||
// uni.uploadFile文件上传参数 | ||
type IUniUploadFileOptions = { | ||
file?: File | ||
files?: UniApp.UploadFileOptionFiles[] | ||
filePath?: string | ||
name?: string | ||
formData?: any | ||
} | ||
|
||
type IUserInfo = { | ||
nickname?: string | ||
avatar?: string | ||
/** 微信的 openid,非微信没有这个字段 */ | ||
openid?: string | ||
token?: string | ||
} | ||
|
||
enum TestEnum { | ||
A = 'a', | ||
B = 'b', | ||
export enum TestEnum { | ||
A = '1', | ||
B = '2', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters