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.
- package/dist/es/dynamicsetting/dynamicDrawer.js +1 -0
- package/dist/es/dynamicsetting/dynamicSetting.js +5 -0
- package/dist/es/dynamicsetting/interface.d.ts +1 -0
- package/dist/es/table/interface.d.ts +4 -0
- package/dist/es/table/table.js +10 -0
- package/dist/es/table/useInnerPagination.js +12 -1
- package/dist/es/watermark/watermark-shadow.js +5 -2
- package/package.json +1 -1
|
@@ -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;
|
package/dist/es/table/table.js
CHANGED
|
@@ -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) {
|
|
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
|
|
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
|
-
|
|
105
|
+
// 将这个层级设置为最高
|
|
106
|
+
zIndex: 9999,
|
|
104
107
|
position: "absolute",
|
|
105
108
|
visibility: "visible",
|
|
106
109
|
overflow: "hidden",
|