dlt-for-react 2.2.4 → 2.2.5

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.
package/README.md CHANGED
@@ -13,7 +13,11 @@ npm publish
13
13
  > npm install dlt-for-react --save
14
14
 
15
15
  ##### 版本修改记录
16
- #### V2.2.3—2025 年 10 月 13 日
16
+
17
+ #### V2.2.5—2025 年 11 月 28 日
18
+ 1.优化KyContainerFrame组件
19
+
20
+ #### V2.2.4—2025 年 10 月 13 日
17
21
 
18
22
  1. 修改KyEditableTable组件,添加输入控件值变化监听事件
19
23
  2. HqWzSelector扩展column列
@@ -68,17 +68,51 @@ var _propTypes2 = _interopRequireDefault(_propTypes);
68
68
 
69
69
  var _reactCustomScrollbarsPatched = require("react-custom-scrollbars-patched");
70
70
 
71
- var _utils = require("../../utils");
72
-
73
71
  var _NHCore = require("../../utils/NHCore");
74
72
 
75
73
  require("../../../assets/components/KyContainerFrame/index.less");
76
74
 
77
75
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
78
76
 
77
+ var createUuid = function createUuid() {
78
+ var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;
79
+ var radix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 16;
80
+
81
+ var chars = '0123456789abcdefghijklmnopqrstuvwxyz'.split('');
82
+ var uuid = [],
83
+ i;
84
+ radix = radix || chars.length;
85
+
86
+ if (len) {
87
+ // Compact form
88
+ for (i = 0; i < len; i++) {
89
+ uuid[i] = chars[0 | Math.random() * radix];
90
+ }
91
+ } else {
92
+ // rfc4122, version 4 form
93
+ var r;
94
+
95
+ // rfc4122 requires these characters
96
+ uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
97
+ uuid[14] = '4';
98
+
99
+ // Fill in random data. At i==19 set the high bits of clock sequence as
100
+ // per rfc4122, sec. 4.1.5
101
+ for (i = 0; i < 36; i++) {
102
+ if (!uuid[i]) {
103
+ r = 0 | Math.random() * 16;
104
+ uuid[i] = chars[i == 19 ? r & 0x3 | 0x8 : r];
105
+ }
106
+ }
107
+ }
108
+
109
+ return uuid.join('');
110
+ };
111
+
79
112
  /**
80
113
  * 容器框架组件
81
114
  */
115
+
82
116
  var KyContainerFrame = function (_React$Component) {
83
117
  (0, _inherits3.default)(KyContainerFrame, _React$Component);
84
118
 
@@ -116,7 +150,7 @@ var KyContainerFrame = function (_React$Component) {
116
150
  var list = buttons.map(function (item) {
117
151
  return _react2.default.createElement(
118
152
  _col2.default,
119
- { key: (0, _utils.createUuid)() },
153
+ { key: createUuid() },
120
154
  item
121
155
  );
122
156
  });
@@ -124,7 +158,7 @@ var KyContainerFrame = function (_React$Component) {
124
158
  list.push(_react2.default.createElement(
125
159
  _button2.default,
126
160
  {
127
- key: (0, _utils.createUuid)(),
161
+ key: createUuid(),
128
162
  type: okType,
129
163
  onClick: _this.handleSave,
130
164
  loading: loading !== undefined ? loading : _this.state.loading
@@ -138,7 +172,7 @@ var KyContainerFrame = function (_React$Component) {
138
172
  {
139
173
  type: clType,
140
174
  style: { marginLeft: "16px" },
141
- key: (0, _utils.createUuid)(),
175
+ key: createUuid(),
142
176
  onClick: onCancel
143
177
  },
144
178
  "\u8FD4\u56DE"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dlt-for-react",
3
- "version": "2.2.4",
3
+ "version": "2.2.5",
4
4
  "description": "dlt for react",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {