ztxkui 1.9.4 → 1.9.8

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.
@@ -15,8 +15,6 @@ function UploadDemo() {
15
15
  code: 200,
16
16
  data: {
17
17
  attachId: '1418469936545132546',
18
- attachName: '奔奔.jpg',
19
- originalName: '奔奔.jpg',
20
18
  },
21
19
  },
22
20
  percent: 100,
@@ -52,6 +52,8 @@ export interface IProps extends UploadProps {
52
52
  isPublic?: boolean;
53
53
  /**额外的上传表格列配置 */
54
54
  otherColumns?: any;
55
+ /**是否直接替换 */
56
+ isDirect?: boolean;
55
57
  }
56
58
  declare const Upload: React.FC<IProps>;
57
59
  export default Upload;
@@ -44,9 +44,9 @@ var _accept = [
44
44
  '.gif',
45
45
  ];
46
46
  var Upload = function (props) {
47
- var children = props.children, className = props.className, _a = props.showTip, showTip = _a === void 0 ? true : _a, _b = props.showUploadBtn, showUploadBtn = _b === void 0 ? true : _b, _c = props.showDeleteBtn, showDeleteBtn = _c === void 0 ? true : _c, onDownLoadCallbackBefore = props.onDownLoadCallbackBefore, _d = props.showDownloadBtn, showDownloadBtn = _d === void 0 ? true : _d, onDownLoadCallbackAfter = props.onDownLoadCallbackAfter, _e = props.showPreviewBtn, showPreviewBtn = _e === void 0 ? true : _e, onPreviewCallbackBefore = props.onPreviewCallbackBefore, _f = props.showTable, showTable = _f === void 0 ? true : _f, showUploadList = props.showUploadList, onChange = props.onChange, beforeUpload = props.beforeUpload, multiple = props.multiple, ztAccept = props.ztAccept, maxCount = props.maxCount, maxSize = props.maxSize, maxSizeStr = props.maxSizeStr, action = props.action, headers = props.headers, method = props.method, uploadUser = props.uploadUser, originFileList = props.originFileList, callback = props.callback, onDeleteCallback = props.onDeleteCallback, isAutoDelete = props.isAutoDelete, apiBaseUrl = props.apiBaseUrl, _g = props.fileBaseUrl, fileBaseUrl = _g === void 0 ? '' : _g, fileBtnText = props.fileBtnText, data = props.data, authToken = props.authToken, listType = props.listType, isPublic = props.isPublic, otherColumns = props.otherColumns, restProps = __rest(props, ["children", "className", "showTip", "showUploadBtn", "showDeleteBtn", "onDownLoadCallbackBefore", "showDownloadBtn", "onDownLoadCallbackAfter", "showPreviewBtn", "onPreviewCallbackBefore", "showTable", "showUploadList", "onChange", "beforeUpload", "multiple", "ztAccept", "maxCount", "maxSize", "maxSizeStr", "action", "headers", "method", "uploadUser", "originFileList", "callback", "onDeleteCallback", "isAutoDelete", "apiBaseUrl", "fileBaseUrl", "fileBtnText", "data", "authToken", "listType", "isPublic", "otherColumns"]);
48
- var _h = useState(originFileList || []), fileList = _h[0], setFileList = _h[1];
49
- var _j = useState('20M'), maxSizeTransStr = _j[0], setMaxSizeTransStr = _j[1];
47
+ var children = props.children, className = props.className, _a = props.showTip, showTip = _a === void 0 ? true : _a, _b = props.showUploadBtn, showUploadBtn = _b === void 0 ? true : _b, _c = props.showDeleteBtn, showDeleteBtn = _c === void 0 ? true : _c, onDownLoadCallbackBefore = props.onDownLoadCallbackBefore, _d = props.showDownloadBtn, showDownloadBtn = _d === void 0 ? true : _d, onDownLoadCallbackAfter = props.onDownLoadCallbackAfter, _e = props.showPreviewBtn, showPreviewBtn = _e === void 0 ? true : _e, onPreviewCallbackBefore = props.onPreviewCallbackBefore, _f = props.showTable, showTable = _f === void 0 ? true : _f, showUploadList = props.showUploadList, onChange = props.onChange, beforeUpload = props.beforeUpload, multiple = props.multiple, ztAccept = props.ztAccept, maxCount = props.maxCount, maxSize = props.maxSize, maxSizeStr = props.maxSizeStr, action = props.action, headers = props.headers, method = props.method, uploadUser = props.uploadUser, originFileList = props.originFileList, callback = props.callback, onDeleteCallback = props.onDeleteCallback, isAutoDelete = props.isAutoDelete, apiBaseUrl = props.apiBaseUrl, _g = props.fileBaseUrl, fileBaseUrl = _g === void 0 ? '' : _g, fileBtnText = props.fileBtnText, data = props.data, authToken = props.authToken, listType = props.listType, isPublic = props.isPublic, otherColumns = props.otherColumns, _h = props.isDirect, isDirect = _h === void 0 ? false : _h, restProps = __rest(props, ["children", "className", "showTip", "showUploadBtn", "showDeleteBtn", "onDownLoadCallbackBefore", "showDownloadBtn", "onDownLoadCallbackAfter", "showPreviewBtn", "onPreviewCallbackBefore", "showTable", "showUploadList", "onChange", "beforeUpload", "multiple", "ztAccept", "maxCount", "maxSize", "maxSizeStr", "action", "headers", "method", "uploadUser", "originFileList", "callback", "onDeleteCallback", "isAutoDelete", "apiBaseUrl", "fileBaseUrl", "fileBtnText", "data", "authToken", "listType", "isPublic", "otherColumns", "isDirect"]);
48
+ var _j = useState(originFileList || []), fileList = _j[0], setFileList = _j[1];
49
+ var _k = useState('20M'), maxSizeTransStr = _k[0], setMaxSizeTransStr = _k[1];
50
50
  useEffect(function () {
51
51
  var MAXSIZE = maxSize ? maxSize : 1024 * 1024 * 100;
52
52
  var MAXSIZESTR = maxSizeStr ? maxSizeStr : transformFileSize(MAXSIZE);
@@ -173,11 +173,11 @@ var Upload = function (props) {
173
173
  var fileAction = apiBaseUrl + "/api/zmdms-resource/oss/endpoint/put-file-attach";
174
174
  return (React.createElement(React.Fragment, null,
175
175
  showUploadBtn && (React.createElement("div", { className: "zt-upload" },
176
- React.createElement(AntUpload, __assign({ className: classes, beforeUpload: beforeUpload ? beforeUpload : beforeFileUpload, onChange: onChange ? onChange : onFileChange, showUploadList: showUploadList ? showUploadList : false, fileList: fileList, multiple: multiple ? multiple : true, action: fileAction, headers: headers, data: data, method: method, onDownload: onFileDownload, onPreview: onFilePreview, onRemove: onFileRemove, openFileDialogOnClick: maxCount !== fileList.length, maxCount: maxCount, listType: listType }, restProps), children ? (children) : !listType || listType === 'text' ? (React.createElement(Button, { type: "primary", disabled: maxCount === fileList.length },
176
+ React.createElement(AntUpload, __assign({ className: classes, beforeUpload: beforeUpload ? beforeUpload : beforeFileUpload, onChange: onChange ? onChange : onFileChange, showUploadList: showUploadList ? showUploadList : false, fileList: fileList, multiple: multiple ? multiple : true, action: fileAction, headers: headers, data: data, method: method, onDownload: onFileDownload, onPreview: onFilePreview, onRemove: onFileRemove, openFileDialogOnClick: maxCount !== fileList.length || isDirect, maxCount: maxCount, listType: listType }, restProps), children ? (children) : !listType || listType === 'text' ? (React.createElement(Button, { type: "primary", disabled: maxCount === fileList.length },
177
177
  React.createElement(UploadOutlined, null),
178
178
  fileBtnText || '添加附件',
179
179
  maxCount === fileList.length &&
180
- "\uFF08\u6700\u591A\u4E0A\u4F20" + maxCount + "\u4E2A\u6587\u4EF6\uFF09")) : maxCount && fileList.length >= maxCount ? null : (React.createElement("div", null,
180
+ "\uFF08\u6700\u591A\u4E0A\u4F20" + maxCount + "\u4E2A\u6587\u4EF6\uFF09")) : maxCount && fileList.length >= maxCount && !isDirect ? null : (React.createElement("div", null,
181
181
  React.createElement(UploadOutlined, { style: { fontSize: 18 } }),
182
182
  React.createElement("div", { style: { marginTop: 8 } }, fileBtnText || '添加图片')))),
183
183
  showTip && (React.createElement("span", { className: "zt-upload__upload-tips" },
@@ -50,7 +50,7 @@ var DetailList = function (_a) {
50
50
  }, contentStyle: {
51
51
  height: '36px',
52
52
  fontSize: '12px',
53
- padding: '10px',
53
+ padding: '0 10px 0 10px',
54
54
  fontFamily: 'PingFangSC-Regular, PingFang SC',
55
55
  fontWeight: 400,
56
56
  color: '#333333',
@@ -70,6 +70,7 @@ var DetailList = function (_a) {
70
70
  whiteSpace: 'pre-wrap',
71
71
  wordBreak: 'break-all',
72
72
  wordWrap: 'break-word',
73
+ marginBottom: '0px',
73
74
  } }, item === null || item === void 0 ? void 0 : item.content)));
74
75
  }
75
76
  return (React.createElement(Item, { label: item === null || item === void 0 ? void 0 : item.label, key: index }, item.content.length > 0 &&
package/dist/index.d.ts CHANGED
@@ -35,6 +35,6 @@ export { default as Collapse } from './components/Collapse';
35
35
  export { default as GridList } from './components/business/GridList';
36
36
  export { default as Timeline } from './components/Timeline';
37
37
  export { UserInfo, UserPassword } from './components/business/Common';
38
- export { ConfigProvider, Drawer, message, Space, Grid, Divider, Dropdown, Badge, List, Result, Spin, Popconfirm, TreeSelect, Tree, Progress, Cascader, Tag, Empty, Tooltip, Descriptions, Image, Popover, } from 'antd';
38
+ export { ConfigProvider, Drawer, message, Space, Grid, Divider, Dropdown, Badge, List, Result, Spin, Popconfirm, TreeSelect, Tree, Progress, Cascader, Tag, Empty, Tooltip, Descriptions, Image, Popover, Breadcrumb, } from 'antd';
39
39
  export { default as zhCN } from 'antd/lib/locale/zh_CN';
40
40
  export { default as Icon, createFromIconfontCN } from '@ant-design/icons';
package/dist/index.js CHANGED
@@ -102,6 +102,6 @@ export { default as Collapse } from './components/Collapse';
102
102
  export { default as GridList } from './components/business/GridList';
103
103
  export { default as Timeline } from './components/Timeline';
104
104
  export { UserInfo, UserPassword } from './components/business/Common';
105
- export { ConfigProvider, Drawer, message, Space, Grid, Divider, Dropdown, Badge, List, Result, Spin, Popconfirm, TreeSelect, Tree, Progress, Cascader, Tag, Empty, Tooltip, Descriptions, Image, Popover, } from 'antd';
105
+ export { ConfigProvider, Drawer, message, Space, Grid, Divider, Dropdown, Badge, List, Result, Spin, Popconfirm, TreeSelect, Tree, Progress, Cascader, Tag, Empty, Tooltip, Descriptions, Image, Popover, Breadcrumb, } from 'antd';
106
106
  export { default as zhCN } from 'antd/lib/locale/zh_CN';
107
107
  export { default as Icon, createFromIconfontCN } from '@ant-design/icons';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkui",
3
- "version": "1.9.4",
3
+ "version": "1.9.8",
4
4
  "private": false,
5
5
  "description": "React components library",
6
6
  "author": "zt-front-end",