liu
昨天 18340ebdeb405be3ba01eb4d1600d9b26cee7ccd
src/utils/index.ts
@@ -1,10 +1,10 @@
import type { Recordable } from '..\packages\types\src';
import type { Recordable } from '@vben/types';
export * from './rangePickerProps';
export * from './routerHelper';
// 从共享包导出 URL 工具函数
export { isUrl } from '..\packages\utils\src';
export { isUrl } from '@vben/utils';
/**
 * 查找数组对象的某个下标
@@ -30,3 +30,18 @@
  });
  return index;
};
/**
 * 去掉表格列的固定(fixed)配置
 *
 * 用于「查看审批明细 / 详情」等只读场景:此时表格容器较窄,
 * 固定列会挤占可视宽度,把产品名称、单位、备注等列遮住。
 *
 * @param columns 原始表格列配置
 */
export function withoutFixedColumns<T>(columns?: null | T[]): T[] {
  return (columns ?? []).map((column) => {
    const { fixed: _fixed, ...rest } = column as Recordable<any>;
    return rest as unknown as T;
  });
}