zmdms-webui 0.0.43 → 0.0.44

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.
@@ -4,27 +4,26 @@ import { memo, forwardRef, useState, useEffect } from 'react';
4
4
  import DoubleRightOutlined from '../node_modules/@ant-design/icons/es/icons/DoubleRightOutlined.js';
5
5
  import { Drawer } from 'antd';
6
6
 
7
- var LeftContentWidth = 180;
8
7
  var LeftContent = function (_a, ref) {
9
- var children = _a.children, containerRef = _a.containerRef, _b = _a.defaultLeftOpen, defaultLeftOpen = _b === void 0 ? true : _b;
10
- var _c = useState(defaultLeftOpen), open = _c[0], setOpen = _c[1];
8
+ var children = _a.children, containerRef = _a.containerRef, _b = _a.defaultLeftOpen, defaultLeftOpen = _b === void 0 ? true : _b, _c = _a.width, width = _c === void 0 ? 200 : _c;
9
+ var _d = useState(defaultLeftOpen), open = _d[0], setOpen = _d[1];
11
10
  useEffect(function () {
12
11
  if (open) {
13
- containerRef.current.style.paddingLeft = "".concat(LeftContentWidth, "px");
12
+ containerRef.current.style.paddingLeft = "".concat(width, "px");
14
13
  }
15
14
  else {
16
15
  containerRef.current.style.paddingLeft = "0";
17
16
  }
18
- }, [open, containerRef]);
17
+ }, [open, containerRef, width]);
19
18
  var onClose = function () {
20
19
  setOpen(false);
21
20
  };
22
21
  return (jsxs(Fragment, { children: [jsx(DoubleRightOutlined, { className: "ztxk-container--left-content", style: {
23
- left: open ? "".concat(LeftContentWidth + 10, "px") : "10px",
22
+ left: open ? "".concat(width + 10, "px") : "10px",
24
23
  transform: open ? "rotate(180deg)" : "none",
25
24
  }, onClick: function () {
26
25
  setOpen(!open);
27
- } }), jsx(Drawer, __assign({ mask: false, closable: false, open: open, onClose: onClose, placement: "left", getContainer: false, width: LeftContentWidth, className: "ztxk-container--left-drawer" }, { children: children }))] }));
26
+ } }), jsx(Drawer, __assign({ mask: false, closable: false, open: open, zIndex: 88, onClose: onClose, placement: "left", getContainer: false, width: width, className: "ztxk-container--left-drawer" }, { children: children }))] }));
28
27
  };
29
28
  var LeftContent$1 = memo(forwardRef(LeftContent));
30
29
 
@@ -15,6 +15,8 @@ interface IProps {
15
15
  leftContent?: React__default.ReactNode;
16
16
  /** 左边抽屉默认是否打开 */
17
17
  defaultLeftOpen?: boolean;
18
+ /** 左边抽屉宽度 */
19
+ defaultLeftWidth?: number;
18
20
  }
19
21
  declare const ContainerButtonWrap: React__default.FC<{
20
22
  children?: React__default.ReactNode;
@@ -14,12 +14,12 @@ var ContainerLoading = function (_a) {
14
14
  return (jsx(Spin, { spinning: loading, size: "large", tip: "".concat(countTimer), className: "ztxk-container__loading", style: { display: loading ? "flex" : "none" } }));
15
15
  };
16
16
  var Container = function (props) {
17
- var className = props.className, isFlex = props.isFlex, children = props.children, loading = props.loading, footerDom = props.footerDom, leftContent = props.leftContent, defaultLeftOpen = props.defaultLeftOpen;
17
+ var className = props.className, isFlex = props.isFlex, children = props.children, loading = props.loading, footerDom = props.footerDom, leftContent = props.leftContent, defaultLeftOpen = props.defaultLeftOpen, defaultLeftWidth = props.defaultLeftWidth;
18
18
  var containerRef = useRef(null);
19
19
  var classes = classNames("ztxk-container__content", className, {
20
20
  "ztxk-container__content--flex": isFlex,
21
21
  });
22
- return (jsxs("div", __assign({ className: "ztxk-container", ref: containerRef }, { children: [leftContent && (jsx(LeftContent, __assign({ containerRef: containerRef, defaultLeftOpen: defaultLeftOpen }, { children: leftContent }))), jsx(ContainerLoading, { loading: loading }), jsx("div", __assign({ className: classes }, { children: children })), jsx(Footer, { footerDom: footerDom })] })));
22
+ return (jsxs("div", __assign({ className: "ztxk-container", ref: containerRef }, { children: [leftContent && (jsx(LeftContent, __assign({ containerRef: containerRef, defaultLeftOpen: defaultLeftOpen, width: defaultLeftWidth }, { children: leftContent }))), jsx(ContainerLoading, { loading: loading }), jsx("div", __assign({ className: classes }, { children: children })), jsx(Footer, { footerDom: footerDom })] })));
23
23
  };
24
24
  var ContainerButtonWrap = memo(function (_a) {
25
25
  var children = _a.children, isMarginTop = _a.isMarginTop, className = _a.className;