feat: 添加prettier格式化代码
This commit is contained in:
1 parent
5823d5876b
commit
f33e9386cd
81 files changed
+8114
-7395
No files matched your search
+27
-27
@@ -1,39 +1,39 @@
|
||||
import { AxiosRequestConfig } from "axios";
|
||||
import { directory, file } from "./type";
|
||||
import { AxiosRequestConfig } from 'axios'
|
||||
import { directory, file } from './type'
|
||||
|
||||
export type miaoFetchConfig = {
|
||||
retry?: number
|
||||
axiosOption?: AxiosRequestConfig<any>
|
||||
retry?: number
|
||||
axiosOption?: AxiosRequestConfig<any>
|
||||
}
|
||||
|
||||
export type getOption = {} & miaoFetchConfig;
|
||||
export type getOption = {} & miaoFetchConfig
|
||||
|
||||
export type getFileOption = {
|
||||
/**
|
||||
* 下载进度回调函数
|
||||
* @param {any} percent 进度百分比,float类型, 0-1
|
||||
*/
|
||||
onProcess?: (percent: number) => void;
|
||||
} & miaoFetchConfig;
|
||||
/**
|
||||
* 下载进度回调函数
|
||||
* @param {any} percent 进度百分比,float类型, 0-1
|
||||
*/
|
||||
onProcess?: (percent: number) => void
|
||||
} & miaoFetchConfig
|
||||
|
||||
export type getResponse = (file | directory)[];
|
||||
export type getResponse = (file | directory)[]
|
||||
|
||||
export type uploadOption = {
|
||||
/**
|
||||
* 上传进度回调函数
|
||||
* @param {any} percent 进度百分比,float类型, 0-1
|
||||
*/
|
||||
onProcess?: (percent: number) => void;
|
||||
/**
|
||||
* 上传文件执行的操作
|
||||
* write即为覆盖写
|
||||
* append即为增量写
|
||||
*/
|
||||
type?: "write" | "append";
|
||||
} & miaoFetchConfig;
|
||||
/**
|
||||
* 上传进度回调函数
|
||||
* @param {any} percent 进度百分比,float类型, 0-1
|
||||
*/
|
||||
onProcess?: (percent: number) => void
|
||||
/**
|
||||
* 上传文件执行的操作
|
||||
* write即为覆盖写
|
||||
* append即为增量写
|
||||
*/
|
||||
type?: 'write' | 'append'
|
||||
} & miaoFetchConfig
|
||||
|
||||
export type deleteOption = {} & miaoFetchConfig;
|
||||
export type renameOption = {} & miaoFetchConfig;
|
||||
export type deleteOption = {} & miaoFetchConfig
|
||||
export type renameOption = {} & miaoFetchConfig
|
||||
export type cutOption = {} & miaoFetchConfig
|
||||
export type mkdirOption = {} & miaoFetchConfig
|
||||
export type queryOption = {} & miaoFetchConfig;
|
||||
export type queryOption = {} & miaoFetchConfig
|
||||
+37
-31
@@ -1,48 +1,54 @@
|
||||
import PluginCenter from "@/class/PluginCenter";
|
||||
import VirtualDirectory from "@/class/VirtualDirectory";
|
||||
import type { VirtualPages } from "@/class/VirtualPage";
|
||||
import PluginCenter from '@/class/PluginCenter'
|
||||
import VirtualDirectory from '@/class/VirtualDirectory'
|
||||
import type { VirtualPages } from '@/class/VirtualPage'
|
||||
|
||||
export type stats = {
|
||||
atimeMs: number; // 上次访问时间(毫秒)
|
||||
birthtimeMs: number; // 创建时间(毫秒)
|
||||
ctimeMs: number; // 状态更改时间(毫秒)
|
||||
mtimeMs: number; // 上次修改时间(毫秒)
|
||||
};
|
||||
atimeMs: number // 上次访问时间(毫秒)
|
||||
birthtimeMs: number // 创建时间(毫秒)
|
||||
ctimeMs: number // 状态更改时间(毫秒)
|
||||
mtimeMs: number // 上次修改时间(毫秒)
|
||||
}
|
||||
|
||||
export type file = {
|
||||
name: string;
|
||||
size: number;
|
||||
type?: "file";
|
||||
stats: stats;
|
||||
};
|
||||
name: string
|
||||
size: number
|
||||
type?: 'file'
|
||||
stats: stats
|
||||
}
|
||||
|
||||
export type directory = {
|
||||
name: string;
|
||||
// 考虑到可能还没请求过来
|
||||
content?: (file | directory)[];
|
||||
type?: "directory";
|
||||
stats: stats;
|
||||
parent?: directory;
|
||||
};
|
||||
name: string
|
||||
// 考虑到可能还没请求过来
|
||||
content?: (file | directory)[]
|
||||
type?: 'directory'
|
||||
stats: stats
|
||||
parent?: directory
|
||||
}
|
||||
|
||||
export type alertTipType = (content: string, options?: AlertTipMessageOptions) => (newContent: string, newOptions?: AlertTipMessageOptions) => void;
|
||||
export type alertTipType = (
|
||||
content: string,
|
||||
options?: AlertTipMessageOptions
|
||||
) => (newContent: string, newOptions?: AlertTipMessageOptions) => void
|
||||
|
||||
export interface AlertTipMessageOptions {
|
||||
type?: "info" | "success" | "error";
|
||||
timeout?: number;
|
||||
id?: number;
|
||||
type?: 'info' | 'success' | 'error'
|
||||
timeout?: number
|
||||
id?: number
|
||||
}
|
||||
|
||||
export enum PluginExportType {
|
||||
default = "default",
|
||||
component = "component"
|
||||
default = 'default',
|
||||
component = 'component'
|
||||
}
|
||||
|
||||
export interface usePluginHooksType {
|
||||
globalAlertTip: alertTipType;
|
||||
getViews: () => VirtualPages;
|
||||
getPluginCenter: () => PluginCenter;
|
||||
getRootVDirectory: () => VirtualDirectory;
|
||||
globalAlertTip: alertTipType
|
||||
getViews: () => VirtualPages
|
||||
getPluginCenter: () => PluginCenter
|
||||
getRootVDirectory: () => VirtualDirectory
|
||||
}
|
||||
|
||||
export type Equals<X, Y> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? true : false;
|
||||
export type Equals<X, Y> =
|
||||
(<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2
|
||||
? true
|
||||
: false
|
||||
Reference in new issue
Block a user