poster-design/src/types/global.d.ts
2024-03-02 13:25:54 +00:00

55 lines
915 B
TypeScript

/** 公共API返回结果 */
type TCommResResult<T> = {
code: number
msg: string
result: T
}
type TCommonItemData = {
type: string
fontFamily?: string
color?: string
fontSize: number
width: number
height: number
left: number
top: number
fontWeight: number
value: TItem2DataParam
}
/** 分页查询公共返回 */
type TPageRequestResult<T> = {
list: T
total: number
}
interface HTMLElementEventMap {
"mousewheel": MouseEvent
}
interface IQiniuSubscribeCb {
(result: { total: { percent: number }}): void
}
interface Window {
qiniu: {
upload: (
file: File,
name: string,
token: string,
exObj: Record<string, any>,
exOption: {
useCdnDomain: boolean
}) => {
subscribe: (cb: {
next: IQiniuSubscribeCb
error: (err: string) => void
complete: IQiniuSubscribeCb
}) => void
}
}
}