@yidun/antd-super-table 0.0.8 → 0.1.0

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.
package/README.md CHANGED
@@ -81,7 +81,17 @@ const columns: SuperTableColumn[] = [
81
81
 
82
82
  // 定义请求函数
83
83
  const onRequest = async (options: { params: Record<string, any>; pageSize: number; pageNum: number }) => {
84
- const res = await api.getList(options.params, options.pageNum, options.pageSize)
84
+ // 这里调用你的实际 API 接口
85
+ const res = await fetch('/api/user/list', {
86
+ method: 'POST',
87
+ headers: { 'Content-Type': 'application/json' },
88
+ body: JSON.stringify({
89
+ ...options.params,
90
+ pageNum: options.pageNum,
91
+ pageSize: options.pageSize,
92
+ }),
93
+ }).then(res => res.json())
94
+
85
95
  return {
86
96
  data: res.data,
87
97
  total: res.total,
@@ -16,6 +16,7 @@ export declare const createTableColumns: (options: {
16
16
  visible?: undefined;
17
17
  component?: undefined;
18
18
  props?: undefined;
19
+ configurable?: undefined;
19
20
  } | {
20
21
  key: string;
21
22
  title: string;
@@ -27,6 +28,7 @@ export declare const createTableColumns: (options: {
27
28
  visible?: undefined;
28
29
  component?: undefined;
29
30
  props?: undefined;
31
+ configurable?: undefined;
30
32
  } | {
31
33
  key: string;
32
34
  title: string;
@@ -38,6 +40,7 @@ export declare const createTableColumns: (options: {
38
40
  visible?: undefined;
39
41
  component?: undefined;
40
42
  props?: undefined;
43
+ configurable?: undefined;
41
44
  } | {
42
45
  key: string;
43
46
  title: string;
@@ -49,6 +52,7 @@ export declare const createTableColumns: (options: {
49
52
  visible?: undefined;
50
53
  component?: undefined;
51
54
  props?: undefined;
55
+ configurable?: undefined;
52
56
  } | {
53
57
  key: string;
54
58
  type: string;
@@ -60,6 +64,7 @@ export declare const createTableColumns: (options: {
60
64
  visible?: undefined;
61
65
  component?: undefined;
62
66
  props?: undefined;
67
+ configurable?: undefined;
63
68
  } | {
64
69
  key: string;
65
70
  type: string;
@@ -71,6 +76,7 @@ export declare const createTableColumns: (options: {
71
76
  titleTooltip?: undefined;
72
77
  component?: undefined;
73
78
  props?: undefined;
79
+ configurable?: undefined;
74
80
  } | {
75
81
  key: string;
76
82
  type: string;
@@ -85,6 +91,7 @@ export declare const createTableColumns: (options: {
85
91
  visible?: undefined;
86
92
  component?: undefined;
87
93
  props?: undefined;
94
+ configurable?: undefined;
88
95
  } | {
89
96
  key: string;
90
97
  type: string;
@@ -99,6 +106,7 @@ export declare const createTableColumns: (options: {
99
106
  visible?: undefined;
100
107
  component?: undefined;
101
108
  props?: undefined;
109
+ configurable?: undefined;
102
110
  } | {
103
111
  key: string;
104
112
  type: string;
@@ -113,6 +121,7 @@ export declare const createTableColumns: (options: {
113
121
  visible?: undefined;
114
122
  component?: undefined;
115
123
  props?: undefined;
124
+ configurable?: undefined;
116
125
  } | {
117
126
  key: string;
118
127
  type: string;
@@ -127,6 +136,7 @@ export declare const createTableColumns: (options: {
127
136
  visible?: undefined;
128
137
  component?: undefined;
129
138
  props?: undefined;
139
+ configurable?: undefined;
130
140
  } | {
131
141
  key: string;
132
142
  title: string;
@@ -1102,6 +1112,7 @@ export declare const createTableColumns: (options: {
1102
1112
  fixed?: undefined;
1103
1113
  titleTooltip?: undefined;
1104
1114
  visible?: undefined;
1115
+ configurable?: undefined;
1105
1116
  } | {
1106
1117
  key: string;
1107
1118
  title: string;
@@ -1113,4 +1124,23 @@ export declare const createTableColumns: (options: {
1113
1124
  visible?: undefined;
1114
1125
  component?: undefined;
1115
1126
  props?: undefined;
1127
+ configurable?: undefined;
1128
+ } | {
1129
+ key: string;
1130
+ type: string;
1131
+ title: string;
1132
+ fixed: string;
1133
+ width: number;
1134
+ configurable: boolean;
1135
+ content(): ({
1136
+ label: string;
1137
+ onClick?: undefined;
1138
+ } | {
1139
+ label: string;
1140
+ onClick: (record: Record<string, any>) => void;
1141
+ })[];
1142
+ titleTooltip?: undefined;
1143
+ visible?: undefined;
1144
+ component?: undefined;
1145
+ props?: undefined;
1116
1146
  })[];