zmdms-webui 1.0.0 → 1.0.2

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.
@@ -25,6 +25,7 @@ var DynamicDrawer = function (props, ref) {
25
25
  return {
26
26
  setVisible: setVisible,
27
27
  onSure: onSure,
28
+ onReset: onReset,
28
29
  };
29
30
  });
30
31
  // 根据item的checkod 获取当前选中项
@@ -33,6 +33,11 @@ var DynamicSetting = function (props, ref) {
33
33
  var _a;
34
34
  (_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.onSure(list);
35
35
  },
36
+ // 重置数据
37
+ resetList: function () {
38
+ var _a;
39
+ (_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.onReset();
40
+ },
36
41
  };
37
42
  });
38
43
  return Array.isArray(list) && list.length > 0 ? (jsxs("div", __assign({ className: "ztxk-dynamic-setting" }, { children: [hiddenOperationIcon ? null : (jsx("div", __assign({ onClick: function () { var _a; return (_a = drawerRef.current) === null || _a === void 0 ? void 0 : _a.setVisible(true); } }, { children: children ? (children) : (jsx(SettingOutlined, { style: { fontSize: 18, color: "#768696" } })) }))), jsx(DynamicDrawer, { list: list, dynamicKey: dynamicKey, parentDynamicKey: parentDynamicKey, ref: drawerRef, title: title, onCurrentListChange: onCurrentListChange, isFixed: isFixed, isMore: isMore })] }))) : null;
@@ -22,6 +22,7 @@ interface IRef {
22
22
  setList: React.Dispatch<React.SetStateAction<IDynamicItem[]>>;
23
23
  setVisible: (v: boolean) => void;
24
24
  updateList: (list: any) => void;
25
+ resetList: () => void;
25
26
  }
26
27
 
27
28
  export { IDynamicItem, IDynamicSettingProps, IRef };
@@ -171,6 +171,10 @@ interface ITableRefHandel {
171
171
  y: number;
172
172
  vid: string;
173
173
  }) => void;
174
+ /**
175
+ * 重置
176
+ */
177
+ onResetDynamicList?: () => void;
174
178
  }
175
179
  interface ITableProps<RecordType> extends Omit<TableProps<RecordType>, "columns"> {
176
180
  /**
@@ -235,6 +235,16 @@ var Table = function (props) {
235
235
  scrollTo: function (obj) {
236
236
  scrollTo(obj);
237
237
  },
238
+ /** 动态列配置重置 */
239
+ onResetDynamicList: function () {
240
+ var _a, _b;
241
+ (_b = (_a = dynamicSettingRef.current) === null || _a === void 0 ? void 0 : _a.resetList) === null || _b === void 0 ? void 0 : _b.call(_a);
242
+ },
243
+ /** 动态列配置设置 */
244
+ onSetDynamicList: function (list) {
245
+ var _a, _b;
246
+ (_b = (_a = dynamicSettingRef.current) === null || _a === void 0 ? void 0 : _a.updateList) === null || _b === void 0 ? void 0 : _b.call(_a, list);
247
+ },
238
248
  };
239
249
  });
240
250
  // 表格
@@ -40,7 +40,13 @@ function useInnerPagination(isInnerPagination, innerPaginationPageSize, options)
40
40
  if (currentPageNum && currentPageNum > 1 && currentPageSizeNum) {
41
41
  var prePageTotalNum = (currentPageNum - 1) * currentPageSizeNum;
42
42
  if (prePageTotalNum >= currentDataNum) {
43
- setCurrent(function (preCurrent) { return preCurrent - 1; });
43
+ setCurrent(function (preCurrent) {
44
+ // 及时更新当前的值 因为可能会在render中使用
45
+ if (currentPage.current) {
46
+ currentPage.current.page = preCurrent - 1;
47
+ }
48
+ return preCurrent - 1;
49
+ });
44
50
  }
45
51
  }
46
52
  }
@@ -52,6 +58,11 @@ function useInnerPagination(isInnerPagination, innerPaginationPageSize, options)
52
58
  if (isInnerPagination) {
53
59
  setCurrent(page);
54
60
  setPageSize(pageSize);
61
+ // 及时更新当前的值 因为可能会在render中使用
62
+ currentPage.current = {
63
+ page: page,
64
+ pageSize: Number(pageSize),
65
+ };
55
66
  }
56
67
  },
57
68
  hideOnSinglePage: true,
@@ -4,7 +4,9 @@ import { createWatermark } from './utils.js';
4
4
  import { useMemoizedFn, useMount } from 'ahooks';
5
5
 
6
6
  var WatermarkShadow = function (props, ref) {
7
- var zIndex = props.zIndex, isMutationObserver = props.isMutationObserver, content = props.content, font = props.font, rotate = props.rotate, width = props.width, height = props.height, containerDomRef = props.containerDomRef;
7
+ var
8
+ // zIndex,
9
+ isMutationObserver = props.isMutationObserver, content = props.content, font = props.font, rotate = props.rotate, width = props.width, height = props.height, containerDomRef = props.containerDomRef;
8
10
  var waterDomRef = useRef(null);
9
11
  var shadowRootRef = useRef();
10
12
  var createWaterMemo = useMemoizedFn(function () {
@@ -100,7 +102,8 @@ var WatermarkShadow = function (props, ref) {
100
102
  };
101
103
  });
102
104
  return (jsx("div", { ref: waterDomRef, className: "ztxk-watermark--div", style: {
103
- zIndex: zIndex,
105
+ // 将这个层级设置为最高
106
+ zIndex: 9999,
104
107
  position: "absolute",
105
108
  visibility: "visible",
106
109
  overflow: "hidden",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zmdms-webui",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "private": false,
5
5
  "main": "dist/index.es.js",
6
6
  "module": "dist/index.es.js",