zmdms-webui 3.1.3 → 3.1.4
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/applayoutsider/appLayoutSider.js +1 -0
- package/dist/es/applayoutsider/menu/hook.js +4 -2
- package/dist/es/config/ZtxkContext.d.ts +4 -0
- package/dist/es/config/ZtxkContext.js +1 -0
- package/dist/es/node_modules/@ant-design/icons/es/icons/UpOutlined.js +18 -0
- package/dist/es/node_modules/@ant-design/icons-svg/es/asn/UpOutlined.js +5 -0
- package/dist/es/table/table.js +25 -3
- package/dist/es/uploadlist/uploadList.js +1 -1
- package/package.json +1 -1
|
@@ -55,6 +55,7 @@ var AppLayoutSider = function (props) {
|
|
|
55
55
|
? "/".concat(prefix).concat(path)
|
|
56
56
|
: path;
|
|
57
57
|
}, [menuJoinRule]);
|
|
58
|
+
console.log(mainMenuSelectedKeys);
|
|
58
59
|
return (jsx(Layout.Sider, __assign({ className: "zmdms-sider", collapsedWidth: "0", collapsible: true, trigger: null, width: siderWidth, ref: layoutSiderRef, style: {
|
|
59
60
|
backgroundImage: "url(".concat(siderBg, ")"),
|
|
60
61
|
} }, { children: jsx(LayoutMenuContext.Provider, __assign({ value: {
|
|
@@ -98,7 +98,7 @@ function useSubMenuOpenKeys(userSubMenus, activeTab, options) {
|
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
100
|
// 如果没有选中页签
|
|
101
|
-
if (!activeTab) {
|
|
101
|
+
if (!activeTab || activeTab === "/") {
|
|
102
102
|
return;
|
|
103
103
|
}
|
|
104
104
|
// 专门为那种主菜单带路由跳转的逻辑处理
|
|
@@ -186,7 +186,9 @@ function useSubMenuOpenKeys(userSubMenus, activeTab, options) {
|
|
|
186
186
|
if (Array.isArray(value)) {
|
|
187
187
|
// 要先过滤掉没有子级的菜单,因为没有子级的菜单不需要展开
|
|
188
188
|
setOpenKeys(value
|
|
189
|
-
.filter(function (i) {
|
|
189
|
+
.filter(function (i) {
|
|
190
|
+
return Array.isArray(i.children) && i.children.length > 0;
|
|
191
|
+
})
|
|
190
192
|
.map(function (i) { return i.id; }));
|
|
191
193
|
}
|
|
192
194
|
return true;
|
|
@@ -70,6 +70,10 @@ interface IZtxkConfig {
|
|
|
70
70
|
* 操作按钮是否默认展示更多按钮
|
|
71
71
|
*/
|
|
72
72
|
enableOperationBtnGroupShowMore?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* 表格的展开收起图标是否使用组件自定义图标,或者自己自定义
|
|
75
|
+
*/
|
|
76
|
+
enableTableExpandIcon?: boolean | ((option: any) => React__default.ReactNode);
|
|
73
77
|
}
|
|
74
78
|
declare const ZtxkContext: React__default.Context<IZtxkConfig>;
|
|
75
79
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import _objectSpread2 from '../../../../@babel/runtime/helpers/esm/objectSpread2.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import UpOutlinedSvg from '../../../icons-svg/es/asn/UpOutlined.js';
|
|
4
|
+
import AntdIcon from '../components/AntdIcon.js';
|
|
5
|
+
|
|
6
|
+
var UpOutlined = function UpOutlined(props, ref) {
|
|
7
|
+
return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
8
|
+
ref: ref,
|
|
9
|
+
icon: UpOutlinedSvg
|
|
10
|
+
}));
|
|
11
|
+
};
|
|
12
|
+
var RefIcon = /*#__PURE__*/React.forwardRef(UpOutlined);
|
|
13
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
14
|
+
RefIcon.displayName = 'UpOutlined';
|
|
15
|
+
}
|
|
16
|
+
var UpOutlined$1 = RefIcon;
|
|
17
|
+
|
|
18
|
+
export { UpOutlined$1 as default };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// This icon file is generated automatically.
|
|
2
|
+
var UpOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z" } }] }, "name": "up", "theme": "outlined" };
|
|
3
|
+
var UpOutlinedSvg = UpOutlined;
|
|
4
|
+
|
|
5
|
+
export { UpOutlinedSvg as default };
|
package/dist/es/table/table.js
CHANGED
|
@@ -34,6 +34,8 @@ import useTableSummaryCollapse from './useTableSummaryCollapse.js';
|
|
|
34
34
|
import MehOutlined from '../node_modules/@ant-design/icons/es/icons/MehOutlined.js';
|
|
35
35
|
import { DndProvider } from '../node_modules/react-dnd/dist/core/DndProvider.js';
|
|
36
36
|
import DynamicSetting from '../dynamicsetting/dynamicSetting.js';
|
|
37
|
+
import UpOutlined from '../node_modules/@ant-design/icons/es/icons/UpOutlined.js';
|
|
38
|
+
import DownOutlined from '../node_modules/@ant-design/icons/es/icons/DownOutlined.js';
|
|
37
39
|
|
|
38
40
|
// completed: 实现列拖拽切换位置、显隐功能
|
|
39
41
|
// completed: 实现新增行、删除行功能 新增时 可以选择新增多少行 删除时 可以选择删除全部
|
|
@@ -50,7 +52,12 @@ var Table = function (props) {
|
|
|
50
52
|
var _a;
|
|
51
53
|
// console.log("表格渲染");
|
|
52
54
|
var className = props.className, _b = props.bordered, bordered = _b === void 0 ? true : _b, _c = props.pagination, pagination = _c === void 0 ? false : _c, isFlex = props.isFlex; props.tablePreferences; var dynamicKey = props.dynamicKey, dynamicVersion = props.dynamicVersion, customDynamicListHandle = props.customDynamicListHandle, isRemeberFilter = props.isRemeberFilter, _d = props.isOrderUpdateData, isOrderUpdateData = _d === void 0 ? true : _d, hiddenDynamicIcon = props.hiddenDynamicIcon, _columns = props.columns, dataSource = props.dataSource, onTableChange = props.onTableChange, isEdit = props.isEdit, isMove = props.isMove, isAdd = props.isAdd, hiddenAddBtnHandle = props.hiddenAddBtnHandle, _e = props.isTheadTitleAdd, isTheadTitleAdd = _e === void 0 ? true : _e, addMode = props.addMode, addCallback = props.addCallback, isDel = props.isDel, delPopTitle = props.delPopTitle, hiddenDelBtnHandle = props.hiddenDelBtnHandle, _f = props.isDelAll, isDelAll = _f === void 0 ? true : _f, isAddAndDelAuto = props.isAddAndDelAuto, summaryConfig = props.summaryConfig, _g = props.summaryFixed, summaryFixed = _g === void 0 ? true : _g, isInnerPagination = props.isInnerPagination, _h = props.innerPaginationPageSize, innerPaginationPageSize = _h === void 0 ? 30 : _h, _j = props.innerPaginationPosition, innerPaginationPosition = _j === void 0 ? INNER_TABLE_PAGINATION_POSITION : _j, _k = props.innerPaginationPageSizeOptions, innerPaginationPageSizeOptions = _k === void 0 ? INNER_TABLE_PAGINATION_PAGESIZEOPTIONS : _k, innerPaginationConfig = props.innerPaginationConfig, tableRefHandle = props.tableRefHandle, tableName = props.tableName, serviceOrder = props.serviceOrder, differences = props.differences, virtualKey = props.virtualKey, _l = props.isResizableColumn, isResizableColumn = _l === void 0 ? true : _l, _m = props.isResizableTitleEllipsis, isResizableTitleEllipsis = _m === void 0 ? true : _m, _o = props.isRealTimeValidate, isRealTimeValidate = _o === void 0 ? true : _o, isMarginTop = props.isMarginTop, isMarginBottom = props.isMarginBottom, scroll = props.scroll, addAndDelProps = props.addAndDelProps, _p = props.autoScrollYMarginBottom, autoScrollYMarginBottom = _p === void 0 ? 65 : _p, _q = props.isAutoScrollY, isAutoScrollY = _q === void 0 ? false : _q, tableId = props.tableId, extraOnRow = props.onRow, fixedRowsCount = props.fixedRowsCount, fixedRowsConfig = props.fixedRowsConfig, headerAlign = props.headerAlign, isDimensionDynamic = props.isDimensionDynamic, _r = props.isDimensionMergeChildren, isDimensionMergeChildren = _r === void 0 ? true : _r, dimensionCustomSumKeys = props.dimensionCustomSumKeys, isAutoMerge = props.isAutoMerge, mode = props.mode, rowSelection = props.rowSelection, isContextMenu = props.isContextMenu, isFullscreenHandle = props.isFullscreenHandle, _s = props.isExportSummary, isExportSummary = _s === void 0 ? true : _s, isAutoMergeAddAndDel = props.isAutoMergeAddAndDel, isDynamicColumnText = props.isDynamicColumnText, isTableSummaryCollapse = props.isTableSummaryCollapse, isTableSummaryDefaultExpand = props.isTableSummaryDefaultExpand, emptyCompact = props.emptyCompact, rowKey = props.rowKey, resetProps = __rest(props, ["className", "bordered", "pagination", "isFlex", "tablePreferences", "dynamicKey", "dynamicVersion", "customDynamicListHandle", "isRemeberFilter", "isOrderUpdateData", "hiddenDynamicIcon", "columns", "dataSource", "onTableChange", "isEdit", "isMove", "isAdd", "hiddenAddBtnHandle", "isTheadTitleAdd", "addMode", "addCallback", "isDel", "delPopTitle", "hiddenDelBtnHandle", "isDelAll", "isAddAndDelAuto", "summaryConfig", "summaryFixed", "isInnerPagination", "innerPaginationPageSize", "innerPaginationPosition", "innerPaginationPageSizeOptions", "innerPaginationConfig", "tableRefHandle", "tableName", "serviceOrder", "differences", "virtualKey", "isResizableColumn", "isResizableTitleEllipsis", "isRealTimeValidate", "isMarginTop", "isMarginBottom", "scroll", "addAndDelProps", "autoScrollYMarginBottom", "isAutoScrollY", "tableId", "onRow", "fixedRowsCount", "fixedRowsConfig", "headerAlign", "isDimensionDynamic", "isDimensionMergeChildren", "dimensionCustomSumKeys", "isAutoMerge", "mode", "rowSelection", "isContextMenu", "isFullscreenHandle", "isExportSummary", "isAutoMergeAddAndDel", "isDynamicColumnText", "isTableSummaryCollapse", "isTableSummaryDefaultExpand", "emptyCompact", "rowKey"]);
|
|
53
|
-
var _t = useBaseContext(), enableDynamicColumnText = _t.enableDynamicColumnText, enableTableSummaryCollapse = _t.enableTableSummaryCollapse, enableTableSummaryDefaultExpand = _t.enableTableSummaryDefaultExpand;
|
|
55
|
+
var _t = useBaseContext(), enableDynamicColumnText = _t.enableDynamicColumnText, enableTableSummaryCollapse = _t.enableTableSummaryCollapse, enableTableSummaryDefaultExpand = _t.enableTableSummaryDefaultExpand, enableTableExpandIcon = _t.enableTableExpandIcon;
|
|
56
|
+
// 处理expandable
|
|
57
|
+
var expandIcon = getExpandIcon({
|
|
58
|
+
expandable: props.expandable,
|
|
59
|
+
enableTableExpandIcon: enableTableExpandIcon,
|
|
60
|
+
});
|
|
54
61
|
// 表格动态列配置是否显示文字
|
|
55
62
|
var isDynamicColumnTextEnable = getFinalValue(enableDynamicColumnText, isDynamicColumnText);
|
|
56
63
|
// 表格合计是否可以展开收起
|
|
@@ -454,7 +461,8 @@ var Table = function (props) {
|
|
|
454
461
|
? function () {
|
|
455
462
|
return document.querySelector(".ztxk-table--fullscreen") || document.body;
|
|
456
463
|
}
|
|
457
|
-
: undefined }, resetProps, {
|
|
464
|
+
: undefined }, resetProps, { expandable: expandIcon
|
|
465
|
+
? __assign(__assign({}, props.expandable), { expandIcon: expandIcon }) : props.expandable, rowKey: newRowKey, locale: locale })));
|
|
458
466
|
return (jsxs("div", __assign({ style: isFlex
|
|
459
467
|
? {
|
|
460
468
|
position: "relative",
|
|
@@ -485,6 +493,20 @@ MemoTable.Summary = Table$1.Summary;
|
|
|
485
493
|
MemoTable.TitleDirectionColumn = TitleDirectionColumn;
|
|
486
494
|
MemoTable.TableDynamicHeader = TableDynamicHeader;
|
|
487
495
|
MemoTable.DifferencesClassName = "ztxk-table--differences";
|
|
488
|
-
MemoTable.IS_SUMMARY = IS_SUMMARY;
|
|
496
|
+
MemoTable.IS_SUMMARY = IS_SUMMARY;
|
|
497
|
+
function getExpandIcon(option) {
|
|
498
|
+
var expandable = option.expandable, enableTableExpandIcon = option.enableTableExpandIcon;
|
|
499
|
+
var expandIcon = null;
|
|
500
|
+
if (expandable && !expandable.expandIcon && enableTableExpandIcon) {
|
|
501
|
+
expandIcon =
|
|
502
|
+
enableTableExpandIcon === true
|
|
503
|
+
? function (_a) {
|
|
504
|
+
var expanded = _a.expanded, onExpand = _a.onExpand, record = _a.record;
|
|
505
|
+
return expanded ? (jsx(UpOutlined, { onClick: function (e) { return onExpand(record, e); } })) : (jsx(DownOutlined, { onClick: function (e) { return onExpand(record, e); } }));
|
|
506
|
+
}
|
|
507
|
+
: enableTableExpandIcon;
|
|
508
|
+
}
|
|
509
|
+
return expandIcon;
|
|
510
|
+
}
|
|
489
511
|
|
|
490
512
|
export { MemoTable as default };
|
|
@@ -301,7 +301,7 @@ var UploadList = function (props, ref) {
|
|
|
301
301
|
};
|
|
302
302
|
}, [showTable, isDownload, isDelete]);
|
|
303
303
|
// 上传子元素
|
|
304
|
-
var renderChildren = (jsx(Upload, __assign({ showUploadList: showUploadListMemo, multiple: true, beforeUpload: beforeUploadHandle, onChange: onChangeHandle, action: fileAction, headers: fileHeaders, data: fileData, fileList: innerFileList, onPreview: onPreview, onDownload: onDownload }, resetProps, { children: children ? (children) : !listType || listType === "text" ? (jsxs(ButtonCom, __assign({ type: "primary", icon: jsx(UploadOutlined, {}) }, { children: [btnText || "添加附件", maxCount ? "(\u6700\u591A\u4E0A\u4F20".concat(maxCount, "\u4E2A\u6587\u4EF6)") : ""] }))) : isImage &&
|
|
304
|
+
var renderChildren = (jsx(Upload, __assign({ showUploadList: showUploadListMemo, multiple: maxCount === 1 ? false : true, beforeUpload: beforeUploadHandle, onChange: onChangeHandle, action: fileAction, headers: fileHeaders, data: fileData, fileList: innerFileList, onPreview: onPreview, onDownload: onDownload }, resetProps, { children: children ? (children) : !listType || listType === "text" ? (jsxs(ButtonCom, __assign({ type: "primary", icon: jsx(UploadOutlined, {}) }, { children: [btnText || "添加附件", maxCount ? "(\u6700\u591A\u4E0A\u4F20".concat(maxCount, "\u4E2A\u6587\u4EF6)") : ""] }))) : isImage &&
|
|
305
305
|
maxCount &&
|
|
306
306
|
innerFileList &&
|
|
307
307
|
innerFileList.length >= maxCount &&
|