mirror of
https://github.com/palxiao/poster-design.git
synced 2025-07-15 16:02:19 +08:00
55 lines
915 B
TypeScript
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
|
|
}
|
|
}
|
|
}
|