ztxkui 1.9.3 → 1.9.7

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.
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare function WechatDemo(): JSX.Element;
3
+ export default WechatDemo;
@@ -0,0 +1,11 @@
1
+ import Layout from 'components/Layout';
2
+ var Header = Layout.Header, Footer = Layout.Footer, Sider = Layout.Sider, Content = Layout.Content;
3
+ function WechatDemo() {
4
+ return (React.createElement(Layout, null,
5
+ React.createElement(Sider, null, "Sider"),
6
+ React.createElement(Layout, null,
7
+ React.createElement(Header, null, "Header"),
8
+ React.createElement(Content, null, "Content"),
9
+ React.createElement(Footer, null, "Footer"))));
10
+ }
11
+ export default WechatDemo;
@@ -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" },
@@ -3,7 +3,8 @@ var IconFont = createFromIconfontCN({
3
3
  scriptUrl: [
4
4
  // '/symbol/iconfont.js',
5
5
  // '//at.alicdn.com/t/font_2231093_wkc26cl4nv.js'
6
- '//at.alicdn.com/t/font_1808087_cq3yc9wfqnl.js',
6
+ // '//at.alicdn.com/t/font_1808087_cq3yc9wfqnl.js',
7
+ '//at.alicdn.com/t/font_1808087_rnzqhjbqpc.js',
7
8
  ],
8
9
  });
9
10
  export default IconFont;
@@ -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.js CHANGED
@@ -12,6 +12,7 @@
12
12
  // import UploadDemo from './UploadDemo';
13
13
  // import CollapseDemo from './DemoCom/CollapseDemo';
14
14
  // import TimelineDemo from './DemoCom/TimelineDemo';
15
+ // import WeChatDemo from './DemoCom/WechatDemo';
15
16
  // dayjs.locale(zhCn);
16
17
  // ReactDOM.render(
17
18
  // // <React.StrictMode>
@@ -39,6 +40,9 @@
39
40
  // <Route exact path="/timeline">
40
41
  // <TimelineDemo />
41
42
  // </Route>
43
+ // <Route exact path="/wechat">
44
+ // <WeChatDemo />
45
+ // </Route>
42
46
  // <Route exact path="/test">
43
47
  // <div>
44
48
  // <h1>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztxkui",
3
- "version": "1.9.3",
3
+ "version": "1.9.7",
4
4
  "private": false,
5
5
  "description": "React components library",
6
6
  "author": "zt-front-end",