zmdms-webui 0.0.151 → 0.0.153
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/inputnumber/inputNumber.js +2 -2
- package/dist/es/table/interface.d.ts +2 -0
- package/dist/es/table/table.js +9 -2
- package/dist/es/tree/tree.js +11 -2
- package/dist/es/treeselect/treeSelect.js +1 -1
- package/dist/es/zttransfer/index.css +1 -1
- package/dist/index.dark.css +1 -1
- package/dist/index.default.css +1 -1
- package/package.json +1 -1
|
@@ -11,11 +11,11 @@ var controls = {
|
|
|
11
11
|
downIcon: jsx(ButtonCom, __assign({ type: "link" }, { children: "-" })),
|
|
12
12
|
};
|
|
13
13
|
var InputNumber = function (props, ref) {
|
|
14
|
-
var formatterType = props.formatterType, currencySymbol = props.currencySymbol, formatter = props.formatter, parser = props.parser, precision = props.precision, onBlur = props.onBlur, onFocus = props.onFocus,
|
|
14
|
+
var formatterType = props.formatterType, currencySymbol = props.currencySymbol, formatter = props.formatter, parser = props.parser, precision = props.precision, onBlur = props.onBlur, onFocus = props.onFocus, leftRightStyle = props.leftRightStyle, className = props.className, resetProps = __rest(props, ["formatterType", "currencySymbol", "formatter", "parser", "precision", "onBlur", "onFocus", "leftRightStyle", "className"]);
|
|
15
15
|
// 元素是否获得焦点
|
|
16
16
|
// 用来处理formatter优先级比precision高的问题
|
|
17
17
|
var isFocusRef = useRef(false);
|
|
18
|
-
var
|
|
18
|
+
var _a = getFormatter(formatterType, currencySymbol, isFocusRef, precision), _formatter = _a.formatter, _parser = _a.parser, _precision = _a.precision;
|
|
19
19
|
var onBlurHandle = function (e) {
|
|
20
20
|
isFocusRef.current = false;
|
|
21
21
|
onBlur && onBlur(e);
|
|
@@ -281,6 +281,8 @@ interface ITableProps<RecordType> extends Omit<TableProps<RecordType>, "columns"
|
|
|
281
281
|
* 也可以传入一个函数
|
|
282
282
|
*/
|
|
283
283
|
differences?: number[] | ((record: any, index: number) => boolean);
|
|
284
|
+
isMarginTop?: boolean;
|
|
285
|
+
isMarginBottom?: boolean;
|
|
284
286
|
}
|
|
285
287
|
interface IFields {
|
|
286
288
|
/**
|
package/dist/es/table/table.js
CHANGED
|
@@ -37,7 +37,7 @@ import { DndProvider } from '../node_modules/react-dnd/dist/core/DndProvider.js'
|
|
|
37
37
|
// TODO: 过滤功能
|
|
38
38
|
var Table = function (props) {
|
|
39
39
|
// console.log("表格渲染");
|
|
40
|
-
var className = props.className, _a = props.bordered, bordered = _a === void 0 ? true : _a, _b = props.pagination, pagination = _b === void 0 ? false : _b, isFlex = props.isFlex; props.tablePreferences; var dynamicKey = props.dynamicKey, hiddenDynamicIcon = props.hiddenDynamicIcon, _columns = props.columns, dataSource = props.dataSource, onTableChange = props.onTableChange, isEdit = props.isEdit, isMove = props.isMove, isAdd = props.isAdd, addMode = props.addMode, addCallback = props.addCallback, isDel = props.isDel, hiddenDelBtnHandle = props.hiddenDelBtnHandle, _c = props.isDelAll, isDelAll = _c === void 0 ? true : _c, isAddAndDelAuto = props.isAddAndDelAuto, summaryConfig = props.summaryConfig, _d = props.summaryFixed, summaryFixed = _d === void 0 ? true : _d, isInnerPagination = props.isInnerPagination, _e = props.innerPaginationPageSize, innerPaginationPageSize = _e === void 0 ? 30 : _e, _f = props.innerPaginationPosition, innerPaginationPosition = _f === void 0 ? INNER_TABLE_PAGINATION_POSITION : _f, _g = props.innerPaginationPageSizeOptions, innerPaginationPageSizeOptions = _g === void 0 ? INNER_TABLE_PAGINATION_PAGESIZEOPTIONS : _g, tableRefHandle = props.tableRefHandle, tableName = props.tableName, serviceOrder = props.serviceOrder, differences = props.differences, virtualKey = props.virtualKey, _h = props.isResizableColumn, isResizableColumn = _h === void 0 ? true : _h, _j = props.isRealTimeValidate, isRealTimeValidate = _j === void 0 ? true : _j, resetProps = __rest(props, ["className", "bordered", "pagination", "isFlex", "tablePreferences", "dynamicKey", "hiddenDynamicIcon", "columns", "dataSource", "onTableChange", "isEdit", "isMove", "isAdd", "addMode", "addCallback", "isDel", "hiddenDelBtnHandle", "isDelAll", "isAddAndDelAuto", "summaryConfig", "summaryFixed", "isInnerPagination", "innerPaginationPageSize", "innerPaginationPosition", "innerPaginationPageSizeOptions", "tableRefHandle", "tableName", "serviceOrder", "differences", "virtualKey", "isResizableColumn", "isRealTimeValidate"]);
|
|
40
|
+
var className = props.className, _a = props.bordered, bordered = _a === void 0 ? true : _a, _b = props.pagination, pagination = _b === void 0 ? false : _b, isFlex = props.isFlex; props.tablePreferences; var dynamicKey = props.dynamicKey, hiddenDynamicIcon = props.hiddenDynamicIcon, _columns = props.columns, dataSource = props.dataSource, onTableChange = props.onTableChange, isEdit = props.isEdit, isMove = props.isMove, isAdd = props.isAdd, addMode = props.addMode, addCallback = props.addCallback, isDel = props.isDel, hiddenDelBtnHandle = props.hiddenDelBtnHandle, _c = props.isDelAll, isDelAll = _c === void 0 ? true : _c, isAddAndDelAuto = props.isAddAndDelAuto, summaryConfig = props.summaryConfig, _d = props.summaryFixed, summaryFixed = _d === void 0 ? true : _d, isInnerPagination = props.isInnerPagination, _e = props.innerPaginationPageSize, innerPaginationPageSize = _e === void 0 ? 30 : _e, _f = props.innerPaginationPosition, innerPaginationPosition = _f === void 0 ? INNER_TABLE_PAGINATION_POSITION : _f, _g = props.innerPaginationPageSizeOptions, innerPaginationPageSizeOptions = _g === void 0 ? INNER_TABLE_PAGINATION_PAGESIZEOPTIONS : _g, tableRefHandle = props.tableRefHandle, tableName = props.tableName, serviceOrder = props.serviceOrder, differences = props.differences, virtualKey = props.virtualKey, _h = props.isResizableColumn, isResizableColumn = _h === void 0 ? true : _h, _j = props.isRealTimeValidate, isRealTimeValidate = _j === void 0 ? true : _j, isMarginTop = props.isMarginTop, isMarginBottom = props.isMarginBottom, resetProps = __rest(props, ["className", "bordered", "pagination", "isFlex", "tablePreferences", "dynamicKey", "hiddenDynamicIcon", "columns", "dataSource", "onTableChange", "isEdit", "isMove", "isAdd", "addMode", "addCallback", "isDel", "hiddenDelBtnHandle", "isDelAll", "isAddAndDelAuto", "summaryConfig", "summaryFixed", "isInnerPagination", "innerPaginationPageSize", "innerPaginationPosition", "innerPaginationPageSizeOptions", "tableRefHandle", "tableName", "serviceOrder", "differences", "virtualKey", "isResizableColumn", "isRealTimeValidate", "isMarginTop", "isMarginBottom"]);
|
|
41
41
|
// 做一些前置处理
|
|
42
42
|
// 比如过滤某些列 不做展示
|
|
43
43
|
var columns = useParseColumns(_columns);
|
|
@@ -243,8 +243,15 @@ var Table = function (props) {
|
|
|
243
243
|
flex: 1,
|
|
244
244
|
// 需要给一个最小的高度
|
|
245
245
|
minHeight: "200px",
|
|
246
|
+
marginTop: isMarginTop ? 10 : 0,
|
|
247
|
+
marginBottom: isMarginBottom ? 10 : 0,
|
|
246
248
|
}
|
|
247
|
-
: {
|
|
249
|
+
: {
|
|
250
|
+
position: "relative",
|
|
251
|
+
overflow: "hidden",
|
|
252
|
+
marginTop: isMarginTop ? 10 : 0,
|
|
253
|
+
marginBottom: isMarginBottom ? 10 : 0,
|
|
254
|
+
}, ref: tableRef }, { children: [isMove ? (jsx(DndProvider, __assign({ backend: HTML5Backend, context: window }, { children: SingleTable }))) : (SingleTable), dynamicKey ? (jsx(DynamicSetting, { parentDynamicKey: TABLE_DYNAMIC_KEY, dynamicKey: dynamicKey, defaultList: defaultDynamicList, onCurrentListChange: onCurrentListChange, ref: dynamicSettingRef, hiddenOperationIcon: true, isMore: true, isFixed: true })) : null] })));
|
|
248
255
|
};
|
|
249
256
|
var MemoTable = memo(Table);
|
|
250
257
|
MemoTable.displayName = "ZTXK_WEBUI_Table";
|
package/dist/es/tree/tree.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __rest, __assign } from '../_virtual/_tslib.js';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { memo, forwardRef, useImperativeHandle } from 'react';
|
|
3
|
+
import { memo, forwardRef, useRef, useImperativeHandle } from 'react';
|
|
4
4
|
import { Tree as Tree$1 } from 'antd';
|
|
5
5
|
import MemoInput from '../input/input.js';
|
|
6
6
|
import classNames from '../node_modules/classnames/index.js';
|
|
@@ -9,6 +9,8 @@ import { useBasicInfo, useAllCheckData, useAllDataHandle, useSearchHandle, useLa
|
|
|
9
9
|
var Tree = function (props, ref) {
|
|
10
10
|
var _a;
|
|
11
11
|
var searchType = props.searchType, onSearch = props.onSearch, className = props.className, style = props.style, treeStyle = props.treeStyle, cssTreeHeight = props.cssTreeHeight, _b = props.searchMode, searchMode = _b === void 0 ? "change" : _b, treeData = props.treeData, lazySearchTreeData = props.lazySearchTreeData, loadData = props.loadData, onCheck = props.onCheck, onSelect = props.onSelect, _c = props.showCount, showCount = _c === void 0 ? true : _c, resetProps = __rest(props, ["searchType", "onSearch", "className", "style", "treeStyle", "cssTreeHeight", "searchMode", "treeData", "lazySearchTreeData", "loadData", "onCheck", "onSelect", "showCount"]);
|
|
12
|
+
var treeRef = useRef();
|
|
13
|
+
var lazyTreeRef = useRef();
|
|
12
14
|
var fieldNames = resetProps.fieldNames, checkedKeys = resetProps.checkedKeys;
|
|
13
15
|
var classes = classNames("ztxk-tree", className, {
|
|
14
16
|
"ztxk-tree--height": cssTreeHeight,
|
|
@@ -45,13 +47,20 @@ var Tree = function (props, ref) {
|
|
|
45
47
|
getAllCompleteData: function () {
|
|
46
48
|
return allCompleteData.current;
|
|
47
49
|
},
|
|
50
|
+
scrollTo: function (info) {
|
|
51
|
+
var _a, _b;
|
|
52
|
+
(_a = treeRef === null || treeRef === void 0 ? void 0 : treeRef.current) === null || _a === void 0 ? void 0 : _a.scrollTo(info);
|
|
53
|
+
if (searchType === "lazy") {
|
|
54
|
+
(_b = lazyTreeRef === null || lazyTreeRef === void 0 ? void 0 : lazyTreeRef.current) === null || _b === void 0 ? void 0 : _b.scrollTo(info);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
48
57
|
};
|
|
49
58
|
});
|
|
50
59
|
return (jsxs("div", __assign({ className: classes, style: __assign({ height: cssTreeHeight }, style) }, { children: [searchType ? (jsx(MemoInput.Search, { value: searchValue, onChange: onChangeHandle, onSearch: onSearchHandle })) : null, (props.checkable || props.multiple) && checkedKeys && showCount ? (jsxs("div", { children: ["\u5DF2\u9009\u4E2D\uFF1A", checkedKeys
|
|
51
60
|
? Array.isArray(checkedKeys)
|
|
52
61
|
? checkedKeys.length
|
|
53
62
|
: (_a = checkedKeys.checked) === null || _a === void 0 ? void 0 : _a.length
|
|
54
|
-
: 0, "\u9879"] })) : null, searchType === "lazy" && (jsx(Tree$1, __assign({ treeData: lazySearchTreeData, className: showLazySearchTreeData ? "" : "ztxk-tree--hidden", defaultExpandAll: true, expandedKeys: lazySearchExpandedKeys, autoExpandParent: lazySearchAutoExpandParent, onExpand: lazySearchOnExpand, onCheck: onCheckHandle, onSelect: onSelectHandle }, resetProps))), jsx(Tree$1, __assign({}, expandProps, { treeData: treeData, loadData: loadData, className: showLazySearchTreeData ? "ztxk-tree--hidden" : "", style: treeStyle, onCheck: onCheckHandle, onSelect: onSelectHandle }, resetProps))] })));
|
|
63
|
+
: 0, "\u9879"] })) : null, searchType === "lazy" && (jsx(Tree$1, __assign({ treeData: lazySearchTreeData, className: showLazySearchTreeData ? "" : "ztxk-tree--hidden", defaultExpandAll: true, expandedKeys: lazySearchExpandedKeys, autoExpandParent: lazySearchAutoExpandParent, onExpand: lazySearchOnExpand, onCheck: onCheckHandle, onSelect: onSelectHandle, ref: lazyTreeRef }, resetProps))), jsx(Tree$1, __assign({}, expandProps, { treeData: treeData, loadData: loadData, className: showLazySearchTreeData ? "ztxk-tree--hidden" : "", style: treeStyle, onCheck: onCheckHandle, onSelect: onSelectHandle, ref: treeRef }, resetProps))] })));
|
|
55
64
|
};
|
|
56
65
|
var MemoTree = memo(forwardRef(Tree));
|
|
57
66
|
MemoTree.displayName = "ZTXK_WEBUI_Tree";
|
|
@@ -51,7 +51,7 @@ var TreeSelect = function (props, ref) {
|
|
|
51
51
|
// 当多选模式或treeCheckable 定义回填的模式
|
|
52
52
|
showCheckedStrategy: TreeSelect$1.SHOW_ALL, maxTagCount: DEFAULT_MAX_TAG_COUNT, searchValue: searchValue, onSearch: onLazySearchHandle, filterTreeNode: filterTreeNode,
|
|
53
53
|
// 节点展开逻辑
|
|
54
|
-
treeExpandedKeys: treeExpandedKeys, onTreeExpand: onTreeExpand }, resetProps)));
|
|
54
|
+
treeExpandedKeys: treeExpandedKeys, onTreeExpand: onTreeExpand, ref: ref }, resetProps)));
|
|
55
55
|
};
|
|
56
56
|
var MemoTreeSelect = memo(forwardRef(TreeSelect));
|
|
57
57
|
MemoTreeSelect.displayName = "ZTXK_WEBUI_TreeSelect";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.zt-transfer{padding:10px}.zt-transfer .container{display:flex;justify-content:space-between}.zt-transfer--container{border:1px solid #dee9f6;border-radius:4px;width:300px}.zt-transfer--container .title{align-items:center;background-color:#fafafa;border-bottom:1px solid #dee9f6;border-top-left-radius:4px;border-top-right-radius:4px;display:flex;justify-content:space-between;line-height:32px;padding:0 0 0 10px}.zt-transfer--container .title>button{padding:4px 10px}.zt-transfer--container .wrap{display:flex;flex-direction:column;height:400px}.zt-transfer--container .wrap .search{padding:10px}.zt-transfer--container .wrap .search .ant-input-affix-wrapper{height:30px;padding:0 10px}.zt-transfer--container .wrap .search .ant-input{height:
|
|
1
|
+
.zt-transfer{padding:10px}.zt-transfer .container{display:flex;justify-content:space-between}.zt-transfer--container{border:1px solid #dee9f6;border-radius:4px;width:300px}.zt-transfer--container .title{align-items:center;background-color:#fafafa;border-bottom:1px solid #dee9f6;border-top-left-radius:4px;border-top-right-radius:4px;display:flex;justify-content:space-between;line-height:32px;padding:0 0 0 10px}.zt-transfer--container .title>button{padding:4px 10px}.zt-transfer--container .wrap{display:flex;flex-direction:column;height:400px}.zt-transfer--container .wrap .search{padding:10px}.zt-transfer--container .wrap .search .ant-input-affix-wrapper{height:30px;padding:0 10px}.zt-transfer--container .wrap .search .ant-input{height:28px}.zt-transfer--container .wrap .search .ant-btn{background-color:#fff;border-color:#d9d9d9}.zt-transfer--container .wrap .content{flex:1;height:350px;overflow:auto}.zt-transfer--container .ztxk-tree .ant-tree-checkbox-disabled{display:none}.search-result--list{display:flex;flex-direction:column}.search-result--list>.search-result--item{border-bottom:1px solid #dee9f6;display:flex;margin-left:0;margin-right:0;overflow:hidden;padding:10px 0 10px 10px;width:100%}.search-result--list>.search-result--item:first-child{padding-top:0}.search-result--list>.search-result--item>span:last-child{flex:1;width:100px}.search-result--list>.search-result--item .search-result--item__describe,.search-result--list>.search-result--item .search-result--item__title{word-wrap:break-word;overflow:hidden;white-space:normal;word-break:break-all}.search-result--list>.search-result--item .search-result--item__describe{color:#888}.checked-result--list{display:flex;flex-direction:column}.checked-result--list>.checked-result--item{border-bottom:1px solid #dee9f6;display:flex;flex-direction:column;margin-left:0;margin-right:0;overflow:hidden;padding:10px 0 10px 10px;position:relative;width:100%}.checked-result--list>.checked-result--item:first-child{padding-top:0}.checked-result--list>.checked-result--item .checked-reslt--item__clear{color:#d9d9d9;cursor:pointer;margin-top:-10px;position:absolute;right:0;top:50%;width:20px}.checked-result--list>.checked-result--item .checked-result--item__describe,.checked-result--list>.checked-result--item .checked-result--item__title{word-wrap:break-word;overflow:hidden;padding-right:16px;white-space:normal;word-break:break-all}.checked-result--list>.checked-result--item .checked-result--item__describe{color:#888;width:90%}
|