zmdms-webui 2.5.9 → 2.6.1

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.
@@ -11,7 +11,7 @@ var formatDate = function (value, format) {
11
11
  if (format === void 0) { format = "YYYY-MM-DD"; }
12
12
  if (!value)
13
13
  return "";
14
- var date = dayjs(value);
14
+ var date = dayjs(String(value));
15
15
  return date.isValid() ? date.format(format) : String(value);
16
16
  };
17
17
  /**
@@ -1 +1 @@
1
- .ztxk-modal{top:8vh}.ztxk-modal .ant-modal-content{border-radius:8px;display:flex;flex-direction:column}.ztxk-modal .ant-modal-content>.ant-modal-close{color:#333;height:40px;width:40px}.ztxk-modal .ant-modal-content>.ant-modal-close>.ant-modal-close-x{font-weight:400;height:40px;line-height:40px;width:40px}.ztxk-modal .ant-modal-content>.ant-modal-header{border-bottom:1px solid #f0f0f0;border-radius:8px 8px 0 0;flex-shrink:0;padding:9px 20px 9px 24px}.ztxk-modal .ant-modal-content>.ant-modal-header>.ant-modal-title{color:#333;font-weight:400;line-height:22px;text-align:center}.ztxk-modal .ant-modal-content>.ant-modal-body{flex:1;overflow:auto;padding:10px}.ztxk-modal .ant-modal-content>.ant-modal-footer{border-top:0;flex-shrink:0;padding:10px 0;text-align:center}.ztxk-modal-resizable-wrapper{position:relative}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle{pointer-events:auto;position:absolute;z-index:1000}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-bl,.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-br,.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-tl,.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-tr{height:12px;width:12px}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-tl{cursor:nwse-resize!important;left:0;top:0}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-tr{cursor:nesw-resize!important;right:0;top:0}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-bl{bottom:0;cursor:nesw-resize!important;left:0}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-br{bottom:0;cursor:nwse-resize!important;right:0}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-b,.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-t{height:8px;left:12px;right:12px}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-t{cursor:ns-resize!important;top:0}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-b{bottom:0;cursor:ns-resize!important}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-l,.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-r{bottom:12px;top:12px;width:8px}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-l{cursor:ew-resize!important;left:0}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-r{cursor:ew-resize!important;right:0}body.ztxk-modal-resizing,body.ztxk-modal-resizing *{-webkit-user-select:none!important;user-select:none!important}
1
+ .ztxk-modal{top:8vh}.ztxk-modal .ant-modal-content{border-radius:8px}.ztxk-modal .ant-modal-content>.ant-modal-close{color:#333;height:40px;width:40px}.ztxk-modal .ant-modal-content>.ant-modal-close>.ant-modal-close-x{font-weight:400;height:40px;line-height:40px;width:40px}.ztxk-modal .ant-modal-content>.ant-modal-header{border-bottom:1px solid #f0f0f0;border-radius:8px 8px 0 0;padding:9px 20px 9px 24px}.ztxk-modal .ant-modal-content>.ant-modal-header>.ant-modal-title{color:#333;font-weight:400;line-height:22px;text-align:center}.ztxk-modal .ant-modal-content>.ant-modal-body{max-height:75vh;overflow:auto;padding:10px}.ztxk-modal .ant-modal-content>.ant-modal-footer{border-top:0;padding:10px 0;text-align:center}.ztxk-modal-resize .ant-modal-content{display:flex;flex-direction:column}.ztxk-modal-resize .ant-modal-content>.ant-modal-body{flex:1;overflow:auto}.ztxk-modal-resize>.ant-modal-footer{flex-shrink:0}.ztxk-modal-resizable-wrapper{position:relative}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle{pointer-events:auto;position:absolute;z-index:98}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-bl,.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-br,.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-tl,.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-tr{height:12px;width:12px}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-tl{cursor:nwse-resize!important;left:0;top:0}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-tr{cursor:nesw-resize!important;right:0;top:0}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-bl{bottom:0;cursor:nesw-resize!important;left:0}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-br{bottom:0;cursor:nwse-resize!important;right:0}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-b,.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-t{height:8px;left:12px;right:12px}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-t{cursor:ns-resize!important;top:0}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-b{bottom:0;cursor:ns-resize!important}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-l,.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-r{bottom:12px;top:12px;width:8px}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-l{cursor:ew-resize!important;left:0}.ztxk-modal-resizable-wrapper .ztxk-modal-resize-handle-r{cursor:ew-resize!important;right:0}body.ztxk-modal-resizing,body.ztxk-modal-resizing *{-webkit-user-select:none!important;user-select:none!important}
@@ -10,7 +10,7 @@ import myMessage from '../message/index.js';
10
10
 
11
11
  var Modal = function (_a, ref) {
12
12
  var className = _a.className, defaultOpen = _a.defaultOpen, defaultTitle = _a.defaultTitle, defaultConfirmMsg = _a.defaultConfirmMsg, defaultConfirmOkText = _a.defaultConfirmOkText, defaultType = _a.defaultType, confirmPreHandle = _a.confirmPreHandle, confirmOnOk = _a.confirmOnOk, onOk = _a.onOk, footer = _a.footer, onOkValidate = _a.onOkValidate, _b = _a.isDrag, isDrag = _b === void 0 ? true : _b, _c = _a.isResize, isResize = _c === void 0 ? false : _c, minWidth = _a.minWidth, minHeight = _a.minHeight, maxWidth = _a.maxWidth, maxHeight = _a.maxHeight, defaultWidth = _a.defaultWidth, _d = _a.defaultHeight, defaultHeight = _d === void 0 ? 500 : _d, modalTitle = _a.title, modalRender = _a.modalRender, resetProps = __rest(_a, ["className", "defaultOpen", "defaultTitle", "defaultConfirmMsg", "defaultConfirmOkText", "defaultType", "confirmPreHandle", "confirmOnOk", "onOk", "footer", "onOkValidate", "isDrag", "isResize", "minWidth", "minHeight", "maxWidth", "maxHeight", "defaultWidth", "defaultHeight", "title", "modalRender"]);
13
- var classes = classNames("ztxk-modal", className);
13
+ var classes = classNames("ztxk-modal", isResize && "ztxk-modal-resize", className);
14
14
  // 模态框基本属性
15
15
  var _e = useState(defaultOpen), open = _e[0], setOpen = _e[1];
16
16
  var _f = useState(defaultTitle), title = _f[0], setTitle = _f[1];
@@ -158,11 +158,11 @@ var Modal = function (_a, ref) {
158
158
  modalRender: modalRender,
159
159
  }), dragTitle = _o.dragTitle, dragModalRender = _o.dragModalRender;
160
160
  var finalWidth = isResize ? resizableWidth : resetProps.width || "70%";
161
- return (jsx(Modal$1, __assign({ open: open, onCancel: close, className: classes, okText: "\u4FDD\u5B58", onOk: footer ? undefined : onOkHandle, width: finalWidth, title: dragTitle, keyboard: false, maskClosable: false, confirmLoading: loading, cancelButtonProps: { loading: loading }, footer: footer, modalRender: function (modal) {
161
+ return (jsx(Modal$1, __assign({ open: open, onCancel: close, className: classes, okText: "\u4FDD\u5B58", onOk: footer ? undefined : onOkHandle, title: dragTitle, keyboard: false, maskClosable: false, confirmLoading: loading, cancelButtonProps: { loading: loading }, footer: footer, modalRender: function (modal) {
162
162
  var resized = resizableModalRender(modal);
163
163
  var dragged = dragModalRender(resized);
164
164
  return dragged;
165
- } }, resetProps)));
165
+ } }, resetProps, { width: finalWidth })));
166
166
  };
167
167
  var ModalComponent = forwardRef(Modal);
168
168
  ModalComponent.displayName = "ZTXK_WEBUI_ModalComponent";
@@ -329,7 +329,7 @@ function useColumns(columns, options) {
329
329
  return _column.emptyText !== undefined ? _column.emptyText : "—";
330
330
  }
331
331
  if (_column.dateFormat)
332
- return dayjs(text).format(_column.dateFormat);
332
+ return dayjs(String(text)).format(_column.dateFormat);
333
333
  if (_column.precision)
334
334
  text = exactRound(text, _column.precision);
335
335
  if (_column.thousand)