feat(projects): 添加常用组件、composables函数

This commit is contained in:
Soybean
2021-12-12 17:28:39 +08:00
parent e755caabf2
commit 230a50a4cf
87 changed files with 5424 additions and 2071 deletions

View File

@ -1,3 +1,11 @@
/** 登录token */
export interface LoginToken {
/** token */
token: string;
/** 刷新token(用户token到期后换取新的token) */
refreshToken: string;
}
/** 用户信息 */
export interface UserInfo {
/** 用户id */

View File

@ -1,3 +1,4 @@
export * from './auth';
export * from './demo';
export * from './website';
export * from './s-graph';

View File

@ -0,0 +1,53 @@
/** 缩放比例取值范围 */
export type SScaleRange = [number, number];
/** 偏移量 */
export interface STranslate {
/** X偏移量 */
x: number;
/** Y偏移量 */
y: number;
}
/** 位置 */
export interface SPosition {
/** x坐标 */
x: number;
/** y坐标 */
y: number;
}
/** 坐标 */
export interface SCoord {
/** x坐标 */
x: number;
/** y坐标 */
y: number;
}
/** 节点尺寸 */
export interface SNodeSize {
/** 节点宽 */
w: number;
/** 节点高 */
h: number;
}
/** 图的节点 */
export interface SGraphNode extends SCoord {
/** 节点id */
id: string;
/** 节点名称 */
label: string;
}
/** 图的关系线 */
export interface SGraphEdge {
sourceCoord: SCoord;
targetCoord: SCoord;
}
export interface SGraphData {
nodes: SGraphNode[];
edges: SGraphEdge[];
}