movable.ts, and fix popup issue.
This commit is contained in:
1 parent
5c2c682baf
commit
9028805363
7 files changed
+167
-40
No files matched your search
Vendored
+10
-2
@@ -33,6 +33,7 @@ export interface MovableOptions<T = void> {
|
||||
movable: boolean;
|
||||
resizable: boolean;
|
||||
minSize?: number;
|
||||
bringToFront?: boolean;
|
||||
snapThreshold?: number;
|
||||
snapToContainer?: boolean;
|
||||
snapToSiblings?: boolean;
|
||||
@@ -45,7 +46,8 @@ export interface MovableOptions<T = void> {
|
||||
onMoved?(this: T | undefined, rect: BoxRect): void;
|
||||
onResizeStart?(this: T | undefined): void;
|
||||
onResized?(this: T | undefined, rect: BoxRect): void;
|
||||
onSnap?(this: T | undefined, guides: SnapLine[]): void;
|
||||
onSnapped?(this: T | undefined, guides: SnapLine[]): void;
|
||||
onZIndexChanged?(this: T | undefined, zIndex: number, box: HTMLElement): void;
|
||||
}
|
||||
|
||||
export type MarkRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
|
||||
@@ -90,7 +92,13 @@ export interface PopupButton {
|
||||
key?: string;
|
||||
text: string;
|
||||
isPrimary?: boolean;
|
||||
trigger?: (popup: Popup, button?: PopupButton) => boolean | Promise<boolean> | string | number;
|
||||
/**
|
||||
* 按钮触发函数
|
||||
* @param popup 操作的弹出框实例
|
||||
* @param button 触发的按钮
|
||||
* @returns 返回 false 则阻止窗口关闭
|
||||
*/
|
||||
trigger?: (this: PopupButton, popup: Popup) => boolean | string | number | Promise<boolean | string | number> | undefined;
|
||||
}
|
||||
|
||||
export interface PopupOptions {
|
||||
|
||||
Reference in new issue
Block a user