@fe-free/core 3.0.24 → 3.0.26

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,18 @@
1
1
  # @fe-free/core
2
2
 
3
+ ## 3.0.26
4
+
5
+ ### Patch Changes
6
+
7
+ - @fe-free/tool@3.0.26
8
+
9
+ ## 3.0.25
10
+
11
+ ### Patch Changes
12
+
13
+ - feat: ui
14
+ - @fe-free/tool@3.0.25
15
+
3
16
  ## 3.0.24
4
17
 
5
18
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fe-free/core",
3
- "version": "3.0.24",
3
+ "version": "3.0.26",
4
4
  "description": "",
5
5
  "main": "./src/index.ts",
6
6
  "author": "",
@@ -41,7 +41,7 @@
41
41
  "safe-stable-stringify": "^2.5.0",
42
42
  "vanilla-jsoneditor": "^0.23.1",
43
43
  "zustand": "^4.5.4",
44
- "@fe-free/tool": "3.0.24"
44
+ "@fe-free/tool": "3.0.26"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@ant-design/pro-components": "2.8.9",
package/src/crud/crud.tsx CHANGED
@@ -1,6 +1,6 @@
1
1
  import { EditOutlined, EyeOutlined } from '@ant-design/icons';
2
2
  import type { ActionType } from '@ant-design/pro-components';
3
- import { Button, message } from 'antd';
3
+ import { Button, message, Tooltip } from 'antd';
4
4
  import classNames from 'classnames';
5
5
  import { isString } from 'lodash-es';
6
6
  import { useCallback, useImperativeHandle, useMemo, useRef } from 'react';
@@ -112,7 +112,7 @@ function CRUD<DataSource extends Record<string, any> = any, Key extends string |
112
112
  title: '操作',
113
113
  fixed: 'right',
114
114
  align: 'center',
115
- width: operateColumnProps?.width || 80,
115
+ width: operateColumnProps?.width || 120,
116
116
  render: function (_, record) {
117
117
  const btns: React.ReactNode[] = [];
118
118
 
@@ -122,9 +122,11 @@ function CRUD<DataSource extends Record<string, any> = any, Key extends string |
122
122
  const disabled = readProps?.operateIsDisabled?.(record) || false;
123
123
  if (disabled) {
124
124
  btns.push(
125
- <span key="read" className="cursor-not-allowed text-03">
126
- {readProps?.operateText || <EyeOutlined />}
127
- </span>,
125
+ <Tooltip title={readProps?.operateText || '查看'}>
126
+ <span key="read" className="cursor-not-allowed text-lg text-03">
127
+ {readProps?.operateText || <EyeOutlined />}
128
+ </span>
129
+ </Tooltip>,
128
130
  );
129
131
  } else {
130
132
  btns.push(
@@ -133,7 +135,11 @@ function CRUD<DataSource extends Record<string, any> = any, Key extends string |
133
135
  id={record[idField]}
134
136
  record={record}
135
137
  onSuccess={handleReload}
136
- trigger={<a>{readProps?.operateText || <EyeOutlined />}</a>}
138
+ trigger={
139
+ <Tooltip title={readProps?.operateText || '查看'}>
140
+ <a className="text-lg">{readProps?.operateText || <EyeOutlined />}</a>
141
+ </Tooltip>
142
+ }
137
143
  action="read"
138
144
  {...detailProps}
139
145
  />,
@@ -148,19 +154,24 @@ function CRUD<DataSource extends Record<string, any> = any, Key extends string |
148
154
  const disabled = readProps?.operateIsDisabled?.(record) || false;
149
155
  if (disabled) {
150
156
  btns.push(
151
- <span key="read" className="cursor-not-allowed text-03">
152
- {readProps?.operateText || <EyeOutlined />}
153
- </span>,
157
+ <Tooltip title={readProps?.operateText || '查看'}>
158
+ <span key="read" className="cursor-not-allowed text-lg text-03">
159
+ {readProps?.operateText || <EyeOutlined />}
160
+ </span>
161
+ </Tooltip>,
154
162
  );
155
163
  } else {
156
164
  btns.push(
157
- <Link
158
- key="read_detail"
159
- to={`./detail/${record[detailIdIndex || 'id']}`}
160
- target={readProps?.target}
161
- >
162
- {readProps?.operateText || <EyeOutlined />}
163
- </Link>,
165
+ <Tooltip title={readProps?.operateText || '查看'}>
166
+ <Link
167
+ key="read_detail"
168
+ to={`./detail/${record[detailIdIndex || 'id']}`}
169
+ target={readProps?.target}
170
+ className="text-lg"
171
+ >
172
+ {readProps?.operateText || <EyeOutlined />}
173
+ </Link>
174
+ </Tooltip>,
164
175
  );
165
176
  }
166
177
  }
@@ -173,9 +184,11 @@ function CRUD<DataSource extends Record<string, any> = any, Key extends string |
173
184
 
174
185
  if (disabled) {
175
186
  btns.push(
176
- <span key="update" className="cursor-not-allowed text-03">
177
- {updateProps?.operateText || <EditOutlined />}
178
- </span>,
187
+ <Tooltip title={updateProps?.operateText || '编辑'}>
188
+ <span key="update" className="cursor-not-allowed text-lg text-03">
189
+ {updateProps?.operateText || <EditOutlined />}
190
+ </span>
191
+ </Tooltip>,
179
192
  );
180
193
  } else {
181
194
  btns.push(
@@ -184,7 +197,11 @@ function CRUD<DataSource extends Record<string, any> = any, Key extends string |
184
197
  id={record[idField]}
185
198
  record={record}
186
199
  onSuccess={handleReload}
187
- trigger={<a>{updateProps?.operateText || <EditOutlined />}</a>}
200
+ trigger={
201
+ <Tooltip title={updateProps?.operateText || '编辑'}>
202
+ <a className="text-lg">{updateProps?.operateText || <EditOutlined />}</a>
203
+ </Tooltip>
204
+ }
188
205
  action="update"
189
206
  {...detailProps}
190
207
  />,
@@ -211,7 +228,7 @@ function CRUD<DataSource extends Record<string, any> = any, Key extends string |
211
228
  }
212
229
 
213
230
  return (
214
- <div className="fec-crud-operate-column flex justify-center gap-2">
231
+ <div className="fec-crud-operate-column flex justify-center gap-4">
215
232
  {operateColumnProps?.moreOperator && operateColumnProps.moreOperator(record)}
216
233
  {btns}
217
234
  {operateColumnProps?.moreOperatorAfter && operateColumnProps.moreOperatorAfter(record)}
@@ -1,5 +1,5 @@
1
1
  import { DeleteOutlined } from '@ant-design/icons';
2
- import { Modal } from 'antd';
2
+ import { Modal, Tooltip } from 'antd';
3
3
  import { useCallback } from 'react';
4
4
 
5
5
  interface Params {
@@ -40,13 +40,21 @@ function OperateDelete(props: Params) {
40
40
  const { doDelete } = useDelete({ name, desc, onDelete, operateText });
41
41
 
42
42
  if (disabled) {
43
- return <span className="cursor-not-allowed text-03">{operateText || <DeleteOutlined />}</span>;
43
+ return (
44
+ <Tooltip title="删除">
45
+ <span className="cursor-not-allowed text-lg text-03">
46
+ {operateText || <DeleteOutlined />}
47
+ </span>
48
+ </Tooltip>
49
+ );
44
50
  }
45
51
 
46
52
  return (
47
- <a style={{ color: 'red' }} onClick={doDelete}>
48
- {operateText || <DeleteOutlined />}
49
- </a>
53
+ <Tooltip title="删除">
54
+ <a style={{ color: 'red' }} className="text-lg" onClick={doDelete}>
55
+ {operateText || <DeleteOutlined />}
56
+ </a>
57
+ </Tooltip>
50
58
  );
51
59
  }
52
60
 
@@ -75,6 +75,7 @@ function Table<
75
75
  columns={newColumns}
76
76
  scroll={getTableScroll(newColumns)}
77
77
  search={newSearch}
78
+ bordered
78
79
  {...rest}
79
80
  className={classNames('fec-table', rest.className)}
80
81
  />
@@ -5,6 +5,22 @@
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
+
8
24
  .ant-pagination {
9
25
  // gap: 8px;
10
26
 
@@ -19,6 +35,12 @@
19
35
 
20
36
  .ant-pagination-item {
21
37
  border: 1px solid #e2e7f0;
38
+
39
+ &.ant-pagination-item-active {
40
+ color: theme('colors.theme08');
41
+ background-color: theme('colors.theme03');
42
+ border-color: theme('colors.theme05');
43
+ }
22
44
  }
23
45
  }
24
46
  }
@@ -188,7 +188,7 @@ function FileTree<D extends DataNode>(props: FileTreeProps<D>) {
188
188
  return (
189
189
  <Detail
190
190
  action="create"
191
- trigger={<PlusOutlined />}
191
+ trigger={<PlusOutlined className="text-base" />}
192
192
  requestCreateByValues={requestCreateByValues}
193
193
  />
194
194
  );