@fe-free/core 3.0.24 → 3.0.25

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,12 @@
1
1
  # @fe-free/core
2
2
 
3
+ ## 3.0.25
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: ui
8
+ - @fe-free/tool@3.0.25
9
+
3
10
  ## 3.0.24
4
11
 
5
12
  ### 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.25",
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.25"
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';
@@ -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-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>{readProps?.operateText || <EyeOutlined />}</a>
141
+ </Tooltip>
142
+ }
137
143
  action="read"
138
144
  {...detailProps}
139
145
  />,
@@ -148,19 +154,23 @@ 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-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
+ >
171
+ {readProps?.operateText || <EyeOutlined />}
172
+ </Link>
173
+ </Tooltip>,
164
174
  );
165
175
  }
166
176
  }
@@ -173,9 +183,11 @@ function CRUD<DataSource extends Record<string, any> = any, Key extends string |
173
183
 
174
184
  if (disabled) {
175
185
  btns.push(
176
- <span key="update" className="cursor-not-allowed text-03">
177
- {updateProps?.operateText || <EditOutlined />}
178
- </span>,
186
+ <Tooltip title={updateProps?.operateText || '编辑'}>
187
+ <span key="update" className="cursor-not-allowed text-03">
188
+ {updateProps?.operateText || <EditOutlined />}
189
+ </span>
190
+ </Tooltip>,
179
191
  );
180
192
  } else {
181
193
  btns.push(
@@ -184,7 +196,11 @@ function CRUD<DataSource extends Record<string, any> = any, Key extends string |
184
196
  id={record[idField]}
185
197
  record={record}
186
198
  onSuccess={handleReload}
187
- trigger={<a>{updateProps?.operateText || <EditOutlined />}</a>}
199
+ trigger={
200
+ <Tooltip title={updateProps?.operateText || '编辑'}>
201
+ <a>{updateProps?.operateText || <EditOutlined />}</a>
202
+ </Tooltip>
203
+ }
188
204
  action="update"
189
205
  {...detailProps}
190
206
  />,
@@ -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,19 @@ 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-03">{operateText || <DeleteOutlined />}</span>
46
+ </Tooltip>
47
+ );
44
48
  }
45
49
 
46
50
  return (
47
- <a style={{ color: 'red' }} onClick={doDelete}>
48
- {operateText || <DeleteOutlined />}
49
- </a>
51
+ <Tooltip title="删除">
52
+ <a style={{ color: 'red' }} onClick={doDelete}>
53
+ {operateText || <DeleteOutlined />}
54
+ </a>
55
+ </Tooltip>
50
56
  );
51
57
  }
52
58
 
@@ -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
  );