@fe-free/core 3.0.49 → 3.0.51

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,21 @@
1
1
  # @fe-free/core
2
2
 
3
+ ## 3.0.51
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: crud
8
+ - @fe-free/icons@3.0.51
9
+ - @fe-free/tool@3.0.51
10
+
11
+ ## 3.0.50
12
+
13
+ ### Patch Changes
14
+
15
+ - feat: curd
16
+ - @fe-free/icons@3.0.50
17
+ - @fe-free/tool@3.0.50
18
+
3
19
  ## 3.0.49
4
20
 
5
21
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fe-free/core",
3
- "version": "3.0.49",
3
+ "version": "3.0.51",
4
4
  "description": "",
5
5
  "main": "./src/index.ts",
6
6
  "author": "",
@@ -46,8 +46,8 @@
46
46
  "antd": "^5.27.1",
47
47
  "dayjs": "~1.11.10",
48
48
  "react": "^19.2.0",
49
- "@fe-free/icons": "3.0.49",
50
- "@fe-free/tool": "3.0.49"
49
+ "@fe-free/icons": "3.0.51",
50
+ "@fe-free/tool": "3.0.51"
51
51
  },
52
52
  "scripts": {
53
53
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -58,10 +58,9 @@ let fakeData = makeData(21);
58
58
  async function fakeRequest(params) {
59
59
  console.log('fakeRequest', params);
60
60
 
61
- let data = fakeData.slice(
62
- (params.current - 1) * params.pageSize,
63
- params.current * params.pageSize,
64
- );
61
+ let data = params.current
62
+ ? fakeData.slice((params.current - 1) * params.pageSize, params.current * params.pageSize)
63
+ : fakeData;
65
64
  Object.keys(params).forEach((field) => {
66
65
  if (params[field] !== undefined && params[field] !== '') {
67
66
  data = data.filter((item) => {
@@ -45,7 +45,7 @@ function useOperate(props, detailProps, actionRef) {
45
45
  throw new Error('没有传 requestDeleteByRecord');
46
46
  };
47
47
  },
48
- [actionRef, deleteProps, requestDeleteByRecord],
48
+ [actionRef, deleteProps, message, requestDeleteByRecord],
49
49
  );
50
50
 
51
51
  const handleReload = useCallback(() => {
@@ -114,13 +114,12 @@ function useOperate(props, detailProps, actionRef) {
114
114
  icon={<EyeOutlined />}
115
115
  operateText={readProps?.operateText}
116
116
  onClick={() => {
117
+ const path = `${window.location.pathname}/detail/${record[detailIdIndex || 'id']}`;
117
118
  if (readProps?.target === '_blank') {
118
- const url = `${window.location.pathname}/detail/${record[detailIdIndex || 'id']}`;
119
- window.open(url, readProps?.target);
119
+ window.open(path, readProps?.target);
120
120
  } else {
121
121
  routeTool.navigateTo({
122
- path: './detail/:id',
123
- params: { id: record[detailIdIndex || 'id'] },
122
+ path: path.replace(routeTool.getBaseName(), ''),
124
123
  });
125
124
  }
126
125
  }}
@@ -57,6 +57,12 @@
57
57
 
58
58
  .ant-pro-card:not(.ant-pro-table-search) {
59
59
  margin-top: -48px;
60
+
61
+ & > .ant-pro-card-body {
62
+ // height: 100%;
63
+ display: flex;
64
+ flex-direction: column;
65
+ }
60
66
  }
61
67
 
62
68
  .ant-pro-table-list-toolbar {