@vtx/components 4.0.0-beta.41 → 4.0.0-beta.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.
@@ -26,7 +26,7 @@ import getToken from "../utils/getToken";
26
26
  import getSignature from '@vtx/utils/lib/getSignature';
27
27
  import useSet from "../utils/useSet";
28
28
  import md5 from 'md5';
29
- import { getVtxToken } from '@vtx/utils';
29
+ import { getVtxToken, getUrlParam } from '@vtx/utils';
30
30
  import classnames from 'classnames';
31
31
  import { useStyle } from "./style/index";
32
32
  import { VtxProvider, useIntl } from "../vtx-provider";
@@ -52,10 +52,13 @@ var VtxImport2 = function VtxImport2(props) {
52
52
  var visible = props.visible,
53
53
  close = props.close,
54
54
  title = props.title,
55
- accept = props.accept,
56
- fileKey = props.fileKey,
55
+ _props$accept = props.accept,
56
+ accept = _props$accept === void 0 ? 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/csv' : _props$accept,
57
+ _props$fileKey = props.fileKey,
58
+ fileKey = _props$fileKey === void 0 ? 'file' : _props$fileKey,
57
59
  uploadURL = props.uploadURL,
58
- postData = props.postData,
60
+ _props$postData = props.postData,
61
+ postData = _props$postData === void 0 ? {} : _props$postData,
59
62
  errorURL = props.errorURL,
60
63
  templateURL = props.templateURL,
61
64
  afterUpload = props.afterUpload,
@@ -430,11 +433,7 @@ var VtxImport2 = function VtxImport2(props) {
430
433
  })]
431
434
  })));
432
435
  };
433
- VtxImport2.defaultProps = {
434
- fileKey: 'file',
435
- accept: 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/csv',
436
- postData: {}
437
- };
436
+ VtxImport2.defaultProps = {};
438
437
  VtxImport2.propTypes = {
439
438
  visible: PropTypes.bool,
440
439
  templateURL: PropTypes.string,
@@ -130,7 +130,6 @@ var VtxTreeSelect = function VtxTreeSelect(_ref) {
130
130
  setPopWidth(size === null || size === void 0 ? void 0 : size.width);
131
131
  }
132
132
  }, [size === null || size === void 0 ? void 0 : size.width]);
133
- console.log('selectedNodes', selectedNodes);
134
133
  var popoverContent = /*#__PURE__*/_jsxs(_Fragment, {
135
134
  children: [/*#__PURE__*/_jsxs("div", {
136
135
  className: classnames("".concat(prefixCls, "-count-head"), hashId),
@@ -209,7 +208,8 @@ var VtxTreeSelect = function VtxTreeSelect(_ref) {
209
208
  maxTagCount: "responsive",
210
209
  treeDefaultExpandAll: true,
211
210
  fieldNames: fieldNames,
212
- labelInValue: _labelInValue
211
+ labelInValue: _labelInValue,
212
+ disabled: disabled
213
213
  }, props), {}, {
214
214
  onChange: function onChange(value, label, extra) {
215
215
  return onChangeTreeSelect(value, label, extra, selectedNodes);
@@ -58,10 +58,13 @@ var VtxImport2 = exports.VtxImport2 = function VtxImport2(props) {
58
58
  var visible = props.visible,
59
59
  close = props.close,
60
60
  title = props.title,
61
- accept = props.accept,
62
- fileKey = props.fileKey,
61
+ _props$accept = props.accept,
62
+ accept = _props$accept === void 0 ? 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/csv' : _props$accept,
63
+ _props$fileKey = props.fileKey,
64
+ fileKey = _props$fileKey === void 0 ? 'file' : _props$fileKey,
63
65
  uploadURL = props.uploadURL,
64
- postData = props.postData,
66
+ _props$postData = props.postData,
67
+ postData = _props$postData === void 0 ? {} : _props$postData,
65
68
  errorURL = props.errorURL,
66
69
  templateURL = props.templateURL,
67
70
  afterUpload = props.afterUpload,
@@ -257,7 +260,7 @@ var VtxImport2 = exports.VtxImport2 = function VtxImport2(props) {
257
260
  }
258
261
  request.setRequestHeader('Authorization', token ? "Bearer ".concat(token) : '');
259
262
  request.setRequestHeader('access_token', token ? "".concat(token) : '');
260
- request.setRequestHeader('systemCode', getUrlParam('systemCode') ? getUrlParam('systemCode') : '');
263
+ request.setRequestHeader('systemCode', (0, _utils.getUrlParam)('systemCode') ? (0, _utils.getUrlParam)('systemCode') : '');
261
264
  // 添加操作日志
262
265
  request.setRequestHeader('operation', encodeURIComponent(JSON.stringify({
263
266
  menuId: sessionStorage.getItem('vtxmenuselectedKeys'),
@@ -436,11 +439,7 @@ var VtxImport2 = exports.VtxImport2 = function VtxImport2(props) {
436
439
  })]
437
440
  })));
438
441
  };
439
- VtxImport2.defaultProps = {
440
- fileKey: 'file',
441
- accept: 'application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,text/csv',
442
- postData: {}
443
- };
442
+ VtxImport2.defaultProps = {};
444
443
  VtxImport2.propTypes = {
445
444
  visible: _propTypes.default.bool,
446
445
  templateURL: _propTypes.default.string,
@@ -137,7 +137,6 @@ var VtxTreeSelect = exports.VtxTreeSelect = function VtxTreeSelect(_ref) {
137
137
  setPopWidth(size === null || size === void 0 ? void 0 : size.width);
138
138
  }
139
139
  }, [size === null || size === void 0 ? void 0 : size.width]);
140
- console.log('selectedNodes', selectedNodes);
141
140
  var popoverContent = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
142
141
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
143
142
  className: (0, _classnames.default)("".concat(prefixCls, "-count-head"), hashId),
@@ -216,7 +215,8 @@ var VtxTreeSelect = exports.VtxTreeSelect = function VtxTreeSelect(_ref) {
216
215
  maxTagCount: "responsive",
217
216
  treeDefaultExpandAll: true,
218
217
  fieldNames: fieldNames,
219
- labelInValue: _labelInValue
218
+ labelInValue: _labelInValue,
219
+ disabled: disabled
220
220
  }, props), {}, {
221
221
  onChange: function onChange(value, label, extra) {
222
222
  return onChangeTreeSelect(value, label, extra, selectedNodes);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtx/components",
3
- "version": "4.0.0-beta.41",
3
+ "version": "4.0.0-beta.43",
4
4
  "description": "React components for Vortex",
5
5
  "keywords": [
6
6
  "react",