@hzab/list-render 1.9.12 → 1.9.14

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,3 +1,11 @@
1
+ # @hzab/list-render@1.9.14
2
+
3
+ fix: 拖动列添加fixed
4
+
5
+ # @hzab/list-render@1.9.13
6
+
7
+ fix: 首次自动请求 onSearch 入参添加 queryFormInitialValues
8
+
1
9
  # @hzab/list-render@1.9.12
2
10
 
3
11
  fix: table添加拖拽排序
package/README.md CHANGED
@@ -117,6 +117,7 @@ const listDM = useMemo(
117
117
  | orderColWidth | string/number | | - | 序号列 width 的参数 |
118
118
  | tableEmptyValue | string/number | | undefined | table 列表空值展示数 |
119
119
  | isTableSortXIdex | Boolean | | undefined | table 列表列排序是否按照 x-index 排序 |
120
+ | dragColConf | Object | | undefined | 拖拽列的配置 |
120
121
  | isDargTable | Boolean | | undefined | 是否开启表格拖拽排序 |
121
122
  | dargEndBack | function | | undefined | 拖拽结束后返回表格数据 |
122
123
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hzab/list-render",
3
- "version": "1.9.12",
3
+ "version": "1.9.14",
4
4
  "description": "",
5
5
  "main": "src",
6
6
  "scripts": {
@@ -24,6 +24,7 @@
24
24
  "@hzab/data-model": "^1.7.4",
25
25
  "@hzab/form-render": "^1.6.12",
26
26
  "@hzab/formily-result-utils": "^1.2.0",
27
+ "@hzab/permissions": "^1.0.0",
27
28
  "@hzab/schema-descriptions": "^1.3.0",
28
29
  "@hzab/webpack-config": "^0.7.2",
29
30
  "@types/react": "^17.0.62",
@@ -31,6 +32,8 @@
31
32
  "antd": "^4.24.12",
32
33
  "axios": "^1.4.0",
33
34
  "eslint": "^8.30.0",
35
+ "mobx": "^6.7.0",
36
+ "mobx-react": "^7.6.0",
34
37
  "less": "^4.1.3",
35
38
  "lodash": "^4.17.21",
36
39
  "react": "^17.0.2",
@@ -21,6 +21,7 @@ export const FormilyField = memo(function (props: formilyFieldPropsT) {
21
21
  const { fields, fieldSchemas } = formilyRef.current || {};
22
22
  const SchemaField = useCallback(
23
23
  createSchemaField({
24
+ // @ts-ignore
24
25
  components: {
25
26
  ...antdComponents,
26
27
  ...customComponents,
@@ -98,7 +98,8 @@ const ListRender = forwardRef(function (props, parentRef) {
98
98
  }
99
99
  model.query.pageNum = 1;
100
100
  }
101
- !props.closeAutoRequest && getList();
101
+ // 首次自动请求,取 筛选表单的默认值 进行请求
102
+ !props.closeAutoRequest && onSearch(queryFormInitialValues);
102
103
  }, []);
103
104
 
104
105
  useEffect(() => {
@@ -21,6 +21,7 @@ function TableRender(props) {
21
21
  const { config = {}, query = {}, i18n, setList } = props;
22
22
  const { tableDel = "删除", tableEdit = "编辑", tableDelTip = "确认删除该项?", tableDetail = "详情" } = i18n || {};
23
23
  const {
24
+ dragColConf = {},
24
25
  isDargTable,
25
26
  dargEndBack,
26
27
  orderColType,
@@ -270,8 +271,10 @@ function TableRender(props) {
270
271
  columns.unshift({
271
272
  title: "",
272
273
  dataIndex: "sort",
273
- width: 30,
274
+ width: 60,
275
+ fixed: "left",
274
276
  render: () => <DragHandle />,
277
+ ...dragColConf,
275
278
  });
276
279
  }
277
280
  setColumns(columns);