vxe-pc-ui 3.16.26 → 3.16.27

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.
Files changed (63) hide show
  1. package/es/icon/style.css +1 -1
  2. package/es/input/src/input.js +10 -0
  3. package/es/list/src/list.js +14 -8
  4. package/es/number-input/src/number-input.js +6 -0
  5. package/es/style.css +1 -1
  6. package/es/style.min.css +1 -1
  7. package/es/textarea/src/textarea.js +8 -0
  8. package/es/tree/src/tree.js +17 -11
  9. package/es/tree-select/src/tree-select.js +9 -0
  10. package/es/tree-select/style.css +6 -0
  11. package/es/tree-select/style.min.css +1 -1
  12. package/es/ui/index.js +1 -1
  13. package/es/ui/src/log.js +1 -1
  14. package/es/vxe-tree-select/style.css +6 -0
  15. package/es/vxe-tree-select/style.min.css +1 -1
  16. package/lib/icon/style/style.css +1 -1
  17. package/lib/icon/style/style.min.css +1 -1
  18. package/lib/index.umd.js +72 -34
  19. package/lib/index.umd.min.js +1 -1
  20. package/lib/input/src/input.js +10 -0
  21. package/lib/input/src/input.min.js +1 -1
  22. package/lib/list/src/list.js +18 -14
  23. package/lib/list/src/list.min.js +1 -1
  24. package/lib/number-input/src/number-input.js +6 -0
  25. package/lib/number-input/src/number-input.min.js +1 -1
  26. package/lib/style.css +1 -1
  27. package/lib/style.min.css +1 -1
  28. package/lib/textarea/src/textarea.js +7 -0
  29. package/lib/textarea/src/textarea.min.js +1 -1
  30. package/lib/tree/src/tree.js +20 -18
  31. package/lib/tree/src/tree.min.js +1 -1
  32. package/lib/tree-select/src/tree-select.js +9 -0
  33. package/lib/tree-select/src/tree-select.min.js +1 -1
  34. package/lib/tree-select/style/style.css +6 -0
  35. package/lib/tree-select/style/style.min.css +1 -1
  36. package/lib/ui/index.js +1 -1
  37. package/lib/ui/index.min.js +1 -1
  38. package/lib/ui/src/log.js +1 -1
  39. package/lib/ui/src/log.min.js +1 -1
  40. package/lib/vxe-tree-select/style/style.css +6 -0
  41. package/lib/vxe-tree-select/style/style.min.css +1 -1
  42. package/package.json +1 -1
  43. package/packages/input/src/input.ts +10 -0
  44. package/packages/list/src/list.ts +14 -8
  45. package/packages/number-input/src/number-input.ts +6 -0
  46. package/packages/textarea/src/textarea.ts +7 -0
  47. package/packages/tree/src/tree.ts +17 -11
  48. package/packages/tree-select/src/tree-select.ts +9 -0
  49. package/styles/components/tree-select.scss +7 -0
  50. package/types/components/grid.d.ts +176 -0
  51. package/types/components/tree-select.d.ts +6 -1
  52. /package/es/icon/{iconfont.1785912556406.ttf → iconfont.1785940501934.ttf} +0 -0
  53. /package/es/icon/{iconfont.1785912556406.woff → iconfont.1785940501934.woff} +0 -0
  54. /package/es/icon/{iconfont.1785912556406.woff2 → iconfont.1785940501934.woff2} +0 -0
  55. /package/es/{iconfont.1785912556406.ttf → iconfont.1785940501934.ttf} +0 -0
  56. /package/es/{iconfont.1785912556406.woff → iconfont.1785940501934.woff} +0 -0
  57. /package/es/{iconfont.1785912556406.woff2 → iconfont.1785940501934.woff2} +0 -0
  58. /package/lib/icon/style/{iconfont.1785912556406.ttf → iconfont.1785940501934.ttf} +0 -0
  59. /package/lib/icon/style/{iconfont.1785912556406.woff → iconfont.1785940501934.woff} +0 -0
  60. /package/lib/icon/style/{iconfont.1785912556406.woff2 → iconfont.1785940501934.woff2} +0 -0
  61. /package/lib/{iconfont.1785912556406.ttf → iconfont.1785940501934.ttf} +0 -0
  62. /package/lib/{iconfont.1785912556406.woff → iconfont.1785940501934.woff} +0 -0
  63. /package/lib/{iconfont.1785912556406.woff2 → iconfont.1785940501934.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -13260,7 +13260,7 @@ var es_array_join = __webpack_require__(8598);
13260
13260
 
13261
13261
 
13262
13262
  var log_log = VxeUI.log;
13263
- var uiVersion = "ui v".concat("3.16.26");
13263
+ var uiVersion = "ui v".concat("3.16.27");
13264
13264
  function createComponentLog(name) {
13265
13265
  var tableVersion = VxeUI.tableVersion ? "table v".concat(VxeUI.tableVersion) : '';
13266
13266
  var ganttVersion = VxeUI.ganttVersion ? "gantt v".concat(VxeUI.ganttVersion) : '';
@@ -13280,7 +13280,7 @@ var errLog = log_log.create('error', uiVersion);
13280
13280
 
13281
13281
 
13282
13282
 
13283
- var ui_version = "3.16.26";
13283
+ var ui_version = "3.16.27";
13284
13284
  VxeUI.uiVersion = ui_version;
13285
13285
  VxeUI.dynamicApp = dynamicApp;
13286
13286
  function config(options) {
@@ -23497,23 +23497,18 @@ function list_createInternalData() {
23497
23497
  }
23498
23498
  return renderEmptyElement($xeList);
23499
23499
  },
23500
- renderRadio: function renderRadio(h, row, rowid, isChecked) {
23500
+ renderRadio: function renderRadio(h, row, rowid, isDisabled, isChecked) {
23501
23501
  var $xeList = this;
23502
23502
  var props = $xeList;
23503
23503
  var showRadio = props.showRadio;
23504
23504
  var radioOpts = $xeList.computeRadioOpts;
23505
23505
  var showIcon = radioOpts.showIcon,
23506
- checkMethod = radioOpts.checkMethod,
23507
23506
  visibleMethod = radioOpts.visibleMethod;
23508
23507
  var isVisible = !visibleMethod || visibleMethod({
23509
23508
  $list: $xeList,
23510
23509
  row: row
23511
23510
  });
23512
23511
  if (showRadio && showIcon && isVisible) {
23513
- var isDisabled = checkMethod ? !checkMethod({
23514
- $list: $xeList,
23515
- row: row
23516
- }) : false;
23517
23512
  return h('div', {
23518
23513
  key: 'ct2',
23519
23514
  class: ['vxe-list--radio-option', {
@@ -23533,23 +23528,18 @@ function list_createInternalData() {
23533
23528
  }
23534
23529
  return renderEmptyElement($xeList);
23535
23530
  },
23536
- renderCheckbox: function renderCheckbox(h, row, rowid, isChecked) {
23531
+ renderCheckbox: function renderCheckbox(h, row, rowid, isDisabled, isChecked) {
23537
23532
  var $xeList = this;
23538
23533
  var props = $xeList;
23539
23534
  var showCheckbox = props.showCheckbox;
23540
23535
  var checkboxOpts = $xeList.computeCheckboxOpts;
23541
23536
  var showIcon = checkboxOpts.showIcon,
23542
- checkMethod = checkboxOpts.checkMethod,
23543
23537
  visibleMethod = checkboxOpts.visibleMethod;
23544
23538
  var isVisible = !visibleMethod || visibleMethod({
23545
23539
  $list: $xeList,
23546
23540
  row: row
23547
23541
  });
23548
23542
  if (showCheckbox && showIcon && isVisible) {
23549
- var isDisabled = checkMethod ? !checkMethod({
23550
- $list: $xeList,
23551
- row: row
23552
- }) : false;
23553
23543
  return h('div', {
23554
23544
  key: 'ct3',
23555
23545
  class: ['vxe-list--checkbox-option', {
@@ -23589,6 +23579,8 @@ function list_createInternalData() {
23589
23579
  icon = dragOpts.icon,
23590
23580
  disabledMethod = dragOpts.disabledMethod,
23591
23581
  visibleMethod = dragOpts.visibleMethod;
23582
+ var radioOpts = $xeList.computeRadioOpts;
23583
+ var checkboxOpts = $xeList.computeCheckboxOpts;
23592
23584
  var rowOpts = $xeList.computeRowOpts;
23593
23585
  var useKey = rowOpts.useKey,
23594
23586
  contentField = rowOpts.contentField,
@@ -23605,19 +23597,29 @@ function list_createInternalData() {
23605
23597
  $list: $xeList
23606
23598
  };
23607
23599
  var isRadioChecked = false;
23600
+ var isRadioDisabled = false;
23608
23601
  if (showRadio) {
23609
23602
  isRadioChecked = selectRadioRow && (row === selectRadioRow || $xeList.eqRowByKey(selectRadioRow, rowKey));
23603
+ isRadioDisabled = radioOpts.checkMethod ? !radioOpts.checkMethod({
23604
+ $list: $xeList,
23605
+ row: row
23606
+ }) : false;
23610
23607
  }
23611
23608
  var isCheckboxChecked = false;
23609
+ var isCheckboxDisabled = false;
23612
23610
  if (showCheckbox) {
23613
23611
  isCheckboxChecked = !!(updateCheckboxFlag && selectCheckboxMaps[rowid]);
23612
+ isCheckboxDisabled = checkboxOpts.checkMethod ? !checkboxOpts.checkMethod({
23613
+ $list: $xeList,
23614
+ row: row
23615
+ }) : false;
23614
23616
  }
23615
23617
  var ctVNs = [];
23616
23618
  if (showRadio) {
23617
- ctVNs.push($xeList.renderRadio(h, row, rowid, isRadioChecked));
23619
+ ctVNs.push($xeList.renderRadio(h, row, rowid, isRadioDisabled, isRadioChecked));
23618
23620
  }
23619
23621
  if (showCheckbox) {
23620
- ctVNs.push($xeList.renderCheckbox(h, row, rowid, isCheckboxChecked));
23622
+ ctVNs.push($xeList.renderCheckbox(h, row, rowid, isCheckboxDisabled, isCheckboxChecked));
23621
23623
  }
23622
23624
  var isDragDisabled = false;
23623
23625
  if (isDrag && keyField && (!visibleMethod || visibleMethod(rowParams))) {
@@ -23677,7 +23679,9 @@ function list_createInternalData() {
23677
23679
  class: ['vxe-list--row', isRowFnCls ? rowClassName(rowParams) : rowClassName || '', {
23678
23680
  'is--drag-disabled': isDragDisabled,
23679
23681
  'is--current': currRowFlag && currentRow && $xeList.eqRowByKey(currentRow, rowKey),
23682
+ 'is-radio--disabled': isRadioDisabled,
23680
23683
  'is-radio--checked': isRadioChecked,
23684
+ 'is-checkbox--disabled': isCheckboxDisabled,
23681
23685
  'is-checkbox--checked': isCheckboxChecked
23682
23686
  }],
23683
23687
  attrs: hasKey && keyField ? {
@@ -24956,6 +24960,10 @@ var input_createComponentLog = createComponentLog('input'),
24956
24960
  emitInputEvent: function emitInputEvent(value, evnt) {
24957
24961
  var $xeInput = this;
24958
24962
  var reactData = $xeInput.reactData;
24963
+ var $xeForm = $xeInput.$xeForm;
24964
+ var formItemInfo = $xeInput.formItemInfo;
24965
+ var $xeSelect = $xeInput.$xeSelect;
24966
+ var $xeTreeSelect = $xeInput.$xeTreeSelect;
24959
24967
  var isDatePickerType = $xeInput.computeIsDatePickerType;
24960
24968
  var inpImmediate = $xeInput.computeInpImmediate;
24961
24969
  reactData.inputValue = value;
@@ -24966,6 +24974,12 @@ var input_createComponentLog = createComponentLog('input'),
24966
24974
  $xeInput.dispatchEvent('input', {
24967
24975
  value: value
24968
24976
  }, evnt);
24977
+ if (!$xeSelect && !$xeTreeSelect) {
24978
+ // 自动更新校验状态
24979
+ if ($xeForm && formItemInfo) {
24980
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
24981
+ }
24982
+ }
24969
24983
  }
24970
24984
  }
24971
24985
  },
@@ -31735,6 +31749,8 @@ var handleNumberString = function handleNumberString(val) {
31735
31749
  emitInputEvent: function emitInputEvent(inputValue, evnt) {
31736
31750
  var $xeNumberInput = this;
31737
31751
  var reactData = $xeNumberInput.reactData;
31752
+ var $xeForm = $xeNumberInput.$xeForm;
31753
+ var formItemInfo = $xeNumberInput.formItemInfo;
31738
31754
  var inpImmediate = $xeNumberInput.computeInpImmediate;
31739
31755
  var value = inputValue === eqEmptyValue(inputValue) ? null : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(inputValue);
31740
31756
  reactData.inputValue = inputValue;
@@ -31744,6 +31760,10 @@ var handleNumberString = function handleNumberString(val) {
31744
31760
  $xeNumberInput.dispatchEvent('input', {
31745
31761
  value: value
31746
31762
  }, evnt);
31763
+ // 自动更新校验状态
31764
+ if ($xeForm && formItemInfo) {
31765
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
31766
+ }
31747
31767
  }
31748
31768
  },
31749
31769
  inputEvent: function inputEvent(evnt) {
@@ -61954,12 +61974,19 @@ var autoTxtElem;
61954
61974
  var $xeTextarea = this;
61955
61975
  var props = $xeTextarea;
61956
61976
  var reactData = $xeTextarea.reactData;
61977
+ var $xeForm = $xeTextarea.$xeForm;
61978
+ var formItemInfo = $xeTextarea.formItemInfo;
61957
61979
  var immediate = props.immediate;
61958
61980
  var textElem = evnt.target;
61959
61981
  var value = textElem.value;
61960
61982
  reactData.inputValue = value;
61961
61983
  if (immediate) {
61962
61984
  $xeTextarea.handleChange(value, evnt);
61985
+ } else {
61986
+ // 自动更新校验状态
61987
+ if ($xeForm && formItemInfo) {
61988
+ $xeForm.triggerItemEvent(evnt, formItemInfo.itemConfig.field, value);
61989
+ }
61963
61990
  }
61964
61991
  $xeTextarea.dispatchEvent('input', {
61965
61992
  value: value
@@ -66065,14 +66092,12 @@ function tree_createReactData() {
66065
66092
  }
66066
66093
  return renderEmptyElement($xeTree);
66067
66094
  },
66068
- renderRadio: function renderRadio(h, node, nodeid, isExistChild, nLevel, isChecked) {
66095
+ renderRadio: function renderRadio(h, node, nodeid, isExistChild, nLevel, isDisabled, isChecked) {
66069
66096
  var $xeTree = this;
66070
66097
  var props = $xeTree;
66071
66098
  var showRadio = props.showRadio;
66072
66099
  var radioOpts = $xeTree.computeRadioOpts;
66073
66100
  var showIcon = radioOpts.showIcon,
66074
- checkMode = radioOpts.checkMode,
66075
- checkMethod = radioOpts.checkMethod,
66076
66101
  visibleMode = radioOpts.visibleMode,
66077
66102
  visibleMethod = radioOpts.visibleMethod;
66078
66103
  var isVisible = visibleMethod ? visibleMethod({
@@ -66080,10 +66105,6 @@ function tree_createReactData() {
66080
66105
  node: node
66081
66106
  }) : tree_handleVisibleOrCheckMode(visibleMode, isExistChild, nLevel);
66082
66107
  if (showRadio && showIcon && isVisible) {
66083
- var isDisabled = checkMethod ? !checkMethod({
66084
- $tree: $xeTree,
66085
- node: node
66086
- }) : !tree_handleVisibleOrCheckMode(checkMode, isExistChild, nLevel);
66087
66108
  return h('div', {
66088
66109
  class: ['vxe-tree--radio-option', {
66089
66110
  'is--checked': isChecked,
@@ -66102,14 +66123,12 @@ function tree_createReactData() {
66102
66123
  }
66103
66124
  return renderEmptyElement($xeTree);
66104
66125
  },
66105
- renderCheckbox: function renderCheckbox(h, node, nodeid, isExistChild, nLevel, isChecked, isIndeterminate) {
66126
+ renderCheckbox: function renderCheckbox(h, node, nodeid, isExistChild, nLevel, isDisabled, isChecked, isIndeterminate) {
66106
66127
  var $xeTree = this;
66107
66128
  var props = $xeTree;
66108
66129
  var showCheckbox = props.showCheckbox;
66109
66130
  var checkboxOpts = $xeTree.computeCheckboxOpts;
66110
66131
  var showIcon = checkboxOpts.showIcon,
66111
- checkMode = checkboxOpts.checkMode,
66112
- checkMethod = checkboxOpts.checkMethod,
66113
66132
  visibleMode = checkboxOpts.visibleMode,
66114
66133
  visibleMethod = checkboxOpts.visibleMethod;
66115
66134
  var isVisible = visibleMethod ? visibleMethod({
@@ -66117,10 +66136,6 @@ function tree_createReactData() {
66117
66136
  node: node
66118
66137
  }) : tree_handleVisibleOrCheckMode(visibleMode, isExistChild, nLevel);
66119
66138
  if (showCheckbox && showIcon && isVisible) {
66120
- var isDisabled = checkMethod ? !checkMethod({
66121
- $tree: $xeTree,
66122
- node: node
66123
- }) : !tree_handleVisibleOrCheckMode(checkMode, isExistChild, nLevel);
66124
66139
  return h('div', {
66125
66140
  class: ['vxe-tree--checkbox-option', {
66126
66141
  'is--checked': isChecked,
@@ -66166,6 +66181,8 @@ function tree_createReactData() {
66166
66181
  treeExpandLazyLoadedMaps = internalData.treeExpandLazyLoadedMaps;
66167
66182
  var tooltipOpts = $xeTree.computeTooltipOpts;
66168
66183
  var tipMode = tooltipOpts.mode;
66184
+ var radioOpts = $xeTree.computeRadioOpts;
66185
+ var checkboxOpts = $xeTree.computeCheckboxOpts;
66169
66186
  var childrenField = $xeTree.computeChildrenField;
66170
66187
  var titleField = $xeTree.computeTitleField;
66171
66188
  var hasChildField = $xeTree.computeHasChildField;
@@ -66179,14 +66196,24 @@ function tree_createReactData() {
66179
66196
  var nodeTitle = getText(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().get(node, titleField));
66180
66197
  var nLevel = nodeItem.level;
66181
66198
  var isRadioChecked = false;
66199
+ var isRadioDisabled = false;
66182
66200
  if (showRadio) {
66183
66201
  isRadioChecked = nodeid === String(selectRadioKey);
66202
+ isRadioDisabled = radioOpts.checkMethod ? !radioOpts.checkMethod({
66203
+ $tree: $xeTree,
66204
+ node: node
66205
+ }) : !tree_handleVisibleOrCheckMode(radioOpts.checkMode, isExistChild, nLevel);
66184
66206
  }
66185
66207
  var isCheckboxChecked = false;
66186
- var isIndeterminate = false;
66208
+ var isCheckboxIndeterminate = false;
66209
+ var isCheckboxDisabled = false;
66187
66210
  if (showCheckbox) {
66188
66211
  isCheckboxChecked = $xeTree.isCheckedByCheckboxNodeId(nodeid);
66189
- isIndeterminate = $xeTree.isIndeterminateByCheckboxNodeid(nodeid);
66212
+ isCheckboxIndeterminate = $xeTree.isIndeterminateByCheckboxNodeid(nodeid);
66213
+ isCheckboxDisabled = checkboxOpts.checkMethod ? !checkboxOpts.checkMethod({
66214
+ $tree: $xeTree,
66215
+ node: node
66216
+ }) : !tree_handleVisibleOrCheckMode(checkboxOpts.checkMode, isExistChild, nLevel);
66190
66217
  }
66191
66218
  var hasLazyChilds = false;
66192
66219
  var isLazyLoading = false;
@@ -66240,9 +66267,11 @@ function tree_createReactData() {
66240
66267
  }, [h('div', {
66241
66268
  class: ['vxe-tree--node-item', {
66242
66269
  'is--current': currentNode && nodeid === $xeTree.getNodeId(currentNode),
66270
+ 'is-radio--disabled': isRadioDisabled,
66243
66271
  'is-radio--checked': isRadioChecked,
66272
+ 'is-checkbox--disabled': isCheckboxDisabled,
66244
66273
  'is-checkbox--checked': isCheckboxChecked,
66245
- 'is-checkbox--indeterminate': isIndeterminate
66274
+ 'is-checkbox--indeterminate': isCheckboxIndeterminate
66246
66275
  }]
66247
66276
  }, [showLine ? h('div', {
66248
66277
  class: 'vxe-tree--node-line-wrapper'
@@ -66262,7 +66291,7 @@ function tree_createReactData() {
66262
66291
  }
66263
66292
  }, iconSlot ? vn_getSlotVNs(iconSlot(nParams)) : [h('i', {
66264
66293
  class: isLazyLoading ? iconLoaded || tree_getIcon().TREE_NODE_LOADED : isExpand ? iconOpen || tree_getIcon().TREE_NODE_OPEN : iconClose || tree_getIcon().TREE_NODE_CLOSE
66265
- })])] : []), $xeTree.renderRadio(h, node, nodeid, isExistChild, nLevel, isRadioChecked), $xeTree.renderCheckbox(h, node, nodeid, isExistChild, nLevel, isCheckboxChecked, isIndeterminate), $xeTree.renderDragIcon(h, node, nodeid), h('div', {
66294
+ })])] : []), $xeTree.renderRadio(h, node, nodeid, isExistChild, nLevel, isRadioDisabled, isRadioChecked), $xeTree.renderCheckbox(h, node, nodeid, isExistChild, nLevel, isCheckboxDisabled, isCheckboxChecked, isCheckboxIndeterminate), $xeTree.renderDragIcon(h, node, nodeid), h('div', {
66266
66295
  class: 'vxe-tree--node-item-inner'
66267
66296
  }, [h('div', {
66268
66297
  class: 'vxe-tree--node-item-wrapper'
@@ -67166,6 +67195,7 @@ function tree_select_createInternalData() {
67166
67195
  var popupOpts = $xeTreeSelect.computePopupOpts;
67167
67196
  var handleStyle = function handleStyle() {
67168
67197
  var ppObj = updatePanelPlacement(targetElem, panelElem, {
67198
+ isMinWidth: !popupOpts.width,
67169
67199
  placement: popupOpts.placement || placement,
67170
67200
  defaultPlacement: popupOpts.defaultPlacement,
67171
67201
  teleportTo: btnTransfer
@@ -67227,8 +67257,16 @@ function tree_select_createInternalData() {
67227
67257
  },
67228
67258
  hideOptionPanel: function hideOptionPanel(evnt) {
67229
67259
  var $xeTreeSelect = this;
67260
+ var props = $xeTreeSelect;
67230
67261
  var reactData = $xeTreeSelect.reactData;
67231
67262
  var internalData = $xeTreeSelect.internalData;
67263
+ var filterable = props.filterable;
67264
+ var filterOpts = $xeTreeSelect.computeFilterOpts;
67265
+ if (filterable) {
67266
+ if (filterOpts.clearOnClose) {
67267
+ reactData.searchValue = '';
67268
+ }
67269
+ }
67232
67270
  reactData.visiblePanel = false;
67233
67271
  internalData.hpTimeout = setTimeout(function () {
67234
67272
  reactData.isAniVisible = false;