zmdms-webui 0.0.36 → 0.0.38

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.
Files changed (49) hide show
  1. package/dist/es/applayoutsider/menu/SubMenu.js +2 -2
  2. package/dist/es/button/button.d.ts +3 -10
  3. package/dist/es/button/button.js +38 -9
  4. package/dist/es/button/buttonDownload.d.ts +18 -0
  5. package/dist/es/button/buttonDownload.js +34 -0
  6. package/dist/es/button/buttonExport.d.ts +12 -0
  7. package/dist/es/button/buttonExport.js +48 -0
  8. package/dist/es/button/index.d.ts +2 -2
  9. package/dist/es/button/index.js +2 -2
  10. package/dist/es/button/interface.d.ts +17 -0
  11. package/dist/es/descriptions/descriptions.d.ts +5 -0
  12. package/dist/es/descriptions/descriptions.js +16 -0
  13. package/dist/es/descriptions/index.d.ts +5 -0
  14. package/dist/es/descriptions/index.js +5 -0
  15. package/dist/es/descriptions/interface.d.ts +11 -0
  16. package/dist/es/dynamicsetting/dynamicDrawer.js +2 -2
  17. package/dist/es/footer/footer.js +2 -2
  18. package/dist/es/form/form.js +2 -2
  19. package/dist/es/form/formItems.js +1 -1
  20. package/dist/es/formitem/formItem.d.ts +6 -1
  21. package/dist/es/formitem/formItem.js +8 -4
  22. package/dist/es/login/index.js +2 -2
  23. package/dist/es/operationbtn/operationBtn.js +3 -3
  24. package/dist/es/table/components/TitleOperation.js +2 -2
  25. package/dist/es/title/index.d.ts +5 -0
  26. package/dist/es/title/index.js +5 -0
  27. package/dist/es/title/interface.d.ts +18 -0
  28. package/dist/es/title/title.d.ts +5 -0
  29. package/dist/es/title/title.js +17 -0
  30. package/dist/es/tree/hooks.js +139 -0
  31. package/dist/es/tree/index.d.ts +5 -0
  32. package/dist/es/tree/index.js +5 -0
  33. package/dist/es/tree/interface.d.ts +20 -0
  34. package/dist/es/tree/tree.d.ts +5 -0
  35. package/dist/es/tree/tree.js +38 -0
  36. package/dist/es/treeselect/hooks.js +129 -0
  37. package/dist/es/treeselect/index.d.ts +5 -0
  38. package/dist/es/treeselect/index.js +5 -0
  39. package/dist/es/treeselect/interface.d.ts +20 -0
  40. package/dist/es/treeselect/treeSelect.d.ts +5 -0
  41. package/dist/es/treeselect/treeSelect.js +53 -0
  42. package/dist/es/uploadlist/uploadList.js +5 -5
  43. package/dist/es/uploadlist/uploadTable.js +3 -3
  44. package/dist/index.build.d.ts +6 -1
  45. package/dist/index.dark.css +1 -1
  46. package/dist/index.default.css +1 -1
  47. package/dist/index.es.js +5 -1
  48. package/dist/index.umd.js +3 -3
  49. package/package.json +2 -2
@@ -2,7 +2,7 @@ import { __assign } from '../../_virtual/_tslib.js';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { memo, forwardRef, useState, useCallback, useImperativeHandle, useMemo } from 'react';
4
4
  import { Link } from 'react-router-dom';
5
- import Button from '../../button/button.js';
5
+ import ButtonCom from '../../button/button.js';
6
6
  import IconFont from '../../icon/index.js';
7
7
  import { Drawer, Menu } from 'antd';
8
8
 
@@ -21,7 +21,7 @@ var SubMenu = function (props, ref) {
21
21
  });
22
22
  }, [layoutSiderRef, subMenuWidth]);
23
23
  // 底部按钮
24
- var footerDom = (jsxs(Button, __assign({ type: "link", onClick: onToggleSubMenuFixed }, { children: [jsx(IconFont, { type: "icon-toggle", style: { fontSize: "18px" } }), isFixed ? "浮动" : "固定"] })));
24
+ var footerDom = (jsxs(ButtonCom, __assign({ type: "link", onClick: onToggleSubMenuFixed }, { children: [jsx(IconFont, { type: "icon-toggle", style: { fontSize: "18px" } }), isFixed ? "浮动" : "固定"] })));
25
25
  useImperativeHandle(ref, function () {
26
26
  return {
27
27
  setVisible: function (visible) {
@@ -1,12 +1,5 @@
1
- import React__default from 'react';
2
- import { ButtonProps } from 'antd/es/button';
1
+ import { ButtonComponent } from './interface.js';
3
2
 
4
- interface IProps extends Omit<ButtonProps, "onClick"> {
5
- onClick?: (event: React__default.MouseEvent<HTMLElement, MouseEvent>, currentBtn: ICurrentBtn) => void;
6
- }
7
- interface ICurrentBtn {
8
- canClick: boolean;
9
- }
10
- declare const Button: React__default.FC<IProps>;
3
+ declare const ButtonCom: ButtonComponent;
11
4
 
12
- export { Button as default };
5
+ export { ButtonCom as default };
@@ -1,7 +1,9 @@
1
- import { __rest, __assign } from '../_virtual/_tslib.js';
1
+ import { __rest, __assign, __awaiter, __generator } from '../_virtual/_tslib.js';
2
2
  import { jsx } from 'react/jsx-runtime';
3
3
  import { Button as Button$1 } from 'antd';
4
4
  import classNames from '../node_modules/classnames/index.js';
5
+ import ButtonDownload from './buttonDownload.js';
6
+ import ButtonExport from './buttonExport.js';
5
7
 
6
8
  var Button = function (props) {
7
9
  var _a;
@@ -12,17 +14,44 @@ var Button = function (props) {
12
14
  _a["zt-btn-".concat(size)] = size,
13
15
  _a["zt-btn-dangerous"] = danger,
14
16
  _a));
17
+ // 定义一个开关,事件没执行完成之前 不能进行下一步操作
15
18
  var currentBtn = {
16
19
  canClick: true,
17
20
  };
18
- var myOnClick = function (event) {
19
- if (!currentBtn.canClick) {
20
- return;
21
- }
22
- onClick && onClick(event, currentBtn);
23
- };
21
+ var myOnClick = function (event) { return __awaiter(void 0, void 0, void 0, function () {
22
+ var err_1;
23
+ return __generator(this, function (_a) {
24
+ switch (_a.label) {
25
+ case 0:
26
+ if (!currentBtn.canClick) {
27
+ return [2 /*return*/];
28
+ }
29
+ _a.label = 1;
30
+ case 1:
31
+ _a.trys.push([1, 4, , 5]);
32
+ currentBtn.canClick = false;
33
+ if (!onClick) return [3 /*break*/, 3];
34
+ return [4 /*yield*/, onClick(event)];
35
+ case 2:
36
+ _a.sent();
37
+ _a.label = 3;
38
+ case 3:
39
+ currentBtn.canClick = true;
40
+ return [3 /*break*/, 5];
41
+ case 4:
42
+ err_1 = _a.sent();
43
+ currentBtn.canClick = true;
44
+ throw err_1;
45
+ case 5: return [2 /*return*/];
46
+ }
47
+ });
48
+ }); };
24
49
  return (jsx(Button$1, __assign({ className: classes, type: type, disabled: disabled, size: size, danger: danger, onClick: myOnClick }, resetProps)));
25
50
  };
26
- Button.displayName = "ZTXK_WEBUI_Button";
51
+ var ButtonCom = Button;
52
+ ButtonCom.displayName = "ZTXK_WEBUI_Button";
53
+ ButtonCom.Group = Button$1.Group;
54
+ ButtonCom.Download = ButtonDownload;
55
+ ButtonCom.Export = ButtonExport;
27
56
 
28
- export { Button as default };
57
+ export { ButtonCom as default };
@@ -0,0 +1,18 @@
1
+ import React__default from 'react';
2
+ import { IButtonProps } from './interface.js';
3
+
4
+ interface IButtonDownloadProps extends Omit<IButtonProps, "onClick"> {
5
+ /** 附件id */
6
+ fileId: string;
7
+ /** 附件名 */
8
+ fileName: string;
9
+ /** 是否通过公共链接下载 */
10
+ isPublic?: boolean;
11
+ /** 服务器地址 */
12
+ API_BASEURL: string;
13
+ /** 代理点击事件 如果下载结束后 还需做别的处理 */
14
+ onClick?: (e: any, info: any) => void;
15
+ }
16
+ declare const ButtonDownload: React__default.FC<IButtonDownloadProps>;
17
+
18
+ export { IButtonDownloadProps, ButtonDownload as default };
@@ -0,0 +1,34 @@
1
+ import { __rest, __assign, __awaiter, __generator } from '../_virtual/_tslib.js';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { useState } from 'react';
4
+ import ButtonCom from './button.js';
5
+ import { downloadFile } from 'zmdms-utils';
6
+
7
+ var ButtonDownload = function (props) {
8
+ var fileId = props.fileId, fileName = props.fileName, isPublic = props.isPublic, API_BASEURL = props.API_BASEURL, onClick = props.onClick, resetProps = __rest(props, ["fileId", "fileName", "isPublic", "API_BASEURL", "onClick"]);
9
+ var _a = useState(false), loading = _a[0], setLoading = _a[1];
10
+ var onClickHandle = function (e) { return __awaiter(void 0, void 0, void 0, function () {
11
+ return __generator(this, function (_a) {
12
+ if (fileId) {
13
+ setLoading(true);
14
+ return [2 /*return*/, downloadFile(fileId, fileName || "", {
15
+ API_BASEURL: API_BASEURL,
16
+ open: isPublic,
17
+ })
18
+ .then(function (res) {
19
+ onClick && onClick(e, { result: true });
20
+ setLoading(false);
21
+ })
22
+ .catch(function (err) {
23
+ onClick && onClick(e, { result: false });
24
+ setLoading(false);
25
+ })];
26
+ }
27
+ return [2 /*return*/];
28
+ });
29
+ }); };
30
+ return (jsx(ButtonCom, __assign({ type: "link", loading: loading, onClick: onClickHandle }, resetProps)));
31
+ };
32
+ ButtonDownload.displayName = "ZTXK_WEBUI_ButtonDownload";
33
+
34
+ export { ButtonDownload as default };
@@ -0,0 +1,12 @@
1
+ import React__default from 'react';
2
+ import { IButtonProps } from './interface.js';
3
+
4
+ interface IButtonDownloadProps extends Omit<IButtonProps, "onClick"> {
5
+ /** 导出的接口方法 */
6
+ fetchHandle: () => Promise<any>;
7
+ /** 代理点击事件 如果下载结束后 还需做别的处理 */
8
+ onClick?: (e: any, info: any) => void;
9
+ }
10
+ declare const ButtonExport: React__default.FC<IButtonDownloadProps>;
11
+
12
+ export { IButtonDownloadProps, ButtonExport as default };
@@ -0,0 +1,48 @@
1
+ import { __rest, __assign, __awaiter, __generator } from '../_virtual/_tslib.js';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { useState } from 'react';
4
+ import ButtonCom from './button.js';
5
+ import { exportBolb } from 'zmdms-utils';
6
+ import { message } from 'antd';
7
+
8
+ var ButtonExport = function (props) {
9
+ var fetchHandle = props.fetchHandle, onClick = props.onClick, resetProps = __rest(props, ["fetchHandle", "onClick"]);
10
+ var _a = useState(false), loading = _a[0], setLoading = _a[1];
11
+ var onClickHandle = function (e) { return __awaiter(void 0, void 0, void 0, function () {
12
+ var res, err_1;
13
+ return __generator(this, function (_a) {
14
+ switch (_a.label) {
15
+ case 0:
16
+ setLoading(true);
17
+ _a.label = 1;
18
+ case 1:
19
+ _a.trys.push([1, 3, , 4]);
20
+ return [4 /*yield*/, fetchHandle()];
21
+ case 2:
22
+ res = _a.sent();
23
+ exportBolb(res)
24
+ .then(function (r) {
25
+ if (r.result) {
26
+ message.info(r.msg);
27
+ }
28
+ onClick && onClick(e, { result: true });
29
+ })
30
+ .catch(function (err) {
31
+ onClick && onClick(e, { result: false });
32
+ message.error((err === null || err === void 0 ? void 0 : err.msg) || "导出失败!");
33
+ });
34
+ setLoading(false);
35
+ return [3 /*break*/, 4];
36
+ case 3:
37
+ err_1 = _a.sent();
38
+ setLoading(false);
39
+ return [2 /*return*/, err_1];
40
+ case 4: return [2 /*return*/];
41
+ }
42
+ });
43
+ }); };
44
+ return (jsx(ButtonCom, __assign({ type: "primary", loading: loading, onClick: onClickHandle }, resetProps)));
45
+ };
46
+ ButtonExport.displayName = "ZTXK_WEBUI_ButtonExport";
47
+
48
+ export { ButtonExport as default };
@@ -1,5 +1,5 @@
1
- import Button from './button.js';
1
+ import ButtonCom from './button.js';
2
2
 
3
3
 
4
4
 
5
- export { Button as default };
5
+ export { ButtonCom as default };
@@ -1,5 +1,5 @@
1
- import Button from './button.js';
1
+ import ButtonCom from './button.js';
2
2
 
3
3
 
4
4
 
5
- export { Button as default };
5
+ export { ButtonCom as default };
@@ -0,0 +1,17 @@
1
+ import { Button } from 'antd';
2
+ import { ButtonProps } from 'antd/es/button';
3
+ import ButtonDownload from './buttonDownload.js';
4
+ import ButtonExport from './buttonExport.js';
5
+
6
+ interface IButtonProps extends ButtonProps {
7
+ }
8
+ interface ButtonComponent extends React.FC<IButtonProps> {
9
+ displayName: string;
10
+ Group: typeof Button.Group;
11
+ /** 下载按钮 */
12
+ Download: typeof ButtonDownload;
13
+ /** 导出按钮 */
14
+ Export: typeof ButtonExport;
15
+ }
16
+
17
+ export { ButtonComponent, IButtonProps };
@@ -0,0 +1,5 @@
1
+ import { DescriptionsComponent } from './interface.js';
2
+
3
+ declare const DescriptionsCom: DescriptionsComponent;
4
+
5
+ export { DescriptionsCom as default };
@@ -0,0 +1,16 @@
1
+ import { __rest, __assign } from '../_virtual/_tslib.js';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { Descriptions as Descriptions$1 } from 'antd';
4
+ import classNames from '../node_modules/classnames/index.js';
5
+
6
+ var Descriptions = function (props) {
7
+ var className = props.className, resetProps = __rest(props, ["className"]);
8
+ // 主容器类名
9
+ var classes = classNames("ztxk-descriptions", className, {});
10
+ return (jsx(Descriptions$1, __assign({ column: 4, size: "middle", className: classes }, resetProps)));
11
+ };
12
+ var DescriptionsCom = Descriptions;
13
+ DescriptionsCom.displayName = "ZTXK_WEBUI_Descriptions";
14
+ DescriptionsCom.Item = Descriptions$1.Item;
15
+
16
+ export { DescriptionsCom as default };
@@ -0,0 +1,5 @@
1
+ import DescriptionsCom from './descriptions.js';
2
+
3
+
4
+
5
+ export { DescriptionsCom as default };
@@ -0,0 +1,5 @@
1
+ import DescriptionsCom from './descriptions.js';
2
+
3
+
4
+
5
+ export { DescriptionsCom as default };
@@ -0,0 +1,11 @@
1
+ import React__default from 'react';
2
+ import { Descriptions, DescriptionsProps } from 'antd';
3
+
4
+ interface IDescriptionsProps extends DescriptionsProps {
5
+ }
6
+ interface DescriptionsComponent extends React__default.FC<IDescriptionsProps> {
7
+ Item: typeof Descriptions.Item;
8
+ displayName: string;
9
+ }
10
+
11
+ export { DescriptionsComponent, IDescriptionsProps };
@@ -8,7 +8,7 @@ import { useDynamic } from './useDynamic.js';
8
8
  import { useDrawer } from './hooks.js';
9
9
  import SettingOutlined from '../node_modules/@ant-design/icons/es/icons/SettingOutlined.js';
10
10
  import { DndProvider } from '../node_modules/react-dnd/dist/core/DndProvider.js';
11
- import Button from '../button/button.js';
11
+ import ButtonCom from '../button/button.js';
12
12
  import { Drawer, Checkbox } from 'antd';
13
13
 
14
14
  // 这里操作的一直都是内部设置的list
@@ -65,7 +65,7 @@ var DynamicDrawer = function (props, ref) {
65
65
  setTempDynamicList(newDynamicList);
66
66
  };
67
67
  /**底部按钮 */
68
- var renderFooter = function () { return (jsxs(Fragment, { children: [jsx(Button, __assign({ type: "default", onClick: onClose }, { children: "\u53D6\u6D88" })), jsx(Button, __assign({ type: "default", onClick: onReset }, { children: "\u91CD\u7F6E" })), jsx(Button, __assign({ type: "primary", onClick: onSureHandle }, { children: "\u786E\u5B9A" }))] })); };
68
+ var renderFooter = function () { return (jsxs(Fragment, { children: [jsx(ButtonCom, __assign({ type: "default", onClick: onClose }, { children: "\u53D6\u6D88" })), jsx(ButtonCom, __assign({ type: "default", onClick: onReset }, { children: "\u91CD\u7F6E" })), jsx(ButtonCom, __assign({ type: "primary", onClick: onSureHandle }, { children: "\u786E\u5B9A" }))] })); };
69
69
  return (jsx(Drawer, __assign({ className: "dynamic-drawer", title: jsxs("div", { children: [jsx(SettingOutlined, { style: { fontSize: 16 } }), jsxs("span", __assign({ className: "search-drawer--title-text" }, { children: [title, jsx("span", { children: "\uFF08\u62D6\u62FD\u6392\u5E8F\uFF09" })] }))] }), width: 300, placement: "right", open: visible, closable: false, maskClosable: false, footer: renderFooter() }, { children: jsx(DndProvider, __assign({ backend: HTML5Backend, context: window }, { children: jsx(Checkbox.Group, __assign({ value: checkedValues, onChange: onCheckboxChange }, { children: tempDynamicList.map(function (item, index) {
70
70
  return (jsx(Sortable, __assign({ type: "search-drawer", index: index, onMoveItem: onMoveItem }, { children: jsx(Checkbox, __assign({ value: item.key, disabled: item.disabled }, { children: item.label || item.key })) }), item.key));
71
71
  }) })) })) })));
@@ -2,7 +2,7 @@ import { __assign } from '../_virtual/_tslib.js';
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { memo } from 'react';
4
4
  import classNames from '../node_modules/classnames/index.js';
5
- import Button from '../button/button.js';
5
+ import ButtonCom from '../button/button.js';
6
6
  import Pagination from '../pagination/pagination.js';
7
7
 
8
8
  var defaultPageSizeOptions = ["10", "20", "30", "100"];
@@ -19,7 +19,7 @@ var Footer = function (props) {
19
19
  var DOMType = item.DOMType, render = item.render;
20
20
  if (DOMType === "button") {
21
21
  var _a = item.type, type = _a === void 0 ? "primary" : _a, loading = item.loading, disabled = item.disabled, onClick = item.onClick;
22
- return (jsx(Button, __assign({ type: type, loading: loading, disabled: disabled, onClick: onClick }, { children: item.text }), index));
22
+ return (jsx(ButtonCom, __assign({ type: type, loading: loading, disabled: disabled, onClick: onClick }, { children: item.text }), index));
23
23
  }
24
24
  if (DOMType === "pagination") {
25
25
  var total = item.total, pageSize = item.pageSize, current = item.current, onChange = item.onChange, onShowSizeChange = item.onShowSizeChange, pageSizeOptions = item.pageSizeOptions;
@@ -7,7 +7,7 @@ import { useFormPreferencesCreateNewItems, useDynamicListByItems, useBtnHandle }
7
7
  import FormItems from './formItems.js';
8
8
  import DefaultDom from './detaultDom.js';
9
9
  import DynamicSetting from '../dynamicsetting/dynamicSetting.js';
10
- import Button from '../button/button.js';
10
+ import ButtonCom from '../button/button.js';
11
11
 
12
12
  var FORM_DYNAMIC_KEY = "ztxk-webui-dynamic-form";
13
13
  // 动态列配置 与 表单配置 是否存在冲突?
@@ -76,7 +76,7 @@ var Form = function (props) {
76
76
  onSearchHandle: onSearchHandle,
77
77
  onResetHandle: onResetHandle,
78
78
  }), onSearchHandleInner = _c.onSearchHandleInner, onResetHandleInner = _c.onResetHandleInner;
79
- return (jsxs(Form$1, __assign({ form: form, onValuesChange: onValuesChangeHandle }, restProps, { className: wrapClasses }, { children: [jsx("div", __assign({ className: leftClasses }, { children: items ? (jsx(FormItems, { items: dynamicKey ? newItems : configInfoItems, outsideState: outsideState })) : (children) })), dynamicKey ? (jsx(DynamicSetting, { dynamicKey: dynamicKey, parentDynamicKey: FORM_DYNAMIC_KEY, defaultList: dynamicList, onCurrentListChange: onCurrentListChange, ref: dynamicSettingRef })) : null, rightWrapVisible ? (jsxs("div", __assign({ className: rightClasses }, { children: [jsx(Button, __assign({ type: "default", onClick: onResetHandleInner }, { children: "\u91CD\u7F6E" })), jsx(Button, __assign({ type: "primary", onClick: onSearchHandleInner }, { children: "\u67E5\u8BE2" }))] }))) : null] })));
79
+ return (jsxs(Form$1, __assign({ form: form, onValuesChange: onValuesChangeHandle }, restProps, { className: wrapClasses }, { children: [jsx("div", __assign({ className: leftClasses }, { children: items ? (jsx(FormItems, { items: dynamicKey ? newItems : configInfoItems, outsideState: outsideState })) : (children) })), dynamicKey ? (jsx(DynamicSetting, { dynamicKey: dynamicKey, parentDynamicKey: FORM_DYNAMIC_KEY, defaultList: dynamicList, onCurrentListChange: onCurrentListChange, ref: dynamicSettingRef })) : null, rightWrapVisible ? (jsxs("div", __assign({ className: rightClasses }, { children: [jsx(ButtonCom, __assign({ type: "default", onClick: onResetHandleInner }, { children: "\u91CD\u7F6E" })), jsx(ButtonCom, __assign({ type: "primary", onClick: onSearchHandleInner }, { children: "\u67E5\u8BE2" }))] }))) : null] })));
80
80
  };
81
81
  var MemoForm = memo(Form);
82
82
  MemoForm.displayName = "ZTXK_WEBUI_Form";
@@ -7,7 +7,7 @@ var FormItems = function (props) {
7
7
  var items = props.items, outsideState = props.outsideState;
8
8
  return (jsx(Fragment, { children: Array.isArray(items)
9
9
  ? items === null || items === void 0 ? void 0 : items.map(function (item, index) {
10
- return (jsx(FormItem, __assign({ index: index }, item, { outsideState: outsideState }), "".concat(item.name)));
10
+ return (jsx(FormItem, __assign({ index: index }, item, { outsideState: outsideState }), "".concat(item.name || index)));
11
11
  })
12
12
  : null }));
13
13
  };
@@ -59,7 +59,7 @@ interface IFormItem extends FormItemProps {
59
59
  /**
60
60
  * 子元素渲染
61
61
  */
62
- render: (itemProps: any, formInstance?: FormInstance<any>) => JSX.Element;
62
+ render?: (itemProps: any, formInstance?: FormInstance<any>) => JSX.Element;
63
63
  /**
64
64
  * 控制依赖关系
65
65
  */
@@ -75,6 +75,11 @@ interface IFormItem extends FormItemProps {
75
75
  * 即 你的items 可能因为某个state的改变而重新生成时,可选择开启
76
76
  */
77
77
  shouldUpdateBeOutsideState?: (prevOutsideState: any, nextOutsideState: any) => boolean;
78
+ /**
79
+ * item 类型
80
+ * 当需要一些表单除外的样式时 使用
81
+ */
82
+ nonForm?: boolean;
78
83
  }
79
84
  declare const _default: React__default.NamedExoticComponent<IFormItem & {
80
85
  outsideState: any;
@@ -1,5 +1,5 @@
1
1
  import { __rest, __assign } from '../_virtual/_tslib.js';
2
- import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { memo } from 'react';
4
4
  import classNames from '../node_modules/classnames/index.js';
5
5
  import '../config/ZtxkContext.js';
@@ -9,8 +9,12 @@ import { Col } from 'antd';
9
9
 
10
10
  var FormItem = function (props) {
11
11
  var _a;
12
- var children = props.children, isDisplay = props.isDisplay, isRequired = props.isRequired, isChangeable = props.isChangeable, isStress = props.isStress, preNode = props.preNode, nextNode = props.nextNode; props.dynamicDisabled; var hiddenBorder = props.hiddenBorder, singleSelectShowBorder = props.singleSelectShowBorder, hiddenLabel = props.hiddenLabel, width = props.width, className = props.className, itemClassName = props.itemClassName, render = props.render, shouldUpdateNames = props.shouldUpdateNames; props.shouldUpdateClear; var dependencies = props.dependencies, shouldUpdate = props.shouldUpdate; props.index; props.outsideState; props.shouldUpdateBeOutsideState; var resetProps = __rest(props, ["children", "isDisplay", "isRequired", "isChangeable", "isStress", "preNode", "nextNode", "dynamicDisabled", "hiddenBorder", "singleSelectShowBorder", "hiddenLabel", "width", "className", "itemClassName", "render", "shouldUpdateNames", "shouldUpdateClear", "dependencies", "shouldUpdate", "index", "outsideState", "shouldUpdateBeOutsideState"]);
12
+ var children = props.children, isDisplay = props.isDisplay, isRequired = props.isRequired, isChangeable = props.isChangeable, isStress = props.isStress, preNode = props.preNode, nextNode = props.nextNode; props.dynamicDisabled; var hiddenBorder = props.hiddenBorder, singleSelectShowBorder = props.singleSelectShowBorder, hiddenLabel = props.hiddenLabel, width = props.width, className = props.className, itemClassName = props.itemClassName, render = props.render, shouldUpdateNames = props.shouldUpdateNames; props.shouldUpdateClear; var dependencies = props.dependencies, shouldUpdate = props.shouldUpdate; props.index; props.outsideState; props.shouldUpdateBeOutsideState; var nonForm = props.nonForm, resetProps = __rest(props, ["children", "isDisplay", "isRequired", "isChangeable", "isStress", "preNode", "nextNode", "dynamicDisabled", "hiddenBorder", "singleSelectShowBorder", "hiddenLabel", "width", "className", "itemClassName", "render", "shouldUpdateNames", "shouldUpdateClear", "dependencies", "shouldUpdate", "index", "outsideState", "shouldUpdateBeOutsideState", "nonForm"]);
13
13
  var form = MemoForm.useFormInstance();
14
+ // 如果是纯文本渲染
15
+ if (nonForm) {
16
+ return render ? (render({}, form)) : (jsx(Col, { className: "ztxk-form__item--collapse", span: 24 }));
17
+ }
14
18
  // 根据配置属性,判断是否渲染表单项
15
19
  // 是否显示表单项
16
20
  if (isDisplay === false || isDisplay === "0") {
@@ -59,7 +63,7 @@ var FormItem = function (props) {
59
63
  });
60
64
  if (dependencies) {
61
65
  return (jsxs(ItemWrap, __assign({ width: width, className: className }, { children: [preNode ? preNode : null, jsx(MemoForm.Item, __assign({ dependencies: dependencies, noStyle: true }, { children: function (formInstance) {
62
- return (jsx(MemoForm.Item, __assign({}, resetProps, { className: itemClasses }, { children: render(itemProps, formInstance) })));
66
+ return (jsx(MemoForm.Item, __assign({}, resetProps, { className: itemClasses }, { children: render && render(itemProps, formInstance) })));
63
67
  } })), nextNode ? nextNode : null] })));
64
68
  }
65
69
  if (shouldUpdate || shouldUpdateNames) {
@@ -81,7 +85,7 @@ var FormItem = function (props) {
81
85
  }
82
86
  : shouldUpdate;
83
87
  return (jsxs(ItemWrap, __assign({ width: width, className: className }, { children: [preNode ? preNode : null, jsx(MemoForm.Item, __assign({ shouldUpdate: shouldUpdateHandle, noStyle: true }, { children: function (formInstance) {
84
- return resetProps.name ? (jsx(MemoForm.Item, __assign({}, resetProps, { className: itemClasses }, { children: render(itemProps, formInstance) }))) : (render(itemProps, formInstance));
88
+ return resetProps.name ? (jsx(MemoForm.Item, __assign({}, resetProps, { className: itemClasses }, { children: render && render(itemProps, formInstance) }))) : (render && render(itemProps, formInstance));
85
89
  } })), nextNode ? nextNode : null] })));
86
90
  }
87
91
  return (jsxs(ItemWrap, __assign({ width: width, className: className }, { children: [preNode ? preNode : null, jsx(MemoForm.Item, __assign({}, resetProps, { className: itemClasses }, { children: render ? render(itemProps, form) : children })), nextNode ? nextNode : null] })));
@@ -5,7 +5,7 @@ import { Form, Checkbox } from 'antd';
5
5
  import { decrypt, encrypt } from './utils.js';
6
6
  import MemoInput from '../input/input.js';
7
7
  import IconFont from '../icon/index.js';
8
- import Button from '../button/button.js';
8
+ import ButtonCom from '../button/button.js';
9
9
 
10
10
  var Item = Form.Item;
11
11
  var LOCAL_KEY = "6fr6x";
@@ -57,7 +57,7 @@ var Login = function (props) {
57
57
  required: true,
58
58
  message: "请输入您的密码",
59
59
  },
60
- ] }, { children: jsx(MemoInput.Password, { size: "large", autoComplete: "current-password", prefix: jsx(IconFont, { type: "icon-mima", style: { fontSize: "14px", color: "rgba(0,0,0,.65)" } }) }) })), jsx(Item, { children: jsx(Button, __assign({ htmlType: "submit", block: true, className: "form__item--button", loading: loading }, { children: "\u767B\u5F55" })) }), jsxs("div", __assign({ className: "form__item--remember" }, { children: [jsx(Item, __assign({ name: "remember", valuePropName: "checked" }, { children: jsx(Checkbox, { children: "\u8BB0\u4F4F\u5BC6\u7801" }) })), jsx("div", __assign({ className: "form__item--remember-forget" }, { children: "\u5FD8\u8BB0\u5BC6\u7801" }))] }))] })) })));
60
+ ] }, { children: jsx(MemoInput.Password, { size: "large", autoComplete: "current-password", prefix: jsx(IconFont, { type: "icon-mima", style: { fontSize: "14px", color: "rgba(0,0,0,.65)" } }) }) })), jsx(Item, { children: jsx(ButtonCom, __assign({ htmlType: "submit", block: true, className: "form__item--button", loading: loading }, { children: "\u767B\u5F55" })) }), jsxs("div", __assign({ className: "form__item--remember" }, { children: [jsx(Item, __assign({ name: "remember", valuePropName: "checked" }, { children: jsx(Checkbox, { children: "\u8BB0\u4F4F\u5BC6\u7801" }) })), jsx("div", __assign({ className: "form__item--remember-forget" }, { children: "\u5FD8\u8BB0\u5BC6\u7801" }))] }))] })) })));
61
61
  };
62
62
  Login.displayName = "ZTXK_WEBUI_Login";
63
63
 
@@ -1,6 +1,6 @@
1
1
  import { __rest, __assign } from '../_virtual/_tslib.js';
2
2
  import { jsx, Fragment } from 'react/jsx-runtime';
3
- import Button from '../button/button.js';
3
+ import ButtonCom from '../button/button.js';
4
4
  import { Popconfirm } from 'antd';
5
5
 
6
6
  var OperationBtn = function (props) {
@@ -24,11 +24,11 @@ var OperationBtn = function (props) {
24
24
  isAuth = !!authUserBtns.find(function (item) { return item.code === authority; });
25
25
  }
26
26
  if (confirmMsg) {
27
- return (jsx(Popconfirm, __assign({ title: confirmMsg, cancelText: "\u5426", okText: "\u662F", onConfirm: function () { return onClickHandle(type); } }, { children: jsx(Button, __assign({ type: "link", style: {
27
+ return (jsx(Popconfirm, __assign({ title: confirmMsg, cancelText: "\u5426", okText: "\u662F", onConfirm: function () { return onClickHandle(type); } }, { children: jsx(ButtonCom, __assign({ type: "link", style: {
28
28
  height: 28,
29
29
  }, disabled: !isAuth }, resetConfig, { children: name })) }), type));
30
30
  }
31
- return (jsx(Button, __assign({ type: "link", style: {
31
+ return (jsx(ButtonCom, __assign({ type: "link", style: {
32
32
  height: 28,
33
33
  }, onClick: function () { return onClickHandle(type); }, disabled: !isAuth }, resetConfig, { children: name }), type));
34
34
  }) }));
@@ -3,7 +3,7 @@ import { jsx, Fragment } from 'react/jsx-runtime';
3
3
  import { memo } from 'react';
4
4
  import CopyIcon from './CopyIcon.js';
5
5
  import FillDown from './FillDown.js';
6
- import Button from '../../button/button.js';
6
+ import ButtonCom from '../../button/button.js';
7
7
  import DownOutlined from '../../node_modules/@ant-design/icons/es/icons/DownOutlined.js';
8
8
  import { Dropdown } from 'antd';
9
9
 
@@ -24,7 +24,7 @@ var TitleOperation = function (_a) {
24
24
  label: (jsx(FillDown, { dataKey: dataKey, isFillDown: isFillDown, dataSourceRef: dataSourceRef, onTableChange: onTableChange })),
25
25
  });
26
26
  }
27
- return (jsx(Fragment, { children: items.length > 0 ? (jsx(Dropdown, __assign({ menu: { items: items }, trigger: ["click"] }, { children: jsx(Button, { type: "link", icon: jsx(DownOutlined, {}), title: "\u4E00\u4E9B\u5DE5\u5177\u65B9\u6CD5" }) }))) : null }));
27
+ return (jsx(Fragment, { children: items.length > 0 ? (jsx(Dropdown, __assign({ menu: { items: items }, trigger: ["click"] }, { children: jsx(ButtonCom, { type: "link", icon: jsx(DownOutlined, {}), title: "\u4E00\u4E9B\u5DE5\u5177\u65B9\u6CD5" }) }))) : null }));
28
28
  };
29
29
  var TitleOperation$1 = memo(TitleOperation);
30
30
 
@@ -0,0 +1,5 @@
1
+ import TitleCom from './title.js';
2
+
3
+
4
+
5
+ export { TitleCom as default };
@@ -0,0 +1,5 @@
1
+ import TitleCom from './title.js';
2
+
3
+
4
+
5
+ export { TitleCom as default };
@@ -0,0 +1,18 @@
1
+ import React__default from 'react';
2
+
3
+ interface ITitleProps {
4
+ children?: React__default.ReactNode;
5
+ title: React__default.ReactNode;
6
+ className?: string;
7
+ /** 是否展示边框 */
8
+ bordered?: boolean;
9
+ /** 是否展示背景 */
10
+ showBg?: boolean;
11
+ /** 是否左右布局 */
12
+ justifyContent?: "space-between" | "flex-start";
13
+ }
14
+ interface TitleComponent extends React__default.FC<ITitleProps> {
15
+ displayName: string;
16
+ }
17
+
18
+ export { ITitleProps, TitleComponent };
@@ -0,0 +1,5 @@
1
+ import { TitleComponent } from './interface.js';
2
+
3
+ declare const TitleCom: TitleComponent;
4
+
5
+ export { TitleCom as default };
@@ -0,0 +1,17 @@
1
+ import { __assign } from '../_virtual/_tslib.js';
2
+ import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import classNames from '../node_modules/classnames/index.js';
4
+
5
+ var Title = function (props) {
6
+ var title = props.title, className = props.className, bordered = props.bordered, showBg = props.showBg, _a = props.justifyContent, justifyContent = _a === void 0 ? "space-between" : _a, children = props.children;
7
+ // 主容器类名
8
+ var classes = classNames("ztxk-title", className, {
9
+ "ztxk-title--bordered": bordered,
10
+ "ztxk-title--background": showBg,
11
+ });
12
+ return (jsxs("div", __assign({ className: classes, style: { justifyContent: justifyContent } }, { children: [jsx("div", __assign({ className: "ztxk-title--title" }, { children: title })), jsx("div", __assign({ className: "ztxk-title--extra" }, { children: children }))] })));
13
+ };
14
+ var TitleCom = Title;
15
+ TitleCom.displayName = "ZTXK_WEBUI_Title";
16
+
17
+ export { TitleCom as default };