@fe-free/core 4.1.47 → 4.2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @fe-free/core
2
2
 
3
+ ## 4.2.0
4
+
5
+ ### minor Changes
6
+
7
+ - fix: crud bug
8
+ - @fe-free/icons@4.2.0
9
+ - @fe-free/tool@4.2.0
10
+
3
11
  ## 4.1.47
4
12
 
5
13
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fe-free/core",
3
- "version": "4.1.47",
3
+ "version": "4.2.0",
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.47",
56
- "@fe-free/tool": "4.1.47"
55
+ "@fe-free/icons": "4.2.0",
56
+ "@fe-free/tool": "4.2.0"
57
57
  },
58
58
  "scripts": {
59
59
  "i18n-extract": "rm -rf ./src/locales/zh-CN && npx i18next-cli extract"
@@ -15,15 +15,11 @@ function OperateBtn({
15
15
  }) {
16
16
  if (disabled) {
17
17
  if (operateText) {
18
- return (
19
- <span className="fec-crud-of-list-operate-btn cursor-not-allowed text-03">
20
- {operateText}
21
- </span>
22
- );
18
+ return <span className="fec-crud-operate-btn cursor-not-allowed text-03">{operateText}</span>;
23
19
  } else {
24
20
  return (
25
21
  <Tooltip title={title}>
26
- <span className="fec-crud-of-list-operate-btn cursor-not-allowed text-lg text-03">
22
+ <span className="fec-crud-operate-btn fec-crud-operate-btn-icon cursor-not-allowed text-lg text-03">
27
23
  {icon}
28
24
  </span>
29
25
  </Tooltip>
@@ -33,7 +29,7 @@ function OperateBtn({
33
29
 
34
30
  if (operateText) {
35
31
  return (
36
- <span className="fec-crud-of-list-operate-btn cursor-pointer text-primary" onClick={onClick}>
32
+ <span className="fec-crud-operate-btn cursor-pointer text-primary" onClick={onClick}>
37
33
  {operateText}
38
34
  </span>
39
35
  );
@@ -42,7 +38,7 @@ function OperateBtn({
42
38
  return (
43
39
  <Tooltip title={title}>
44
40
  <span
45
- className="fec-crud-of-list-operate-btn cursor-pointer text-lg text-primary"
41
+ className="fec-crud-operate-btn fec-crud-operate-btn-icon cursor-pointer text-lg text-primary"
46
42
  onClick={onClick}
47
43
  >
48
44
  {icon}
@@ -9,6 +9,14 @@
9
9
  }
10
10
  }
11
11
 
12
+ .fec-crud {
13
+ // 只有 icon 才设置大小
14
+ .fec-crud-operate-btn.fec-crud-operate-btn-icon {
15
+ font-size: 20px;
16
+ line-height: 22px;
17
+ }
18
+ }
19
+
12
20
  .fec-crud.fec-crud-full-page {
13
21
  height: 100%;
14
22
  display: flex;
@@ -96,6 +96,9 @@ export const WithSearch: Story = {
96
96
  requestDeleteByRecord={fakeDeleteByRecord}
97
97
  deleteProps={{
98
98
  nameIndex: 'name',
99
+ operateIsHidden: (record) => {
100
+ return record.id === '1';
101
+ },
99
102
  }}
100
103
  detailForm={() => (
101
104
  <>
@@ -12,6 +12,11 @@
12
12
  &:hover {
13
13
  .ant-table-cell-fix-right {
14
14
  display: block;
15
+
16
+ // 如果操作列没有内容,则隐藏操作列
17
+ &:has(.fec-crud-operate-column:empty) {
18
+ display: none;
19
+ }
15
20
  }
16
21
  }
17
22
  }
@@ -44,11 +49,6 @@
44
49
  }
45
50
  }
46
51
 
47
- .fec-crud-of-list-operate-btn {
48
- font-size: 14px !important;
49
- line-height: var(--ant-line-height) !important;
50
- }
51
-
52
52
  .ant-table-bordered {
53
53
  .ant-table-container {
54
54
  border-top: none !important;