crud-page-react 0.0.2 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -127,17 +127,27 @@ export interface ActionPermission {
127
127
  role?: string[];
128
128
  condition?: string;
129
129
  }
130
+ export interface ActionApiConfig {
131
+ url: string;
132
+ method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
133
+ data?: Record<string, unknown>;
134
+ headers?: Record<string, string>;
135
+ responseType?: 'json' | 'blob' | 'text';
136
+ }
130
137
  export interface ActionSchema {
131
138
  key: string;
132
139
  label: string;
133
140
  type: ActionType;
134
141
  icon?: string;
135
142
  danger?: boolean;
143
+ color?: string;
136
144
  permission?: ActionPermission;
145
+ condition?: Record<string, unknown>;
137
146
  confirm?: {
138
147
  title: string;
139
148
  content?: string;
140
149
  };
150
+ api?: ActionApiConfig;
141
151
  }
142
152
  export interface PaginationConfig {
143
153
  pageSize?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crud-page-react",
3
- "version": "0.0.2",
3
+ "version": "0.0.5",
4
4
  "description": "一个基于 React + Ant Design 的动态 CRUD 组件库,支持通过 JSON Schema 配置生成完整的增删改查界面",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",