@fe-free/core 4.1.44 → 4.1.46
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/CHANGELOG.md +16 -0
- package/package.json +3 -3
- package/src/crud/crud.stories.tsx +13 -1
- package/src/crud/style.scss +19 -0
- package/src/crud/table/style.scss +2 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @fe-free/core
|
|
2
2
|
|
|
3
|
+
## 4.1.46
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- feat: crud ui
|
|
8
|
+
- @fe-free/icons@4.1.46
|
|
9
|
+
- @fe-free/tool@4.1.46
|
|
10
|
+
|
|
11
|
+
## 4.1.45
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- feat: curd table ui
|
|
16
|
+
- @fe-free/icons@4.1.45
|
|
17
|
+
- @fe-free/tool@4.1.45
|
|
18
|
+
|
|
3
19
|
## 4.1.44
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fe-free/core",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.46",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"author": "",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"i18next-icu": "^2.4.1",
|
|
53
53
|
"react": "^19.2.0",
|
|
54
54
|
"react-i18next": "^16.4.0",
|
|
55
|
-
"@fe-free/icons": "4.1.
|
|
56
|
-
"@fe-free/tool": "4.1.
|
|
55
|
+
"@fe-free/icons": "4.1.46",
|
|
56
|
+
"@fe-free/tool": "4.1.46"
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"i18n-extract": "rm -rf ./src/locales/zh-CN && npx i18next-cli extract"
|
|
@@ -60,6 +60,7 @@ export const Normal: Story = {
|
|
|
60
60
|
<CRUD
|
|
61
61
|
actions={['create', 'read', 'delete', 'update']}
|
|
62
62
|
tableProps={{
|
|
63
|
+
rowKey: 'id',
|
|
63
64
|
columns,
|
|
64
65
|
request: fakeRequest,
|
|
65
66
|
}}
|
|
@@ -105,6 +106,7 @@ export const ReadDetail: Story = {
|
|
|
105
106
|
<CRUD
|
|
106
107
|
actions={['read_detail']}
|
|
107
108
|
tableProps={{
|
|
109
|
+
rowKey: 'id',
|
|
108
110
|
columns,
|
|
109
111
|
request: fakeRequest,
|
|
110
112
|
}}
|
|
@@ -119,6 +121,7 @@ export const BatchDelete: Story = {
|
|
|
119
121
|
<CRUD
|
|
120
122
|
actions={['batch_delete']}
|
|
121
123
|
tableProps={{
|
|
124
|
+
rowKey: 'id',
|
|
122
125
|
columns: [
|
|
123
126
|
{
|
|
124
127
|
title: 'id',
|
|
@@ -169,6 +172,7 @@ export const MoreCustom: Story = {
|
|
|
169
172
|
<CRUD
|
|
170
173
|
actions={['create', 'read', 'delete', 'update']}
|
|
171
174
|
tableProps={{
|
|
175
|
+
rowKey: 'id',
|
|
172
176
|
columns,
|
|
173
177
|
request: fakeRequest,
|
|
174
178
|
toolBarRender: () => {
|
|
@@ -250,7 +254,7 @@ export const MoreCustom: Story = {
|
|
|
250
254
|
|
|
251
255
|
// 表格表单和详情表单 ref
|
|
252
256
|
const FormRefComponent = () => {
|
|
253
|
-
const formRef = useRef<any>();
|
|
257
|
+
const formRef = useRef<any>(null);
|
|
254
258
|
const [detailFormInstance] = ProForm.useForm();
|
|
255
259
|
|
|
256
260
|
const columns = [
|
|
@@ -270,6 +274,7 @@ const FormRefComponent = () => {
|
|
|
270
274
|
<CRUD
|
|
271
275
|
actions={['create', 'read', 'update']}
|
|
272
276
|
tableProps={{
|
|
277
|
+
rowKey: 'id',
|
|
273
278
|
formRef,
|
|
274
279
|
columns,
|
|
275
280
|
request: fakeRequest,
|
|
@@ -322,6 +327,7 @@ const ActionRefComponent = () => {
|
|
|
322
327
|
ref={ref}
|
|
323
328
|
actions={[]}
|
|
324
329
|
tableProps={{
|
|
330
|
+
rowKey: 'id',
|
|
325
331
|
columns,
|
|
326
332
|
request: fakeRequest,
|
|
327
333
|
}}
|
|
@@ -396,6 +402,7 @@ export const RemoteData: Story = {
|
|
|
396
402
|
<CRUD
|
|
397
403
|
actions={[]}
|
|
398
404
|
tableProps={{
|
|
405
|
+
rowKey: 'id',
|
|
399
406
|
columns,
|
|
400
407
|
request: fakeRequest,
|
|
401
408
|
}}
|
|
@@ -422,6 +429,7 @@ export const NoSearch: Story = {
|
|
|
422
429
|
<CRUD
|
|
423
430
|
actions={[]}
|
|
424
431
|
tableProps={{
|
|
432
|
+
rowKey: 'id',
|
|
425
433
|
columns,
|
|
426
434
|
request: fakeRequest,
|
|
427
435
|
search: false,
|
|
@@ -451,6 +459,7 @@ export const CustomText: Story = {
|
|
|
451
459
|
<CRUD
|
|
452
460
|
actions={['create', 'read', 'delete', 'update']}
|
|
453
461
|
tableProps={{
|
|
462
|
+
rowKey: 'id',
|
|
454
463
|
columns,
|
|
455
464
|
request: fakeRequest,
|
|
456
465
|
}}
|
|
@@ -495,6 +504,7 @@ export const RowSelection: Story = {
|
|
|
495
504
|
<CRUD
|
|
496
505
|
actions={[]}
|
|
497
506
|
tableProps={{
|
|
507
|
+
rowKey: 'id',
|
|
498
508
|
columns: [
|
|
499
509
|
{
|
|
500
510
|
title: 'id',
|
|
@@ -552,6 +562,7 @@ export const ExpandedRowRender: Story = {
|
|
|
552
562
|
<CRUD
|
|
553
563
|
actions={['create', 'read', 'delete', 'update']}
|
|
554
564
|
tableProps={{
|
|
565
|
+
rowKey: 'id',
|
|
555
566
|
columns,
|
|
556
567
|
request: fakeRequest,
|
|
557
568
|
defaultExpandAllRows: true,
|
|
@@ -614,6 +625,7 @@ export const FullPage: Story = {
|
|
|
614
625
|
fullPage
|
|
615
626
|
actions={['create', 'read', 'delete', 'update']}
|
|
616
627
|
tableProps={{
|
|
628
|
+
rowKey: 'id',
|
|
617
629
|
columns,
|
|
618
630
|
request: fakeRequest,
|
|
619
631
|
}}
|
package/src/crud/style.scss
CHANGED
|
@@ -67,6 +67,25 @@
|
|
|
67
67
|
scrollbar-width: thin;
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
+
|
|
71
|
+
&.ant-table-bordered {
|
|
72
|
+
.ant-table-container {
|
|
73
|
+
border-inline-start: none !important;
|
|
74
|
+
border-bottom: 1px solid var(--ant-table-border-color) !important;
|
|
75
|
+
|
|
76
|
+
.ant-table-thead {
|
|
77
|
+
& > tr > th:first-child {
|
|
78
|
+
border-inline-start: 1px solid var(--ant-table-border-color) !important;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.ant-table-row {
|
|
83
|
+
& > td:first-child {
|
|
84
|
+
border-inline-start: 1px solid var(--ant-table-border-color) !important;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
70
89
|
}
|
|
71
90
|
}
|
|
72
91
|
}
|
|
@@ -5,22 +5,6 @@
|
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
.ant-table-container {
|
|
9
|
-
border-inline-start-color: transparent !important;
|
|
10
|
-
|
|
11
|
-
.ant-table-thead {
|
|
12
|
-
& > tr > th:last-child {
|
|
13
|
-
border-inline-end-color: transparent !important;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.ant-table-row {
|
|
18
|
-
& > td:last-child {
|
|
19
|
-
border-inline-end-color: transparent !important;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
8
|
.ant-pagination {
|
|
25
9
|
// gap: 8px;
|
|
26
10
|
|
|
@@ -32,12 +16,12 @@
|
|
|
32
16
|
.ant-pagination-prev,
|
|
33
17
|
.ant-pagination-next {
|
|
34
18
|
.ant-pagination-item-link {
|
|
35
|
-
border: 1px solid
|
|
19
|
+
border: 1px solid var(--ant-color-border);
|
|
36
20
|
}
|
|
37
21
|
}
|
|
38
22
|
|
|
39
23
|
.ant-pagination-item {
|
|
40
|
-
border: 1px solid
|
|
24
|
+
border: 1px solid var(--ant-color-border);
|
|
41
25
|
|
|
42
26
|
&.ant-pagination-item-active {
|
|
43
27
|
color: theme('colors.theme08');
|