table-reuse
Version:
A reusable table built on top of Antd ProTable
25 lines (24 loc) • 686 B
TypeScript
/** ------------------ getCrudPath.ts ------------------ */
/**
* 扁平化 CRUD + 页面级操作路径类型
*/
export type TCrudPaths = {
edit: string;
view: string;
clone: string;
delete: string;
list: string;
create: string;
settings: string;
dashboard: string;
search: string;
import: string;
export: string;
bulkEdit: string;
};
/**
* 获取所有 CRUD 和页面级操作路径(扁平化)
* @param basePath 页面或模块的基础路径,例如 "pages/p100"
* @param id 行/项 ID,默认使用 ":id" 占位符
*/
export declare function getCrudPath(basePath: string, id?: string): TCrudPaths;