@nutui/nutui-react 1.4.4 → 1.4.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/CHANGELOG.md +15 -0
- package/dist/esm/Address.js +23 -21
- package/dist/esm/Cascader.js +234 -244
- package/dist/esm/Cell.js +3 -1
- package/dist/esm/ConfigProvider.js +2 -2
- package/dist/esm/NoticeBar.js +261 -32
- package/dist/esm/PullToRefresh.js +75 -81
- package/dist/esm/Tag.js +16 -11
- package/dist/esm/render-f8746530.js +10 -12
- package/dist/esm/types/src/packages/noticebar/noticebar.d.ts +5 -4
- package/dist/esm/types/src/packages/nutui.react.taro.d.ts +95 -95
- package/dist/esm/types/src/packages/nutui.react.taro.scss.d.ts +47 -47
- package/dist/esm/types/src/packages/nutui.taro.react.build.d.ts +48 -48
- package/dist/esm/types/src/packages/uploader/uploader.d.ts +1 -1
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.es.js +536 -5512
- package/dist/nutui.react.umd.js +536 -5512
- package/dist/packages/noticebar/noticebar.scss +17 -0
- package/dist/packages/radio/radio.scss +3 -1
- package/dist/packages/row/row.scss +2 -0
- package/dist/packages/searchbar/searchbar.scss +1 -1
- package/dist/packages/tag/tag.scss +13 -5
- package/dist/packages/virtuallist/virtuallist.scss +24 -0
- package/dist/style.css +1 -1
- package/dist/style.es.js +1 -1
- package/dist/styles/temp.scss +2340 -0
- package/dist/styles/theme-dark.scss +7 -0
- package/dist/styles/theme-default.scss +11 -0
- package/dist/styles/variables.scss +1945 -710
- package/dist/types/index.d.ts +6 -5
- package/package.json +9 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# v.14.5
|
|
2
|
+
`2023-02-01`
|
|
3
|
+
|
|
4
|
+
* :sparkles: feat: 虚拟列表 virtuallist 组件适配 taro (#602) @vickyYe
|
|
5
|
+
* :bug: fix: 修复 plain 与 type 同时使用时的样式错误 (#606) @eiinu
|
|
6
|
+
* :bug: fix: noticebar 组件修复垂直滚动自定义内容点击问题,增加onClickItem事件 (#596) @vickyYe
|
|
7
|
+
* :bug: fix: uploader 组件 beforeUpload 方法 ts 类型修复 (#601) @junjun666
|
|
8
|
+
* :bug: fix: 修改 cell 组件descTextAlign 的相关代码注入时机和使用文档 (#598) @irisSong
|
|
9
|
+
* :bug: fix: radio 组件横向排列选中后页面抖动 (#600) @oasis-cloud
|
|
10
|
+
* 🔨 chore: nutui taro 在 iOS 11 下和 taro 的 regenerator-runtime 冲突 (#604) @oasis-cloud
|
|
11
|
+
* 🔨 chore: 在线主题定制启动后默认打开基础样式 (#603) @oasis-cloud
|
|
12
|
+
* 🔨 chore: taro 版本移除 image 和 audio (#609) @oasis-cloud
|
|
13
|
+
* 🔨 chore: 开发环境文档预览增加最小宽度 (#608) @oasis-cloud
|
|
14
|
+
* 🔨 chore: 提取组件的 CSS Variables (#605) @oasis-cloud
|
|
15
|
+
|
|
1
16
|
# v1.4.4
|
|
2
17
|
`2023-01-17`
|
|
3
18
|
|
package/dist/esm/Address.js
CHANGED
|
@@ -279,32 +279,34 @@ var CustomRender = function CustomRender(props) {
|
|
|
279
279
|
if (modelValue.length > 0) {
|
|
280
280
|
var tagIndex = 0;
|
|
281
281
|
var selectedRegionC = selectedRegion && Object.assign(selectedRegion);
|
|
282
|
-
|
|
282
|
+
var _loop = function _loop() {
|
|
283
283
|
if (regionList[tabName[index]].length === 0) {
|
|
284
284
|
tagIndex = index - 1;
|
|
285
285
|
setTabIndex(index - 1);
|
|
286
|
-
break;
|
|
286
|
+
return "break";
|
|
287
287
|
} else {
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
setSelectedRegion(selectedRegionC);
|
|
306
|
-
})();
|
|
288
|
+
var val = modelValue[index];
|
|
289
|
+
var arr = regionList[tabName[index]];
|
|
290
|
+
if (privateType === 'custom') {
|
|
291
|
+
selectedRegionC[[tabName[index]]] = arr.filter(function (item) {
|
|
292
|
+
return item.id === val;
|
|
293
|
+
})[0];
|
|
294
|
+
} else if (privateType === 'custom2') {
|
|
295
|
+
var sumArr = [];
|
|
296
|
+
arr.forEach(function (item) {
|
|
297
|
+
sumArr.push.apply(sumArr, _toConsumableArray(item.list));
|
|
298
|
+
});
|
|
299
|
+
selectedRegionC[[tabName[index]]] = sumArr.filter(function (item) {
|
|
300
|
+
return item.id === val;
|
|
301
|
+
})[0];
|
|
302
|
+
}
|
|
303
|
+
tagIndex = index;
|
|
304
|
+
setSelectedRegion(selectedRegionC);
|
|
307
305
|
}
|
|
306
|
+
};
|
|
307
|
+
for (var index = 0; index < modelValue.length; index++) {
|
|
308
|
+
var _ret = _loop();
|
|
309
|
+
if (_ret === "break") break;
|
|
308
310
|
}
|
|
309
311
|
setTabIndex(tagIndex);
|
|
310
312
|
lineAnimation(tagIndex);
|
package/dist/esm/Cascader.js
CHANGED
|
@@ -321,44 +321,42 @@ var InternalCascader = function InternalCascader(props) {
|
|
|
321
321
|
var initData = /*#__PURE__*/function () {
|
|
322
322
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
323
323
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
324
|
-
while (1) {
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
if (!(isLazy() && !state.tree.nodes.length)) {
|
|
340
|
-
_context.next = 6;
|
|
341
|
-
break;
|
|
342
|
-
}
|
|
324
|
+
while (1) switch (_context.prev = _context.next) {
|
|
325
|
+
case 0:
|
|
326
|
+
// 初始化开始处理数据
|
|
327
|
+
state.lazyLoadMap.clear();
|
|
328
|
+
if (convertConfig && Object.keys(convertConfig).length > 0) {
|
|
329
|
+
state.optionsData = convertListToOptions(options, convertConfig);
|
|
330
|
+
} else {
|
|
331
|
+
state.optionsData = options;
|
|
332
|
+
}
|
|
333
|
+
state.tree = new Tree(state.optionsData, {
|
|
334
|
+
value: state.configs.valueKey,
|
|
335
|
+
text: state.configs.textKey,
|
|
336
|
+
children: state.configs.childrenKey
|
|
337
|
+
});
|
|
338
|
+
if (!(isLazy() && !state.tree.nodes.length)) {
|
|
343
339
|
_context.next = 6;
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
340
|
+
break;
|
|
341
|
+
}
|
|
342
|
+
_context.next = 6;
|
|
343
|
+
return invokeLazyLoad({
|
|
344
|
+
root: true,
|
|
345
|
+
loading: true,
|
|
346
|
+
text: '',
|
|
347
|
+
value: ''
|
|
348
|
+
});
|
|
349
|
+
case 6:
|
|
350
|
+
state.panes = [{
|
|
351
|
+
nodes: state.tree.nodes,
|
|
352
|
+
selectedNode: null,
|
|
353
|
+
paneKey: 'c1'
|
|
354
|
+
}];
|
|
355
|
+
syncValue();
|
|
356
|
+
setOptiosData(state.panes);
|
|
357
|
+
case 9:
|
|
358
|
+
case "end":
|
|
359
|
+
return _context.stop();
|
|
362
360
|
}
|
|
363
361
|
}, _callee);
|
|
364
362
|
}));
|
|
@@ -371,92 +369,88 @@ var InternalCascader = function InternalCascader(props) {
|
|
|
371
369
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
|
|
372
370
|
var currentValue, needToSync, parent, last, pathNodes;
|
|
373
371
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
374
|
-
while (1) {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
var
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
if (node) {
|
|
427
|
-
needToSync.push(value);
|
|
428
|
-
}
|
|
429
|
-
return _context2.abrupt("return", Promise.resolve(node));
|
|
430
|
-
case 8:
|
|
431
|
-
case "end":
|
|
432
|
-
return _context2.stop();
|
|
372
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
373
|
+
case 0:
|
|
374
|
+
currentValue = state.innerValue;
|
|
375
|
+
if (!(currentValue === undefined || !state.tree.nodes.length)) {
|
|
376
|
+
_context3.next = 3;
|
|
377
|
+
break;
|
|
378
|
+
}
|
|
379
|
+
return _context3.abrupt("return");
|
|
380
|
+
case 3:
|
|
381
|
+
if (!(currentValue.length === 0)) {
|
|
382
|
+
_context3.next = 6;
|
|
383
|
+
break;
|
|
384
|
+
}
|
|
385
|
+
state.tabsCursor = 0;
|
|
386
|
+
// state.panes = [{ nodes: state.tree.nodes, selectedNode: null }];
|
|
387
|
+
return _context3.abrupt("return");
|
|
388
|
+
case 6:
|
|
389
|
+
needToSync = currentValue;
|
|
390
|
+
if (!(isLazy() && Array.isArray(currentValue) && currentValue.length)) {
|
|
391
|
+
_context3.next = 19;
|
|
392
|
+
break;
|
|
393
|
+
}
|
|
394
|
+
needToSync = [];
|
|
395
|
+
parent = state.tree.nodes.find(function (node) {
|
|
396
|
+
return node.value === currentValue[0];
|
|
397
|
+
});
|
|
398
|
+
if (!parent) {
|
|
399
|
+
_context3.next = 19;
|
|
400
|
+
break;
|
|
401
|
+
}
|
|
402
|
+
needToSync = [parent.value];
|
|
403
|
+
state.initLoading = true;
|
|
404
|
+
_context3.next = 15;
|
|
405
|
+
return currentValue.slice(1).reduce( /*#__PURE__*/function () {
|
|
406
|
+
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(p, value) {
|
|
407
|
+
var _parent$children;
|
|
408
|
+
var parent, node;
|
|
409
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
410
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
411
|
+
case 0:
|
|
412
|
+
_context2.next = 2;
|
|
413
|
+
return p;
|
|
414
|
+
case 2:
|
|
415
|
+
parent = _context2.sent;
|
|
416
|
+
_context2.next = 5;
|
|
417
|
+
return invokeLazyLoad(parent);
|
|
418
|
+
case 5:
|
|
419
|
+
node = parent === null || parent === void 0 ? void 0 : (_parent$children = parent.children) === null || _parent$children === void 0 ? void 0 : _parent$children.find(function (item) {
|
|
420
|
+
return item.value === value;
|
|
421
|
+
});
|
|
422
|
+
if (node) {
|
|
423
|
+
needToSync.push(value);
|
|
433
424
|
}
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
};
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
425
|
+
return _context2.abrupt("return", Promise.resolve(node));
|
|
426
|
+
case 8:
|
|
427
|
+
case "end":
|
|
428
|
+
return _context2.stop();
|
|
429
|
+
}
|
|
430
|
+
}, _callee2);
|
|
431
|
+
}));
|
|
432
|
+
return function (_x, _x2) {
|
|
433
|
+
return _ref3.apply(this, arguments);
|
|
434
|
+
};
|
|
435
|
+
}(), Promise.resolve(parent));
|
|
436
|
+
case 15:
|
|
437
|
+
last = _context3.sent;
|
|
438
|
+
_context3.next = 18;
|
|
439
|
+
return invokeLazyLoad(last);
|
|
440
|
+
case 18:
|
|
441
|
+
state.initLoading = false;
|
|
442
|
+
case 19:
|
|
443
|
+
if (needToSync.length && currentValue === value) {
|
|
444
|
+
pathNodes = state.tree.getPathNodesByValue(needToSync);
|
|
445
|
+
pathNodes.forEach(function (node, index) {
|
|
446
|
+
state.tabsCursor = index;
|
|
447
|
+
// 当有默认值时,不触发 chooseItem 里的 emit 事件
|
|
448
|
+
_chooseItem(node, true);
|
|
449
|
+
});
|
|
450
|
+
}
|
|
451
|
+
case 20:
|
|
452
|
+
case "end":
|
|
453
|
+
return _context3.stop();
|
|
460
454
|
}
|
|
461
455
|
}, _callee3);
|
|
462
456
|
}));
|
|
@@ -468,55 +462,53 @@ var InternalCascader = function InternalCascader(props) {
|
|
|
468
462
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(node) {
|
|
469
463
|
var parent, lazyLoadPromise, nodes;
|
|
470
464
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
471
|
-
while (1) {
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
465
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
466
|
+
case 0:
|
|
467
|
+
if (node) {
|
|
468
|
+
_context4.next = 2;
|
|
469
|
+
break;
|
|
470
|
+
}
|
|
471
|
+
return _context4.abrupt("return");
|
|
472
|
+
case 2:
|
|
473
|
+
if (state.configs.lazyLoad) {
|
|
474
|
+
_context4.next = 5;
|
|
475
|
+
break;
|
|
476
|
+
}
|
|
477
|
+
node.leaf = true;
|
|
478
|
+
return _context4.abrupt("return");
|
|
479
|
+
case 5:
|
|
480
|
+
if (!(state.tree.isLeaf(node, isLazy()) || state.tree.hasChildren(node, isLazy()))) {
|
|
481
|
+
_context4.next = 7;
|
|
482
|
+
break;
|
|
483
|
+
}
|
|
484
|
+
return _context4.abrupt("return");
|
|
485
|
+
case 7:
|
|
486
|
+
node.loading = true;
|
|
487
|
+
parent = node.root ? null : node;
|
|
488
|
+
lazyLoadPromise = state.lazyLoadMap.get(node);
|
|
489
|
+
if (!lazyLoadPromise) {
|
|
490
|
+
lazyLoadPromise = new Promise(function (resolve) {
|
|
491
|
+
var _state$configs$lazyLo, _state$configs;
|
|
492
|
+
// 外部必须resolve
|
|
493
|
+
(_state$configs$lazyLo = (_state$configs = state.configs).lazyLoad) === null || _state$configs$lazyLo === void 0 ? void 0 : _state$configs$lazyLo.call(_state$configs, node, resolve);
|
|
494
|
+
});
|
|
495
|
+
state.lazyLoadMap.set(node, lazyLoadPromise);
|
|
496
|
+
}
|
|
497
|
+
_context4.next = 13;
|
|
498
|
+
return lazyLoadPromise;
|
|
499
|
+
case 13:
|
|
500
|
+
nodes = _context4.sent;
|
|
501
|
+
if (Array.isArray(nodes) && nodes.length > 0) {
|
|
502
|
+
state.tree.updateChildren(nodes, parent);
|
|
503
|
+
} else {
|
|
504
|
+
// 如果加载完成后没有提供子节点,作为叶子节点处理
|
|
484
505
|
node.leaf = true;
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
return _context4.abrupt("return");
|
|
492
|
-
case 7:
|
|
493
|
-
node.loading = true;
|
|
494
|
-
parent = node.root ? null : node;
|
|
495
|
-
lazyLoadPromise = state.lazyLoadMap.get(node);
|
|
496
|
-
if (!lazyLoadPromise) {
|
|
497
|
-
lazyLoadPromise = new Promise(function (resolve) {
|
|
498
|
-
var _state$configs$lazyLo, _state$configs;
|
|
499
|
-
// 外部必须resolve
|
|
500
|
-
(_state$configs$lazyLo = (_state$configs = state.configs).lazyLoad) === null || _state$configs$lazyLo === void 0 ? void 0 : _state$configs$lazyLo.call(_state$configs, node, resolve);
|
|
501
|
-
});
|
|
502
|
-
state.lazyLoadMap.set(node, lazyLoadPromise);
|
|
503
|
-
}
|
|
504
|
-
_context4.next = 13;
|
|
505
|
-
return lazyLoadPromise;
|
|
506
|
-
case 13:
|
|
507
|
-
nodes = _context4.sent;
|
|
508
|
-
if (Array.isArray(nodes) && nodes.length > 0) {
|
|
509
|
-
state.tree.updateChildren(nodes, parent);
|
|
510
|
-
} else {
|
|
511
|
-
// 如果加载完成后没有提供子节点,作为叶子节点处理
|
|
512
|
-
node.leaf = true;
|
|
513
|
-
}
|
|
514
|
-
node.loading = false;
|
|
515
|
-
state.lazyLoadMap["delete"](node);
|
|
516
|
-
case 17:
|
|
517
|
-
case "end":
|
|
518
|
-
return _context4.stop();
|
|
519
|
-
}
|
|
506
|
+
}
|
|
507
|
+
node.loading = false;
|
|
508
|
+
state.lazyLoadMap["delete"](node);
|
|
509
|
+
case 17:
|
|
510
|
+
case "end":
|
|
511
|
+
return _context4.stop();
|
|
520
512
|
}
|
|
521
513
|
}, _callee4);
|
|
522
514
|
}));
|
|
@@ -536,81 +528,79 @@ var InternalCascader = function InternalCascader(props) {
|
|
|
536
528
|
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(node, type) {
|
|
537
529
|
var pathNodes, optionParams, level, _pathNodes, _optionParams;
|
|
538
530
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
539
|
-
while (1) {
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
return item.selectedNode;
|
|
558
|
-
});
|
|
559
|
-
optionParams = pathNodes.map(function (item) {
|
|
560
|
-
return item.value;
|
|
561
|
-
});
|
|
562
|
-
onChange(optionParams, pathNodes);
|
|
563
|
-
onPathChange(optionParams, pathNodes);
|
|
564
|
-
}
|
|
565
|
-
setOptiosData(state.panes);
|
|
566
|
-
close();
|
|
567
|
-
return _context5.abrupt("return");
|
|
568
|
-
case 10:
|
|
569
|
-
if (!state.tree.hasChildren(node, isLazy())) {
|
|
570
|
-
_context5.next = 20;
|
|
571
|
-
break;
|
|
572
|
-
}
|
|
573
|
-
level = node.level + 1;
|
|
574
|
-
state.panes[state.tabsCursor].selectedNode = node;
|
|
575
|
-
state.panes = state.panes.slice(0, level);
|
|
576
|
-
state.tabsCursor = level;
|
|
577
|
-
state.panes.push({
|
|
578
|
-
nodes: node.children || [],
|
|
579
|
-
selectedNode: null,
|
|
580
|
-
paneKey: "c".concat(state.tabsCursor + 1)
|
|
531
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
532
|
+
case 0:
|
|
533
|
+
if (!(!type && node.disabled || !state.panes[state.tabsCursor])) {
|
|
534
|
+
_context5.next = 2;
|
|
535
|
+
break;
|
|
536
|
+
}
|
|
537
|
+
return _context5.abrupt("return");
|
|
538
|
+
case 2:
|
|
539
|
+
if (!state.tree.isLeaf(node, isLazy())) {
|
|
540
|
+
_context5.next = 10;
|
|
541
|
+
break;
|
|
542
|
+
}
|
|
543
|
+
node.leaf = true;
|
|
544
|
+
state.panes[state.tabsCursor].selectedNode = node;
|
|
545
|
+
state.panes = state.panes.slice(0, node.level + 1);
|
|
546
|
+
if (!type) {
|
|
547
|
+
pathNodes = state.panes.map(function (item) {
|
|
548
|
+
return item.selectedNode;
|
|
581
549
|
});
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
550
|
+
optionParams = pathNodes.map(function (item) {
|
|
551
|
+
return item.value;
|
|
552
|
+
});
|
|
553
|
+
onChange(optionParams, pathNodes);
|
|
554
|
+
onPathChange(optionParams, pathNodes);
|
|
555
|
+
}
|
|
556
|
+
setOptiosData(state.panes);
|
|
557
|
+
close();
|
|
558
|
+
return _context5.abrupt("return");
|
|
559
|
+
case 10:
|
|
560
|
+
if (!state.tree.hasChildren(node, isLazy())) {
|
|
561
|
+
_context5.next = 20;
|
|
562
|
+
break;
|
|
563
|
+
}
|
|
564
|
+
level = node.level + 1;
|
|
565
|
+
state.panes[state.tabsCursor].selectedNode = node;
|
|
566
|
+
state.panes = state.panes.slice(0, level);
|
|
567
|
+
state.tabsCursor = level;
|
|
568
|
+
state.panes.push({
|
|
569
|
+
nodes: node.children || [],
|
|
570
|
+
selectedNode: null,
|
|
571
|
+
paneKey: "c".concat(state.tabsCursor + 1)
|
|
572
|
+
});
|
|
573
|
+
setTabvalue("c".concat(state.tabsCursor + 1));
|
|
574
|
+
setOptiosData(state.panes);
|
|
575
|
+
if (!type) {
|
|
576
|
+
_pathNodes = state.panes.map(function (item) {
|
|
577
|
+
return item.selectedNode;
|
|
578
|
+
});
|
|
579
|
+
_optionParams = _pathNodes.map(function (item) {
|
|
580
|
+
return item === null || item === void 0 ? void 0 : item.value;
|
|
581
|
+
});
|
|
582
|
+
onPathChange(_optionParams, _pathNodes);
|
|
583
|
+
}
|
|
584
|
+
return _context5.abrupt("return");
|
|
585
|
+
case 20:
|
|
586
|
+
state.currentProcessNode = node;
|
|
587
|
+
if (!node.loading) {
|
|
588
|
+
_context5.next = 23;
|
|
589
|
+
break;
|
|
590
|
+
}
|
|
591
|
+
return _context5.abrupt("return");
|
|
592
|
+
case 23:
|
|
593
|
+
_context5.next = 25;
|
|
594
|
+
return invokeLazyLoad(node);
|
|
595
|
+
case 25:
|
|
596
|
+
if (state.currentProcessNode === node) {
|
|
597
|
+
state.panes[state.tabsCursor].selectedNode = node;
|
|
598
|
+
_chooseItem(node, type);
|
|
599
|
+
}
|
|
600
|
+
setOptiosData(state.panes);
|
|
601
|
+
case 27:
|
|
602
|
+
case "end":
|
|
603
|
+
return _context5.stop();
|
|
614
604
|
}
|
|
615
605
|
}, _callee5);
|
|
616
606
|
}));
|
package/dist/esm/Cell.js
CHANGED
|
@@ -57,7 +57,9 @@ var Cell = function Cell(props) {
|
|
|
57
57
|
var baseStyle = {
|
|
58
58
|
borderRadius: Number.isNaN(Number(roundRadius)) ? String(roundRadius) : "".concat(roundRadius, "px")
|
|
59
59
|
};
|
|
60
|
-
var styles = title || subTitle || icon ? {
|
|
60
|
+
var styles = title || subTitle || icon ? {
|
|
61
|
+
textAlign: descTextAlign
|
|
62
|
+
} : {
|
|
61
63
|
textAlign: descTextAlign,
|
|
62
64
|
flex: 1
|
|
63
65
|
};
|
|
@@ -4,7 +4,7 @@ var _excluded = ["children"];
|
|
|
4
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
6
|
import React__default, { createContext, useContext, useMemo } from 'react';
|
|
7
|
-
import
|
|
7
|
+
import kebabCase from 'lodash.kebabcase';
|
|
8
8
|
var zhCN = {
|
|
9
9
|
save: '保存',
|
|
10
10
|
confirm: '确认',
|
|
@@ -162,7 +162,7 @@ var useConfig = function useConfig() {
|
|
|
162
162
|
function convertThemeVarsToCSSVars(themeVars) {
|
|
163
163
|
var cssVars = {};
|
|
164
164
|
Object.keys(themeVars).forEach(function (key) {
|
|
165
|
-
cssVars["--".concat(
|
|
165
|
+
cssVars["--".concat(kebabCase(key))] = themeVars[key];
|
|
166
166
|
});
|
|
167
167
|
return cssVars;
|
|
168
168
|
}
|