zmdms-webui 0.0.42 → 0.0.43
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/container/LeftContent.js +31 -0
- package/dist/es/container/container.d.ts +8 -0
- package/dist/es/container/container.js +5 -3
- package/dist/es/node_modules/@ant-design/icons/es/icons/DoubleRightOutlined.js +15 -0
- package/dist/es/node_modules/@ant-design/icons-svg/es/asn/DoubleRightOutlined.js +5 -0
- package/dist/index.dark.css +1 -1
- package/dist/index.default.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { __assign } from '../_virtual/_tslib.js';
|
|
2
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { memo, forwardRef, useState, useEffect } from 'react';
|
|
4
|
+
import DoubleRightOutlined from '../node_modules/@ant-design/icons/es/icons/DoubleRightOutlined.js';
|
|
5
|
+
import { Drawer } from 'antd';
|
|
6
|
+
|
|
7
|
+
var LeftContentWidth = 180;
|
|
8
|
+
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];
|
|
11
|
+
useEffect(function () {
|
|
12
|
+
if (open) {
|
|
13
|
+
containerRef.current.style.paddingLeft = "".concat(LeftContentWidth, "px");
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
containerRef.current.style.paddingLeft = "0";
|
|
17
|
+
}
|
|
18
|
+
}, [open, containerRef]);
|
|
19
|
+
var onClose = function () {
|
|
20
|
+
setOpen(false);
|
|
21
|
+
};
|
|
22
|
+
return (jsxs(Fragment, { children: [jsx(DoubleRightOutlined, { className: "ztxk-container--left-content", style: {
|
|
23
|
+
left: open ? "".concat(LeftContentWidth + 10, "px") : "10px",
|
|
24
|
+
transform: open ? "rotate(180deg)" : "none",
|
|
25
|
+
}, onClick: function () {
|
|
26
|
+
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 }))] }));
|
|
28
|
+
};
|
|
29
|
+
var LeftContent$1 = memo(forwardRef(LeftContent));
|
|
30
|
+
|
|
31
|
+
export { LeftContent$1 as default };
|
|
@@ -2,11 +2,19 @@ import React__default from 'react';
|
|
|
2
2
|
import { IFooterDom } from '../footer/interface.js';
|
|
3
3
|
|
|
4
4
|
interface IProps {
|
|
5
|
+
/** 加载状态 */
|
|
5
6
|
loading?: boolean;
|
|
7
|
+
/** 容器类名 */
|
|
6
8
|
className?: string;
|
|
9
|
+
/** 是否开启Flex布局 */
|
|
7
10
|
isFlex?: boolean;
|
|
8
11
|
children?: React__default.ReactNode;
|
|
12
|
+
/** 底部按钮 分页器相关设置 */
|
|
9
13
|
footerDom?: IFooterDom[];
|
|
14
|
+
/** 左边抽屉内容 */
|
|
15
|
+
leftContent?: React__default.ReactNode;
|
|
16
|
+
/** 左边抽屉默认是否打开 */
|
|
17
|
+
defaultLeftOpen?: boolean;
|
|
10
18
|
}
|
|
11
19
|
declare const ContainerButtonWrap: React__default.FC<{
|
|
12
20
|
children?: React__default.ReactNode;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { __assign } from '../_virtual/_tslib.js';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import { memo } from 'react';
|
|
3
|
+
import { memo, useRef } from 'react';
|
|
4
4
|
import classNames from '../node_modules/classnames/index.js';
|
|
5
5
|
import { useTimer } from '../config/commonHooks.js';
|
|
6
|
+
import LeftContent from './LeftContent.js';
|
|
6
7
|
import Footer from '../footer/footer.js';
|
|
7
8
|
import { Spin } from 'antd';
|
|
8
9
|
|
|
@@ -13,11 +14,12 @@ var ContainerLoading = function (_a) {
|
|
|
13
14
|
return (jsx(Spin, { spinning: loading, size: "large", tip: "".concat(countTimer), className: "ztxk-container__loading", style: { display: loading ? "flex" : "none" } }));
|
|
14
15
|
};
|
|
15
16
|
var Container = function (props) {
|
|
16
|
-
var className = props.className, isFlex = props.isFlex, children = props.children, loading = props.loading, footerDom = props.footerDom;
|
|
17
|
+
var className = props.className, isFlex = props.isFlex, children = props.children, loading = props.loading, footerDom = props.footerDom, leftContent = props.leftContent, defaultLeftOpen = props.defaultLeftOpen;
|
|
18
|
+
var containerRef = useRef(null);
|
|
17
19
|
var classes = classNames("ztxk-container__content", className, {
|
|
18
20
|
"ztxk-container__content--flex": isFlex,
|
|
19
21
|
});
|
|
20
|
-
return (jsxs("div", __assign({ className: "ztxk-container" }, { children: [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 }, { children: leftContent }))), jsx(ContainerLoading, { loading: loading }), jsx("div", __assign({ className: classes }, { children: children })), jsx(Footer, { footerDom: footerDom })] })));
|
|
21
23
|
};
|
|
22
24
|
var ContainerButtonWrap = memo(function (_a) {
|
|
23
25
|
var children = _a.children, isMarginTop = _a.isMarginTop, className = _a.className;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import _objectSpread2 from '../../../../@babel/runtime/helpers/esm/objectSpread2.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import DoubleRightOutlinedSvg from '../../../icons-svg/es/asn/DoubleRightOutlined.js';
|
|
4
|
+
import AntdIcon from '../components/AntdIcon.js';
|
|
5
|
+
|
|
6
|
+
var DoubleRightOutlined = function DoubleRightOutlined(props, ref) {
|
|
7
|
+
return /*#__PURE__*/React.createElement(AntdIcon, _objectSpread2(_objectSpread2({}, props), {}, {
|
|
8
|
+
ref: ref,
|
|
9
|
+
icon: DoubleRightOutlinedSvg
|
|
10
|
+
}));
|
|
11
|
+
};
|
|
12
|
+
DoubleRightOutlined.displayName = 'DoubleRightOutlined';
|
|
13
|
+
var DoubleRightOutlined$1 = /*#__PURE__*/React.forwardRef(DoubleRightOutlined);
|
|
14
|
+
|
|
15
|
+
export { DoubleRightOutlined$1 as default };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// This icon file is generated automatically.
|
|
2
|
+
var DoubleRightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z" } }] }, "name": "double-right", "theme": "outlined" };
|
|
3
|
+
var DoubleRightOutlinedSvg = DoubleRightOutlined;
|
|
4
|
+
|
|
5
|
+
export { DoubleRightOutlinedSvg as default };
|