import { Ref } from 'vue'; /** Element Plus 表格 ref 形状(只用到 $el) */ export interface TableLikeRef { $el?: HTMLElement; } /** useTableDragScroll 配置项 */ export interface UseTableDragScrollOptions { /** 是否启用,默认 true */ enabled?: Ref | boolean; /** resize 检测区域宽度(px),默认 12 */ resizeAreaWidth?: number; /** 列宽 resize 时高亮边框颜色,默认 var(--theme-color) */ resizeBorderColor?: string; /** 滚动容器选择器,默认 .el-scrollbar__wrap */ scrollContainerSelector?: string; } /** useTableDragScroll 返回值 */ export interface UseTableDragScrollReturn { /** 绑定到外层 wrapper 的 mousedown 处理函数 */ onMouseDown: (e: MouseEvent) => void; /** 是否处于拖拽中 */ isDragging: Ref; /** 是否处于列宽 resize 中 */ isResizing: Ref; /** 手动刷新内部 scroll 容器(异步渲染时可用) */ refreshScrollContainer: () => void; } /** * 表格横向拖拽滚动 Hook * @param wrapperRef 外层包裹元素 ref(绑定 mousedown) * @param tableRef 可选:Element Plus el-table 的 ref;不传时在 wrapper 内查找 .el-table * @param options 可选配置 */ export declare function useTableDragScroll(wrapperRef: Ref, tableRef?: Ref, options?: UseTableDragScrollOptions): UseTableDragScrollReturn;