vxe-pc-ui 4.15.13 → 4.15.14

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 (218) hide show
  1. package/dist/all.esm.js +708 -139
  2. package/dist/style.css +1 -1
  3. package/dist/style.min.css +1 -1
  4. package/es/button/style.css +11 -0
  5. package/es/button/style.min.css +1 -1
  6. package/es/checkbox/src/button.js +3 -1
  7. package/es/checkbox/src/group.js +6 -1
  8. package/es/checkbox-button/style.css +151 -8
  9. package/es/checkbox-button/style.min.css +1 -1
  10. package/es/icon/style.css +1 -1
  11. package/es/icon-picker/src/icon-picker.js +145 -46
  12. package/es/icon-picker/style.css +29 -5
  13. package/es/icon-picker/style.min.css +1 -1
  14. package/es/language/ar-EG.js +3 -0
  15. package/es/language/de-DE.js +3 -0
  16. package/es/language/en-US.js +3 -0
  17. package/es/language/es-ES.js +3 -0
  18. package/es/language/fr-FR.js +3 -0
  19. package/es/language/hu-HU.js +3 -0
  20. package/es/language/hy-AM.js +3 -0
  21. package/es/language/id-ID.js +3 -0
  22. package/es/language/it-IT.js +3 -0
  23. package/es/language/ja-JP.js +3 -0
  24. package/es/language/ko-KR.js +3 -0
  25. package/es/language/ms-MY.js +3 -0
  26. package/es/language/nb-NO.js +3 -0
  27. package/es/language/pt-BR.js +3 -0
  28. package/es/language/ru-RU.js +3 -0
  29. package/es/language/th-TH.js +3 -0
  30. package/es/language/ug-CN.js +3 -0
  31. package/es/language/uk-UA.js +3 -0
  32. package/es/language/uz-UZ.js +3 -0
  33. package/es/language/vi-VN.js +3 -0
  34. package/es/language/zh-CHT.js +3 -0
  35. package/es/language/zh-CN.js +3 -0
  36. package/es/list/src/list.js +14 -1
  37. package/es/radio/src/button.js +3 -1
  38. package/es/radio/src/group.js +6 -1
  39. package/es/radio-button/style.css +151 -8
  40. package/es/radio-button/style.min.css +1 -1
  41. package/es/style.css +1 -1
  42. package/es/style.min.css +1 -1
  43. package/es/tree/src/tree.js +441 -18
  44. package/es/tree/src/util.js +15 -0
  45. package/es/ui/index.js +5 -2
  46. package/es/ui/src/log.js +1 -1
  47. package/es/vxe-button/style.css +11 -0
  48. package/es/vxe-button/style.min.css +1 -1
  49. package/es/vxe-checkbox-button/style.css +151 -8
  50. package/es/vxe-checkbox-button/style.min.css +1 -1
  51. package/es/vxe-icon-picker/style.css +29 -5
  52. package/es/vxe-icon-picker/style.min.css +1 -1
  53. package/es/vxe-radio-button/style.css +151 -8
  54. package/es/vxe-radio-button/style.min.css +1 -1
  55. package/lib/button/style/style.css +11 -0
  56. package/lib/button/style/style.min.css +1 -1
  57. package/lib/checkbox/src/button.js +3 -1
  58. package/lib/checkbox/src/button.min.js +1 -1
  59. package/lib/checkbox/src/group.js +6 -0
  60. package/lib/checkbox/src/group.min.js +1 -1
  61. package/lib/checkbox-button/style/style.css +151 -8
  62. package/lib/checkbox-button/style/style.min.css +1 -1
  63. package/lib/icon/style/style.css +1 -1
  64. package/lib/icon/style/style.min.css +1 -1
  65. package/lib/icon-picker/src/icon-picker.js +143 -29
  66. package/lib/icon-picker/src/icon-picker.min.js +1 -1
  67. package/lib/icon-picker/style/style.css +29 -5
  68. package/lib/icon-picker/style/style.min.css +1 -1
  69. package/lib/index.umd.js +731 -49
  70. package/lib/index.umd.min.js +1 -1
  71. package/lib/language/ar-EG.js +3 -0
  72. package/lib/language/ar-EG.min.js +1 -1
  73. package/lib/language/ar-EG.umd.js +3 -0
  74. package/lib/language/de-DE.js +3 -0
  75. package/lib/language/de-DE.min.js +1 -1
  76. package/lib/language/de-DE.umd.js +3 -0
  77. package/lib/language/en-US.js +3 -0
  78. package/lib/language/en-US.min.js +1 -1
  79. package/lib/language/en-US.umd.js +3 -0
  80. package/lib/language/es-ES.js +3 -0
  81. package/lib/language/es-ES.min.js +1 -1
  82. package/lib/language/es-ES.umd.js +3 -0
  83. package/lib/language/fr-FR.js +3 -0
  84. package/lib/language/fr-FR.min.js +1 -1
  85. package/lib/language/fr-FR.umd.js +3 -0
  86. package/lib/language/hu-HU.js +3 -0
  87. package/lib/language/hu-HU.min.js +1 -1
  88. package/lib/language/hu-HU.umd.js +3 -0
  89. package/lib/language/hy-AM.js +3 -0
  90. package/lib/language/hy-AM.min.js +1 -1
  91. package/lib/language/hy-AM.umd.js +3 -0
  92. package/lib/language/id-ID.js +3 -0
  93. package/lib/language/id-ID.min.js +1 -1
  94. package/lib/language/id-ID.umd.js +3 -0
  95. package/lib/language/it-IT.js +3 -0
  96. package/lib/language/it-IT.min.js +1 -1
  97. package/lib/language/it-IT.umd.js +3 -0
  98. package/lib/language/ja-JP.js +3 -0
  99. package/lib/language/ja-JP.min.js +1 -1
  100. package/lib/language/ja-JP.umd.js +3 -0
  101. package/lib/language/ko-KR.js +3 -0
  102. package/lib/language/ko-KR.min.js +1 -1
  103. package/lib/language/ko-KR.umd.js +3 -0
  104. package/lib/language/ms-MY.js +3 -0
  105. package/lib/language/ms-MY.min.js +1 -1
  106. package/lib/language/ms-MY.umd.js +3 -0
  107. package/lib/language/nb-NO.js +3 -0
  108. package/lib/language/nb-NO.min.js +1 -1
  109. package/lib/language/nb-NO.umd.js +3 -0
  110. package/lib/language/pt-BR.js +3 -0
  111. package/lib/language/pt-BR.min.js +1 -1
  112. package/lib/language/pt-BR.umd.js +3 -0
  113. package/lib/language/ru-RU.js +3 -0
  114. package/lib/language/ru-RU.min.js +1 -1
  115. package/lib/language/ru-RU.umd.js +3 -0
  116. package/lib/language/th-TH.js +3 -0
  117. package/lib/language/th-TH.min.js +1 -1
  118. package/lib/language/th-TH.umd.js +3 -0
  119. package/lib/language/ug-CN.js +3 -0
  120. package/lib/language/ug-CN.min.js +1 -1
  121. package/lib/language/ug-CN.umd.js +3 -0
  122. package/lib/language/uk-UA.js +3 -0
  123. package/lib/language/uk-UA.min.js +1 -1
  124. package/lib/language/uk-UA.umd.js +3 -0
  125. package/lib/language/uz-UZ.js +3 -0
  126. package/lib/language/uz-UZ.min.js +1 -1
  127. package/lib/language/uz-UZ.umd.js +3 -0
  128. package/lib/language/vi-VN.js +3 -0
  129. package/lib/language/vi-VN.min.js +1 -1
  130. package/lib/language/vi-VN.umd.js +3 -0
  131. package/lib/language/zh-CHT.js +3 -0
  132. package/lib/language/zh-CHT.min.js +1 -1
  133. package/lib/language/zh-CHT.umd.js +3 -0
  134. package/lib/language/zh-CN.js +3 -0
  135. package/lib/language/zh-CN.min.js +1 -1
  136. package/lib/language/zh-CN.umd.js +3 -0
  137. package/lib/list/src/list.js +19 -1
  138. package/lib/list/src/list.min.js +1 -1
  139. package/lib/radio/src/button.js +3 -1
  140. package/lib/radio/src/button.min.js +1 -1
  141. package/lib/radio/src/group.js +7 -1
  142. package/lib/radio/src/group.min.js +1 -1
  143. package/lib/radio-button/style/style.css +151 -8
  144. package/lib/radio-button/style/style.min.css +1 -1
  145. package/lib/style.css +1 -1
  146. package/lib/style.min.css +1 -1
  147. package/lib/tree/src/tree.js +525 -14
  148. package/lib/tree/src/tree.min.js +1 -1
  149. package/lib/tree/src/util.js +16 -0
  150. package/lib/tree/src/util.min.js +1 -1
  151. package/lib/ui/index.js +5 -2
  152. package/lib/ui/index.min.js +1 -1
  153. package/lib/ui/src/log.js +1 -1
  154. package/lib/ui/src/log.min.js +1 -1
  155. package/lib/vxe-button/style/style.css +11 -0
  156. package/lib/vxe-button/style/style.min.css +1 -1
  157. package/lib/vxe-checkbox-button/style/style.css +151 -8
  158. package/lib/vxe-checkbox-button/style/style.min.css +1 -1
  159. package/lib/vxe-icon-picker/style/style.css +29 -5
  160. package/lib/vxe-icon-picker/style/style.min.css +1 -1
  161. package/lib/vxe-radio-button/style/style.css +151 -8
  162. package/lib/vxe-radio-button/style/style.min.css +1 -1
  163. package/package.json +1 -1
  164. package/packages/checkbox/src/button.ts +3 -1
  165. package/packages/checkbox/src/group.ts +6 -1
  166. package/packages/icon-picker/src/icon-picker.ts +157 -48
  167. package/packages/language/ar-EG.ts +3 -0
  168. package/packages/language/de-DE.ts +3 -0
  169. package/packages/language/en-US.ts +3 -0
  170. package/packages/language/es-ES.ts +3 -0
  171. package/packages/language/fr-FR.ts +3 -0
  172. package/packages/language/hu-HU.ts +3 -0
  173. package/packages/language/hy-AM.ts +3 -0
  174. package/packages/language/id-ID.ts +3 -0
  175. package/packages/language/it-IT.ts +3 -0
  176. package/packages/language/ja-JP.ts +3 -0
  177. package/packages/language/ko-KR.ts +3 -0
  178. package/packages/language/ms-MY.ts +3 -0
  179. package/packages/language/nb-NO.ts +3 -0
  180. package/packages/language/pt-BR.ts +3 -0
  181. package/packages/language/ru-RU.ts +3 -0
  182. package/packages/language/th-TH.ts +3 -0
  183. package/packages/language/ug-CN.ts +3 -0
  184. package/packages/language/uk-UA.ts +3 -0
  185. package/packages/language/uz-UZ.ts +3 -0
  186. package/packages/language/vi-VN.ts +3 -0
  187. package/packages/language/zh-CHT.ts +3 -0
  188. package/packages/language/zh-CN.ts +3 -0
  189. package/packages/list/src/list.ts +14 -1
  190. package/packages/radio/src/button.ts +3 -1
  191. package/packages/radio/src/group.ts +6 -1
  192. package/packages/tree/src/tree.ts +443 -14
  193. package/packages/tree/src/util.ts +17 -1
  194. package/packages/ui/index.ts +4 -1
  195. package/styles/components/button.scss +24 -69
  196. package/styles/components/checkbox-button.scss +65 -13
  197. package/styles/components/icon-picker.scss +37 -11
  198. package/styles/components/radio-button.scss +65 -13
  199. package/styles/helpers/themeStatus.scss +58 -0
  200. package/types/all.d.ts +205 -0
  201. package/types/components/checkbox-group.d.ts +3 -1
  202. package/types/components/checkbox.d.ts +1 -1
  203. package/types/components/icon-picker.d.ts +27 -4
  204. package/types/components/list.d.ts +2 -2
  205. package/types/components/radio-group.d.ts +3 -1
  206. package/types/components/tree.d.ts +36 -0
  207. /package/es/icon/{iconfont.1782658269305.ttf → iconfont.1782742200841.ttf} +0 -0
  208. /package/es/icon/{iconfont.1782658269305.woff → iconfont.1782742200841.woff} +0 -0
  209. /package/es/icon/{iconfont.1782658269305.woff2 → iconfont.1782742200841.woff2} +0 -0
  210. /package/es/{iconfont.1782658269305.ttf → iconfont.1782742200841.ttf} +0 -0
  211. /package/es/{iconfont.1782658269305.woff → iconfont.1782742200841.woff} +0 -0
  212. /package/es/{iconfont.1782658269305.woff2 → iconfont.1782742200841.woff2} +0 -0
  213. /package/lib/icon/style/{iconfont.1782658269305.ttf → iconfont.1782742200841.ttf} +0 -0
  214. /package/lib/icon/style/{iconfont.1782658269305.woff → iconfont.1782742200841.woff} +0 -0
  215. /package/lib/icon/style/{iconfont.1782658269305.woff2 → iconfont.1782742200841.woff2} +0 -0
  216. /package/lib/{iconfont.1782658269305.ttf → iconfont.1782742200841.ttf} +0 -0
  217. /package/lib/{iconfont.1782658269305.woff → iconfont.1782742200841.woff} +0 -0
  218. /package/lib/{iconfont.1782658269305.woff2 → iconfont.1782742200841.woff2} +0 -0
package/dist/all.esm.js CHANGED
@@ -81,7 +81,7 @@ function checkDynamic() {
81
81
  }
82
82
 
83
83
  const { log } = VxeUI;
84
- const uiVersion = `ui v${"4.15.13"}`;
84
+ const uiVersion = `ui v${"4.15.14"}`;
85
85
  function createComponentLog(name) {
86
86
  const tableVersion = VxeUI.tableVersion ? `table v${VxeUI.tableVersion}` : '';
87
87
  const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
@@ -92,18 +92,18 @@ function createComponentLog(name) {
92
92
  errLog: log.create('error', versionInfo + '] [' + name)
93
93
  };
94
94
  }
95
- const warnLog$b = log.create('warn', uiVersion);
95
+ const warnLog$c = log.create('warn', uiVersion);
96
96
  log.create('error', uiVersion);
97
97
 
98
- const version = "4.15.13";
98
+ const version = "4.15.14";
99
99
  VxeUI.uiVersion = version;
100
100
  VxeUI.dynamicApp = dynamicApp;
101
101
  function config(options) {
102
- warnLog$b('vxe.error.delFunc', ['config', 'setConfig']);
102
+ warnLog$c('vxe.error.delFunc', ['config', 'setConfig']);
103
103
  return setConfig$1(options);
104
104
  }
105
105
  function setup(options) {
106
- warnLog$b('vxe.error.delFunc', ['setup', 'setConfig']);
106
+ warnLog$c('vxe.error.delFunc', ['setup', 'setConfig']);
107
107
  return setConfig$1(options);
108
108
  }
109
109
  VxeUI.config = config;
@@ -270,7 +270,10 @@ setConfig$1({
270
270
  formView: {},
271
271
  icon: {},
272
272
  iconPicker: {
273
- icons: ['home', 'company', 'comment', 'setting', 'send', 'envelope', 'envelope-open', 'bell', 'search', 'print', 'pc', 'goods', 'chart-line', 'edit', 'delete', 'save', 'folder', 'microphone', 'flag', 'link', 'location', 'sunny', 'rmb', 'usd', 'user', 'add-user', 'add-users', 'star', 'unlock', 'time', 'text', 'feedback', 'calendar', 'association-form', 'cloud-download', 'cloud-upload', 'file', 'subtable', 'chart-bar-x', 'chart-bar-y', 'chart-line', 'chart-pie', 'chart-radar']
273
+ icons: ['home', 'company', 'comment', 'setting', 'send', 'envelope', 'envelope-open', 'bell', 'search', 'print', 'pc', 'goods', 'chart-line', 'edit', 'delete', 'save', 'folder', 'microphone', 'flag', 'link', 'location', 'sunny', 'rmb', 'usd', 'user', 'add-user', 'add-users', 'star', 'unlock', 'time', 'text', 'feedback', 'calendar', 'association-form', 'cloud-download', 'cloud-upload', 'file', 'subtable', 'chart-bar-x', 'chart-bar-y', 'chart-line', 'chart-pie', 'chart-radar'],
274
+ popupConfig: {
275
+ // chunkSize: 4
276
+ }
274
277
  },
275
278
  image: {
276
279
  draggable: null,
@@ -1062,6 +1065,9 @@ var zhCN = {
1062
1065
  fixedRight: '冻结在右侧',
1063
1066
  cancelFixed: '取消冻结列'
1064
1067
  },
1068
+ iconPicker: {
1069
+ search: '搜索'
1070
+ },
1065
1071
  datePicker: {
1066
1072
  yearTitle: '{0} 年'
1067
1073
  },
@@ -3085,7 +3091,7 @@ dynamicApp.use(VxeTooltip);
3085
3091
  VxeUI.component(VxeTooltipComponent);
3086
3092
  const Tooltip = VxeTooltip;
3087
3093
 
3088
- const { warnLog: warnLog$a } = createComponentLog('button');
3094
+ const { warnLog: warnLog$b } = createComponentLog('button');
3089
3095
  const VxeButtonComponent = defineVxeComponent({
3090
3096
  name: 'VxeButton',
3091
3097
  props: {
@@ -3804,7 +3810,7 @@ const VxeButtonComponent = defineVxeComponent({
3804
3810
  $xeButton.renderVN = renderVN;
3805
3811
  onMounted(() => {
3806
3812
  if (props.type === 'text') {
3807
- warnLog$a('vxe.error.delProp', ['type=text', 'mode=text']);
3813
+ warnLog$b('vxe.error.delProp', ['type=text', 'mode=text']);
3808
3814
  }
3809
3815
  globalEvents.on($xeButton, 'mousewheel', handleGlobalMousewheelEvent);
3810
3816
  globalEvents.on($xeButton, 'mousedown', handleGlobalMousedownEvent);
@@ -3832,12 +3838,12 @@ VxeUI.component(VxeButtonComponent);
3832
3838
  const Button = VxeButton;
3833
3839
 
3834
3840
  const { errLog: errLog$h } = createComponentLog('backtop');
3835
- function createInternalData$h() {
3841
+ function createInternalData$i() {
3836
3842
  return {
3837
3843
  targetEl: null
3838
3844
  };
3839
3845
  }
3840
- function createReactData$i() {
3846
+ function createReactData$j() {
3841
3847
  return {
3842
3848
  showBtn: false,
3843
3849
  backtopZindex: 0
@@ -3916,8 +3922,8 @@ var VxeBacktopComponent = defineVxeComponent({
3916
3922
  const xID = XEUtils.uniqueId();
3917
3923
  const refElem = ref();
3918
3924
  const { computeSize } = useSize(props);
3919
- const internalData = createInternalData$h();
3920
- const reactData = reactive(createReactData$i());
3925
+ const internalData = createInternalData$i();
3926
+ const reactData = reactive(createReactData$j());
3921
3927
  const refMaps = {
3922
3928
  refElem
3923
3929
  };
@@ -4094,8 +4100,8 @@ var VxeBacktopComponent = defineVxeComponent({
4094
4100
  });
4095
4101
  onBeforeUnmount(() => {
4096
4102
  removeScrollEvent();
4097
- XEUtils.assign(reactData, createReactData$i());
4098
- XEUtils.assign(internalData, createInternalData$h());
4103
+ XEUtils.assign(reactData, createReactData$j());
4104
+ XEUtils.assign(internalData, createInternalData$i());
4099
4105
  });
4100
4106
  $xeBacktop.renderVN = renderVN;
4101
4107
  return $xeBacktop;
@@ -6808,7 +6814,7 @@ function getRowIdByField(row, keyField) {
6808
6814
  const rowKey = getRowKeyByField(row, keyField);
6809
6815
  return enModelValue(rowKey);
6810
6816
  }
6811
- function createReactData$h() {
6817
+ function createReactData$i() {
6812
6818
  return {
6813
6819
  scrollYLoad: false,
6814
6820
  bodyHeight: 0,
@@ -6828,7 +6834,7 @@ function createReactData$h() {
6828
6834
  dragTipText: ''
6829
6835
  };
6830
6836
  }
6831
- function createInternalData$g() {
6837
+ function createInternalData$h() {
6832
6838
  return {
6833
6839
  resizeObserver: undefined,
6834
6840
  fullData: [],
@@ -6901,8 +6907,8 @@ var VxeListComponent = defineVxeComponent({
6901
6907
  const xID = XEUtils.uniqueId();
6902
6908
  const browseObj = XEUtils.browse();
6903
6909
  const { computeSize } = useSize(props);
6904
- const reactData = reactive(createReactData$h());
6905
- const internalData = createInternalData$g();
6910
+ const reactData = reactive(createReactData$i());
6911
+ const internalData = createInternalData$h();
6906
6912
  const crossListDragRowInfo = getCrossListDragRowInfo();
6907
6913
  const refElem = ref();
6908
6914
  const refHeaderElem = ref();
@@ -7554,10 +7560,15 @@ var VxeListComponent = defineVxeComponent({
7554
7560
  }
7555
7561
  };
7556
7562
  const handleRowClickEvent = (evnt, row) => {
7563
+ const { showRadio, showCheckbox } = props;
7557
7564
  const { currentRow } = internalData;
7565
+ const radioOpts = computeRadioOpts.value;
7566
+ const checkboxOpts = computeCheckboxOpts.value;
7558
7567
  const rowOpts = computeRowOpts.value;
7559
7568
  const { isCurrent } = rowOpts;
7560
7569
  let triggerCurrent = false;
7570
+ let triggerRadio = false;
7571
+ let triggerCheckbox = false;
7561
7572
  if (isCurrent) {
7562
7573
  triggerCurrent = true;
7563
7574
  changeCurrentEvent(evnt, row);
@@ -7566,7 +7577,15 @@ var VxeListComponent = defineVxeComponent({
7566
7577
  internalData.currentRow = null;
7567
7578
  reactData.currRowFlag++;
7568
7579
  }
7569
- dispatchEvent('row-click', { row, triggerCurrent }, evnt);
7580
+ if (showRadio && radioOpts.trigger === 'row') {
7581
+ triggerRadio = true;
7582
+ changeRadioEvent(evnt, row);
7583
+ }
7584
+ if (showCheckbox && checkboxOpts.trigger === 'row') {
7585
+ triggerCheckbox = true;
7586
+ changeCheckboxEvent(evnt, row);
7587
+ }
7588
+ dispatchEvent('row-click', { row, triggerCurrent, triggerRadio, triggerCheckbox }, evnt);
7570
7589
  };
7571
7590
  const handleRowDblclickEvent = (evnt, row) => {
7572
7591
  dispatchEvent('row-dblclick', { row }, evnt);
@@ -8311,8 +8330,8 @@ var VxeListComponent = defineVxeComponent({
8311
8330
  resizeObserver.disconnect();
8312
8331
  }
8313
8332
  globalEvents.off($xeList, 'resize');
8314
- XEUtils.assign(reactData, createReactData$h());
8315
- XEUtils.assign(internalData, createInternalData$g());
8333
+ XEUtils.assign(reactData, createReactData$i());
8334
+ XEUtils.assign(internalData, createInternalData$h());
8316
8335
  });
8317
8336
  $xeList.renderVN = renderVN;
8318
8337
  return $xeList;
@@ -8344,7 +8363,7 @@ function toFloatValueFixed(inputValue, type, digitsValue, roundingMode) {
8344
8363
  }
8345
8364
  }
8346
8365
 
8347
- const { warnLog: warnLog$9 } = createComponentLog('input');
8366
+ const { warnLog: warnLog$a } = createComponentLog('input');
8348
8367
  var VxeInputComponent = defineVxeComponent({
8349
8368
  name: 'VxeInput',
8350
8369
  props: {
@@ -10981,13 +11000,13 @@ var VxeInputComponent = defineVxeComponent({
10981
11000
  onMounted(() => {
10982
11001
  const { type } = props;
10983
11002
  if (['date', 'time', 'datetime', 'week', 'month', 'quarter', 'year'].includes(type)) {
10984
- warnLog$9('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, `<vxe-date-picker type="${type}" ... />`]);
11003
+ warnLog$a('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, `<vxe-date-picker type="${type}" ... />`]);
10985
11004
  }
10986
11005
  else if (['number', 'integer', 'float'].includes(type)) {
10987
- warnLog$9('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, `<vxe-number-input type="${type}" ... />`]);
11006
+ warnLog$a('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, `<vxe-number-input type="${type}" ... />`]);
10988
11007
  }
10989
11008
  else if (['password'].includes(type)) {
10990
- warnLog$9('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, '<vxe-password-input ... />']);
11009
+ warnLog$a('vxe.error.useNew', [`<vxe-input type="${type}" ... />`, '<vxe-password-input ... />']);
10991
11010
  }
10992
11011
  const inputElem = refInputTarget.value;
10993
11012
  if (inputElem) {
@@ -11025,7 +11044,7 @@ var VxeInputComponent = defineVxeComponent({
11025
11044
  function getNodeUniqueId$1() {
11026
11045
  return XEUtils.uniqueId('node_');
11027
11046
  }
11028
- function createReactData$g() {
11047
+ function createReactData$h() {
11029
11048
  return {
11030
11049
  initialized: false,
11031
11050
  searchValue: '',
@@ -11048,7 +11067,7 @@ function createReactData$g() {
11048
11067
  lazyOptFlag: 1
11049
11068
  };
11050
11069
  }
11051
- function createInternalData$f() {
11070
+ function createInternalData$g() {
11052
11071
  return {
11053
11072
  // hpTimeout: undefined,
11054
11073
  listVirtualYOpts: {
@@ -11175,8 +11194,8 @@ var VxeCascaderComponent = defineVxeComponent({
11175
11194
  const refInpSearch = ref();
11176
11195
  const refChunkWrapper = ref();
11177
11196
  const refOptionPanel = ref();
11178
- const reactData = reactive(createReactData$g());
11179
- const internalData = createInternalData$f();
11197
+ const reactData = reactive(createReactData$h());
11198
+ const internalData = createInternalData$g();
11180
11199
  const refMaps = {
11181
11200
  refElem
11182
11201
  };
@@ -12748,7 +12767,7 @@ var VxeCascaderComponent = defineVxeComponent({
12748
12767
  globalEvents.off($xeCascader, 'mousedown');
12749
12768
  globalEvents.off($xeCascader, 'blur');
12750
12769
  globalEvents.off($xeCascader, 'resize');
12751
- XEUtils.assign(internalData, createInternalData$f());
12770
+ XEUtils.assign(internalData, createInternalData$g());
12752
12771
  });
12753
12772
  provide('$xeCascader', $xeCascader);
12754
12773
  $xeCascader.renderVN = renderVN;
@@ -13063,7 +13082,9 @@ var VxeCheckboxButtonComponent = defineVxeComponent({
13063
13082
  onChange: changeEvent
13064
13083
  }),
13065
13084
  h('span', {
13066
- class: 'vxe-checkbox--label'
13085
+ class: ['vxe-checkbox--label', {
13086
+ 'is--disabled': isDisabled
13087
+ }]
13067
13088
  }, slots.default ? slots.default({}) : getFuncText(content))
13068
13089
  ]);
13069
13090
  };
@@ -13081,10 +13102,10 @@ dynamicApp.use(VxeCheckboxButton);
13081
13102
  VxeUI.component(VxeCheckboxButtonComponent);
13082
13103
  const CheckboxButton = VxeCheckboxButton;
13083
13104
 
13084
- function createReactData$f() {
13105
+ function createReactData$g() {
13085
13106
  return {};
13086
13107
  }
13087
- function createInternalData$e() {
13108
+ function createInternalData$f() {
13088
13109
  return {
13089
13110
  // isLoaded: false
13090
13111
  };
@@ -13103,6 +13124,10 @@ var VxeCheckboxGroupComponent = defineVxeComponent({
13103
13124
  type: Boolean,
13104
13125
  default: null
13105
13126
  },
13127
+ status: {
13128
+ type: String,
13129
+ default: () => getConfig$3().checkboxGroup.status
13130
+ },
13106
13131
  max: {
13107
13132
  type: [String, Number],
13108
13133
  default: null
@@ -13123,8 +13148,8 @@ var VxeCheckboxGroupComponent = defineVxeComponent({
13123
13148
  const $xeForm = inject('$xeForm', null);
13124
13149
  const formItemInfo = inject('xeFormItemInfo', null);
13125
13150
  const xID = XEUtils.uniqueId();
13126
- const reactData = reactive(createReactData$f());
13127
- const internalData = createInternalData$e();
13151
+ const reactData = reactive(createReactData$g());
13152
+ const internalData = createInternalData$f();
13128
13153
  const computeIsReadonly = computed(() => {
13129
13154
  const { readonly } = props;
13130
13155
  if (readonly === null) {
@@ -13246,7 +13271,7 @@ var VxeCheckboxGroupComponent = defineVxeComponent({
13246
13271
  };
13247
13272
  Object.assign($xeCheckboxGroup, checkboxGroupMethods, checkboxGroupPrivateMethods);
13248
13273
  const renderVN = () => {
13249
- const { options } = props;
13274
+ const { status, options } = props;
13250
13275
  const defaultSlot = slots.default;
13251
13276
  const valueField = computeValueField.value;
13252
13277
  const labelField = computeLabelField.value;
@@ -13255,6 +13280,7 @@ var VxeCheckboxGroupComponent = defineVxeComponent({
13255
13280
  const isDisabled = computeIsDisabled.value;
13256
13281
  return h('div', {
13257
13282
  class: ['vxe-checkbox-group', {
13283
+ [`theme--${status}`]: status,
13258
13284
  'is--readonly': isReadonly,
13259
13285
  'is--disabled': isDisabled
13260
13286
  }]
@@ -13283,8 +13309,8 @@ var VxeCheckboxGroupComponent = defineVxeComponent({
13283
13309
  });
13284
13310
  });
13285
13311
  onUnmounted(() => {
13286
- XEUtils.assign(reactData, createReactData$f());
13287
- XEUtils.assign(internalData, createInternalData$e());
13312
+ XEUtils.assign(reactData, createReactData$g());
13313
+ XEUtils.assign(internalData, createInternalData$f());
13288
13314
  });
13289
13315
  provide('$xeCheckboxGroup', $xeCheckboxGroup);
13290
13316
  $xeCheckboxGroup.renderVN = renderVN;
@@ -13417,7 +13443,7 @@ dynamicApp.use(VxeCol);
13417
13443
  VxeUI.component(VxeColComponent);
13418
13444
  const Col = VxeCol;
13419
13445
 
13420
- function createReactData$e() {
13446
+ function createReactData$f() {
13421
13447
  return {
13422
13448
  staticPanes: [],
13423
13449
  cachePaneMaps: {},
@@ -13425,7 +13451,7 @@ function createReactData$e() {
13425
13451
  openKeyFlag: 0
13426
13452
  };
13427
13453
  }
13428
- function createInternalData$d() {
13454
+ function createInternalData$e() {
13429
13455
  return {
13430
13456
  // esTime: null,
13431
13457
  activeKeyMaps: {},
@@ -13462,8 +13488,8 @@ var VxeCollapseComponent = defineVxeComponent({
13462
13488
  const xID = XEUtils.uniqueId();
13463
13489
  const { computeSize } = useSize(props);
13464
13490
  const refElem = ref();
13465
- const reactData = reactive(createReactData$e());
13466
- const internalData = createInternalData$d();
13491
+ const reactData = reactive(createReactData$f());
13492
+ const internalData = createInternalData$e();
13467
13493
  const refMaps = {
13468
13494
  refElem
13469
13495
  };
@@ -13742,8 +13768,8 @@ var VxeCollapseComponent = defineVxeComponent({
13742
13768
  if (esTime) {
13743
13769
  clearTimeout(esTime);
13744
13770
  }
13745
- XEUtils.assign(reactData, createReactData$e());
13746
- XEUtils.assign(internalData, createInternalData$d());
13771
+ XEUtils.assign(reactData, createReactData$f());
13772
+ XEUtils.assign(internalData, createInternalData$e());
13747
13773
  });
13748
13774
  provide('$xeCollapse', $xeCollapse);
13749
13775
  $xeCollapse.renderVN = renderVN;
@@ -16119,12 +16145,12 @@ dynamicApp.use(VxeColorPicker);
16119
16145
  VxeUI.component(VxeColorPickerComponent);
16120
16146
  const ColorPicker = VxeColorPicker;
16121
16147
 
16122
- function createInternalData$c() {
16148
+ function createInternalData$d() {
16123
16149
  return {
16124
16150
  // leaveTime: null
16125
16151
  };
16126
16152
  }
16127
- function createReactData$d() {
16153
+ function createReactData$e() {
16128
16154
  return {
16129
16155
  visible: false,
16130
16156
  activeOption: null,
@@ -16179,8 +16205,8 @@ var VxeContextMenuComponent = defineVxeComponent({
16179
16205
  const xID = XEUtils.uniqueId();
16180
16206
  const refElem = ref();
16181
16207
  const { computeSize } = useSize(props);
16182
- const internalData = createInternalData$c();
16183
- const reactData = reactive(createReactData$d());
16208
+ const internalData = createInternalData$d();
16209
+ const reactData = reactive(createReactData$e());
16184
16210
  const refMaps = {
16185
16211
  refElem
16186
16212
  };
@@ -16735,8 +16761,8 @@ var VxeContextMenuComponent = defineVxeComponent({
16735
16761
  globalEvents.off($xeContextMenu, 'keydown');
16736
16762
  globalEvents.off($xeContextMenu, 'mousedown');
16737
16763
  globalEvents.off($xeContextMenu, 'blur');
16738
- XEUtils.assign(reactData, createReactData$d());
16739
- XEUtils.assign(internalData, createInternalData$c());
16764
+ XEUtils.assign(reactData, createReactData$e());
16765
+ XEUtils.assign(internalData, createInternalData$d());
16740
16766
  });
16741
16767
  $xeContextMenu.renderVN = renderVN;
16742
16768
  return $xeContextMenu;
@@ -19002,7 +19028,7 @@ dynamicApp.use(VxeDatePanel);
19002
19028
  VxeUI.component(VxeDatePanelComponent);
19003
19029
  const DatePanel = VxeDatePanel;
19004
19030
 
19005
- const { warnLog: warnLog$8, errLog: errLog$e } = createComponentLog('date-picker');
19031
+ const { warnLog: warnLog$9, errLog: errLog$e } = createComponentLog('date-picker');
19006
19032
  const defaultMaskPlaceholder = '*';
19007
19033
  const maskedTypes = ['year', 'month', 'date', 'datetime', 'time'];
19008
19034
  const inputMaskedKeys = ['y', 'M', 'd', 'H', 'm', 'n', 's'];
@@ -19010,7 +19036,7 @@ const parseInputKayMaps = {};
19010
19036
  inputMaskedKeys.forEach(key => {
19011
19037
  parseInputKayMaps[key] = true;
19012
19038
  });
19013
- function createReactData$c() {
19039
+ function createReactData$d() {
19014
19040
  return {
19015
19041
  initialized: false,
19016
19042
  panelIndex: 0,
@@ -19023,7 +19049,7 @@ function createReactData$c() {
19023
19049
  labelFlag: 0
19024
19050
  };
19025
19051
  }
19026
- function createInternalData$b() {
19052
+ function createInternalData$c() {
19027
19053
  return {
19028
19054
  // hpTimeout: undefined,
19029
19055
  // fsTimeout: undefined,
@@ -19163,8 +19189,8 @@ var VxeDatePickerComponent = defineVxeComponent({
19163
19189
  const formItemInfo = inject('xeFormItemInfo', null);
19164
19190
  const xID = XEUtils.uniqueId();
19165
19191
  const { computeSize } = useSize(props);
19166
- const reactData = reactive(createReactData$c());
19167
- const internalData = createInternalData$b();
19192
+ const reactData = reactive(createReactData$d());
19193
+ const internalData = createInternalData$c();
19168
19194
  const refElem = ref();
19169
19195
  const refInputTarget = ref();
19170
19196
  const refInputPanel = ref();
@@ -20580,7 +20606,7 @@ var VxeDatePickerComponent = defineVxeComponent({
20580
20606
  errLog$e('vxe.error.notSupportProp', ['multiple', 'control-config.enabled=true', 'control-config.enabled=false']);
20581
20607
  }
20582
20608
  if (!maskedTypes.includes(type)) {
20583
- warnLog$8('vxe.error.notSupportProp', ['control-config.enabled=true', `type=${type}`, `type=${maskedTypes.join('|')}`]);
20609
+ warnLog$9('vxe.error.notSupportProp', ['control-config.enabled=true', `type=${type}`, `type=${maskedTypes.join('|')}`]);
20584
20610
  }
20585
20611
  }
20586
20612
  });
@@ -23954,7 +23980,7 @@ renderer.mixin({
23954
23980
  // 以上已废弃
23955
23981
  });
23956
23982
 
23957
- const { warnLog: warnLog$7, errLog: errLog$a } = createComponentLog('form');
23983
+ const { warnLog: warnLog$8, errLog: errLog$a } = createComponentLog('form');
23958
23984
  class Rule {
23959
23985
  constructor(rule) {
23960
23986
  Object.assign(this, {
@@ -24075,7 +24101,7 @@ function checkRuleStatus(rule, data, val) {
24075
24101
  }
24076
24102
  return true;
24077
24103
  }
24078
- function createReactData$b() {
24104
+ function createReactData$c() {
24079
24105
  return {
24080
24106
  collapseAll: false,
24081
24107
  staticItems: [],
@@ -24083,7 +24109,7 @@ function createReactData$b() {
24083
24109
  itemWidth: 0
24084
24110
  };
24085
24111
  }
24086
- function createInternalData$a() {
24112
+ function createInternalData$b() {
24087
24113
  return {
24088
24114
  meTimeout: undefined,
24089
24115
  stTimeout: undefined,
@@ -24192,8 +24218,8 @@ var VxeFormComponent = defineVxeComponent({
24192
24218
  const $xeGrid = inject('$xeGrid', null);
24193
24219
  const xID = XEUtils.uniqueId();
24194
24220
  const { computeSize } = useSize(props);
24195
- const reactData = reactive(createReactData$b());
24196
- const internalData = createInternalData$a();
24221
+ const reactData = reactive(createReactData$c());
24222
+ const internalData = createInternalData$b();
24197
24223
  const refElem = ref();
24198
24224
  const refTooltip = ref();
24199
24225
  let formMethods = {};
@@ -24486,7 +24512,7 @@ var VxeFormComponent = defineVxeComponent({
24486
24512
  customValid = validatorMethod(validParams);
24487
24513
  }
24488
24514
  else {
24489
- warnLog$7('vxe.error.notValidators', [validator]);
24515
+ warnLog$8('vxe.error.notValidators', [validator]);
24490
24516
  }
24491
24517
  }
24492
24518
  else {
@@ -24887,7 +24913,7 @@ var VxeFormComponent = defineVxeComponent({
24887
24913
  });
24888
24914
  onUnmounted(() => {
24889
24915
  globalEvents.off($xeForm, 'resize');
24890
- XEUtils.assign(internalData, createInternalData$a());
24916
+ XEUtils.assign(internalData, createInternalData$b());
24891
24917
  });
24892
24918
  reactData.collapseAll = !!props.collapseStatus;
24893
24919
  if (props.items) {
@@ -25023,6 +25049,26 @@ dynamicApp.use(VxeIcon);
25023
25049
  VxeUI.component(VxeIconComponent);
25024
25050
  const Icon = VxeIcon;
25025
25051
 
25052
+ function createReactData$b() {
25053
+ return {
25054
+ initialized: false,
25055
+ selectIcon: '',
25056
+ panelIndex: 0,
25057
+ panelStyle: {},
25058
+ panelPlacement: null,
25059
+ visiblePanel: false,
25060
+ isAniVisible: false,
25061
+ isActivated: false,
25062
+ searchValue: '',
25063
+ iconGroups: []
25064
+ };
25065
+ }
25066
+ function createInternalData$a() {
25067
+ return {
25068
+ fullList: []
25069
+ // hpTimeout: undefined
25070
+ };
25071
+ }
25026
25072
  var VxeIconPickerComponent = defineVxeComponent({
25027
25073
  name: 'VxeIconPicker',
25028
25074
  props: {
@@ -25051,6 +25097,11 @@ var VxeIconPickerComponent = defineVxeComponent({
25051
25097
  type: Boolean,
25052
25098
  default: null
25053
25099
  },
25100
+ filterable: {
25101
+ type: Boolean,
25102
+ default: () => getConfig$3().iconPicker.filterable
25103
+ },
25104
+ filterConfig: Object,
25054
25105
  icons: Array,
25055
25106
  placement: String,
25056
25107
  popupConfig: Object,
@@ -25074,22 +25125,12 @@ var VxeIconPickerComponent = defineVxeComponent({
25074
25125
  const formItemInfo = inject('xeFormItemInfo', null);
25075
25126
  const xID = XEUtils.uniqueId();
25076
25127
  const { computeSize } = useSize(props);
25077
- const reactData = reactive({
25078
- initialized: false,
25079
- selectIcon: `${props.modelValue || ''}`,
25080
- panelIndex: 0,
25081
- panelStyle: {},
25082
- panelPlacement: null,
25083
- visiblePanel: false,
25084
- isAniVisible: false,
25085
- isActivated: false
25086
- });
25087
- const internalData = {
25088
- // hpTimeout: undefined
25089
- };
25128
+ const reactData = reactive(createReactData$b());
25129
+ const internalData = createInternalData$a();
25090
25130
  const refElem = ref();
25091
25131
  const refInput = ref();
25092
25132
  const refOptionPanel = ref();
25133
+ const refInpSearch = ref();
25093
25134
  const refMaps = {
25094
25135
  refElem
25095
25136
  };
@@ -25149,6 +25190,20 @@ var VxeIconPickerComponent = defineVxeComponent({
25149
25190
  }
25150
25191
  return getI18n$2('vxe.base.pleaseSelect');
25151
25192
  });
25193
+ const computePanelStyle = computed(() => {
25194
+ const popupOpts = computePopupOpts.value;
25195
+ const { chunkSize, height, maxHeight } = popupOpts;
25196
+ const stys = {
25197
+ '--vxe-ui-icon-picker-item-width': `${100 / (chunkSize || 4)}%`
25198
+ };
25199
+ if (height) {
25200
+ stys['--vxe-ui-icon-picker-panel-height'] = toCssUnit(height);
25201
+ }
25202
+ else if (maxHeight) {
25203
+ stys['--vxe-ui-icon-picker-panel-max-height'] = toCssUnit(maxHeight);
25204
+ }
25205
+ return stys;
25206
+ });
25152
25207
  const computeIconList = computed(() => {
25153
25208
  let { icons } = props;
25154
25209
  if (!icons || !icons.length) {
@@ -25168,13 +25223,12 @@ var VxeIconPickerComponent = defineVxeComponent({
25168
25223
  };
25169
25224
  });
25170
25225
  });
25226
+ const computeFilterOpts = computed(() => {
25227
+ return Object.assign({}, getConfig$3().iconPicker.filterConfig, props.filterConfig);
25228
+ });
25171
25229
  const computePopupOpts = computed(() => {
25172
25230
  return Object.assign({}, getConfig$3().iconPicker.popupConfig, props.popupConfig);
25173
25231
  });
25174
- const computeIconGroupList = computed(() => {
25175
- const iconList = computeIconList.value;
25176
- return XEUtils.chunk(iconList, 4);
25177
- });
25178
25232
  const computeSelectIconItem = computed(() => {
25179
25233
  const { selectIcon } = reactData;
25180
25234
  const iconList = computeIconList.value;
@@ -25192,6 +25246,7 @@ var VxeIconPickerComponent = defineVxeComponent({
25192
25246
  const panelElem = refOptionPanel.value;
25193
25247
  const btnTransfer = computeBtnTransfer.value;
25194
25248
  const popupOpts = computePopupOpts.value;
25249
+ const { width } = popupOpts;
25195
25250
  const handleStyle = () => {
25196
25251
  const ppObj = updatePanelPlacement(targetElem, panelElem, {
25197
25252
  placement: popupOpts.placement || placement,
@@ -25201,6 +25256,12 @@ var VxeIconPickerComponent = defineVxeComponent({
25201
25256
  const panelStyle = Object.assign(ppObj.style, {
25202
25257
  zIndex: panelIndex
25203
25258
  });
25259
+ if (width) {
25260
+ Object.assign(panelStyle, {
25261
+ width: toCssUnit(width),
25262
+ minWidth: undefined
25263
+ });
25264
+ }
25204
25265
  reactData.panelStyle = panelStyle;
25205
25266
  reactData.panelPlacement = ppObj.placement;
25206
25267
  };
@@ -25234,6 +25295,26 @@ var VxeIconPickerComponent = defineVxeComponent({
25234
25295
  reactData.isAniVisible = false;
25235
25296
  }, 350);
25236
25297
  };
25298
+ const handleData = () => {
25299
+ const { modelValue } = props;
25300
+ const { searchValue } = reactData;
25301
+ const filterOpts = computeFilterOpts.value;
25302
+ const { filterMethod } = filterOpts;
25303
+ const popupOpts = computePopupOpts.value;
25304
+ const { chunkSize } = popupOpts;
25305
+ const iconList = computeIconList.value;
25306
+ let visibleList = iconList;
25307
+ if (searchValue) {
25308
+ const searchTxt = `${searchValue}`.toLowerCase();
25309
+ visibleList = iconList.filter(item => {
25310
+ if (filterMethod) {
25311
+ return filterMethod({ option: item, value: modelValue, searchValue: searchTxt, $iconPicker: $xeIconPicker });
25312
+ }
25313
+ return (item.title && `${item.title}`.toLowerCase().indexOf(searchTxt) > -1) || (item.icon && `${item.icon}`.indexOf(searchTxt) > -1);
25314
+ });
25315
+ }
25316
+ reactData.iconGroups = XEUtils.chunk(visibleList, chunkSize || 4);
25317
+ };
25237
25318
  const changeEvent = (evnt, selectValue) => {
25238
25319
  reactData.selectIcon = selectValue;
25239
25320
  if (selectValue !== props.modelValue) {
@@ -25418,45 +25499,58 @@ var VxeIconPickerComponent = defineVxeComponent({
25418
25499
  changeEvent(evnt, value);
25419
25500
  hideOptionPanel();
25420
25501
  };
25502
+ const modelSearchEvent = (value) => {
25503
+ reactData.searchValue = value;
25504
+ };
25505
+ const focusSearchEvent = () => {
25506
+ reactData.isActivated = true;
25507
+ };
25508
+ const handleSearchEvent = () => {
25509
+ handleData();
25510
+ };
25511
+ const triggerSearchEvent = XEUtils.debounce(handleSearchEvent, 350, { trailing: true });
25421
25512
  Object.assign($xeIconPicker, iconPickerMethods);
25422
25513
  const renderIconWrapper = () => {
25423
25514
  const { showIconTitle } = props;
25424
- const { selectIcon } = reactData;
25425
- const iconGroupList = computeIconGroupList.value;
25426
- const isDisabled = computeIsDisabled.value;
25515
+ const { selectIcon, iconGroups } = reactData;
25427
25516
  return h('div', {
25428
25517
  class: 'vxe-ico-picker--list-wrapper'
25429
- }, iconGroupList.map(list => {
25518
+ }, iconGroups.map(list => {
25430
25519
  return h('div', {
25431
25520
  class: 'vxe-ico-picker--list'
25432
25521
  }, list.map(item => {
25433
25522
  const { iconRender } = item;
25434
25523
  const compConf = iconRender ? renderer.get(iconRender.name) : null;
25435
- const oIconMethod = compConf ? compConf.renderIconPickerOptionIcon : null;
25524
+ const iconMethod = compConf ? compConf.renderIconPickerOptionIcon : null;
25436
25525
  return h('div', {
25437
25526
  class: ['vxe-ico-picker--item', {
25438
25527
  'is--selected': selectIcon === item.icon
25439
- }],
25440
- onClick(evnt) {
25441
- if (!isDisabled) {
25442
- handleClickIconEvent(evnt, item);
25443
- }
25444
- }
25528
+ }]
25445
25529
  }, [
25446
25530
  h('div', {
25447
- class: 'vxe-ico-picker--item-icon'
25448
- }, oIconMethod && iconRender
25449
- ? getSlotVNs(oIconMethod(iconRender, { $iconPicker: $xeIconPicker, option: item }))
25450
- : [
25451
- h('i', {
25452
- class: item.icon || ''
25453
- })
25454
- ]),
25455
- showIconTitle
25456
- ? h('div', {
25457
- class: 'vxe-ico-picker--item-title'
25458
- }, `${item.title || ''}`)
25459
- : renderEmptyElement($xeIconPicker)
25531
+ class: 'vxe-ico-picker--item-inner',
25532
+ onClick(evnt) {
25533
+ const isDisabled = computeIsDisabled.value;
25534
+ if (!isDisabled) {
25535
+ handleClickIconEvent(evnt, item);
25536
+ }
25537
+ }
25538
+ }, [
25539
+ h('div', {
25540
+ class: 'vxe-ico-picker--item-icon'
25541
+ }, iconMethod && iconRender
25542
+ ? getSlotVNs(iconMethod(iconRender, { $iconPicker: $xeIconPicker, option: item }))
25543
+ : [
25544
+ h('i', {
25545
+ class: item.icon || ''
25546
+ })
25547
+ ]),
25548
+ showIconTitle
25549
+ ? h('div', {
25550
+ class: 'vxe-ico-picker--item-title'
25551
+ }, `${item.title || ''}`)
25552
+ : renderEmptyElement($xeIconPicker)
25553
+ ])
25460
25554
  ]);
25461
25555
  }));
25462
25556
  }));
@@ -25485,13 +25579,14 @@ var VxeIconPickerComponent = defineVxeComponent({
25485
25579
  ]);
25486
25580
  };
25487
25581
  const renderVN = () => {
25488
- const { className, clearable } = props;
25582
+ const { className, clearable, filterable } = props;
25489
25583
  const { initialized, isActivated, isAniVisible, visiblePanel, selectIcon } = reactData;
25490
25584
  const vSize = computeSize.value;
25491
25585
  const isDisabled = computeIsDisabled.value;
25492
25586
  const btnTransfer = computeBtnTransfer.value;
25493
25587
  const formReadonly = computeFormReadonly.value;
25494
25588
  const inpPlaceholder = computeInpPlaceholder.value;
25589
+ const panelStyle = computePanelStyle.value;
25495
25590
  const popupOpts = computePopupOpts.value;
25496
25591
  const ppClassName = popupOpts.className || props.popupClassName;
25497
25592
  if (formReadonly) {
@@ -25566,8 +25661,30 @@ var VxeIconPickerComponent = defineVxeComponent({
25566
25661
  }, [
25567
25662
  initialized && (visiblePanel || isAniVisible)
25568
25663
  ? h('div', {
25569
- class: 'vxe-ico-picker--panel-wrapper'
25664
+ class: 'vxe-ico-picker--panel-wrapper',
25665
+ style: panelStyle
25570
25666
  }, [
25667
+ filterable
25668
+ ? h('div', {
25669
+ class: 'vxe-ico-picker--panel-search'
25670
+ }, [
25671
+ h(VxeInputComponent, {
25672
+ ref: refInpSearch,
25673
+ class: 'vxe-ico-picker-search--input',
25674
+ modelValue: reactData.searchValue,
25675
+ type: 'text',
25676
+ clearable: true,
25677
+ disabled: false,
25678
+ readonly: false,
25679
+ placeholder: getI18n$2('vxe.iconPicker.search'),
25680
+ prefixIcon: getIcon$2().INPUT_SEARCH,
25681
+ 'onUpdate:modelValue': modelSearchEvent,
25682
+ onFocus: focusSearchEvent,
25683
+ onChange: triggerSearchEvent,
25684
+ onSearch: triggerSearchEvent
25685
+ })
25686
+ ])
25687
+ : renderEmptyElement($xeIconPicker),
25571
25688
  renderIconWrapper()
25572
25689
  ])
25573
25690
  : renderEmptyElement($xeIconPicker)
@@ -25575,20 +25692,27 @@ var VxeIconPickerComponent = defineVxeComponent({
25575
25692
  ])
25576
25693
  ]);
25577
25694
  };
25695
+ reactData.selectIcon = `${props.modelValue || ''}`;
25696
+ handleData();
25578
25697
  watch(() => props.modelValue, (val) => {
25579
25698
  reactData.selectIcon = `${val || ''}`;
25580
25699
  });
25700
+ watch(computeIconList, () => {
25701
+ handleData();
25702
+ });
25581
25703
  onMounted(() => {
25582
25704
  globalEvents.on($xeIconPicker, 'mousewheel', handleGlobalMousewheelEvent);
25583
25705
  globalEvents.on($xeIconPicker, 'mousedown', handleGlobalMousedownEvent);
25584
25706
  globalEvents.on($xeIconPicker, 'keydown', handleGlobalKeydownEvent);
25585
25707
  globalEvents.on($xeIconPicker, 'blur', handleGlobalBlurEvent);
25586
25708
  });
25587
- onUnmounted(() => {
25709
+ onBeforeUnmount(() => {
25588
25710
  globalEvents.off($xeIconPicker, 'mousewheel');
25589
25711
  globalEvents.off($xeIconPicker, 'mousedown');
25590
25712
  globalEvents.off($xeIconPicker, 'keydown');
25591
25713
  globalEvents.off($xeIconPicker, 'blur');
25714
+ XEUtils.assign(reactData, createReactData$b());
25715
+ XEUtils.assign(internalData, createInternalData$a());
25592
25716
  });
25593
25717
  provide('$xeIconPicker', $xeIconPicker);
25594
25718
  $xeIconPicker.renderVN = renderVN;
@@ -27807,7 +27931,7 @@ dynamicApp.use(VxeMenu);
27807
27931
  VxeUI.component(VxeMenuComponent);
27808
27932
  const Menu = VxeMenu;
27809
27933
 
27810
- const { warnLog: warnLog$6, errLog: errLog$8 } = createComponentLog('modal');
27934
+ const { warnLog: warnLog$7, errLog: errLog$8 } = createComponentLog('modal');
27811
27935
  const allActiveModals = [];
27812
27936
  const msgQueue = [];
27813
27937
  const notifyQueue = [];
@@ -29194,7 +29318,7 @@ var VxeModalComponent = defineVxeComponent({
29194
29318
  });
29195
29319
  onMounted(() => {
29196
29320
  if (props.type === 'modal' && props.showFooter && !(props.showConfirmButton || props.showCancelButton || slots.footer)) {
29197
- warnLog$6('vxe.modal.footPropErr');
29321
+ warnLog$7('vxe.modal.footPropErr');
29198
29322
  }
29199
29323
  reactData.initialized = !!props.preload;
29200
29324
  nextTick(() => {
@@ -31388,7 +31512,7 @@ var VxeSelectComponent = defineVxeComponent({
31388
31512
  }
31389
31513
  });
31390
31514
 
31391
- const { warnLog: warnLog$5, errLog: errLog$6 } = createComponentLog('pager');
31515
+ const { warnLog: warnLog$6, errLog: errLog$6 } = createComponentLog('pager');
31392
31516
  var VxePagerComponent = defineVxeComponent({
31393
31517
  name: 'VxePager',
31394
31518
  props: {
@@ -31990,7 +32114,7 @@ var VxePagerComponent = defineVxeComponent({
31990
32114
  * @deprecated
31991
32115
  */
31992
32116
  jumpPage(currentPage) {
31993
- warnLog$5('vxe.error.delFunc', ['jumpPage', 'setCurrentPage']);
32117
+ warnLog$6('vxe.error.delFunc', ['jumpPage', 'setCurrentPage']);
31994
32118
  return $xePager.setCurrentPage(currentPage);
31995
32119
  }
31996
32120
  };
@@ -32587,7 +32711,7 @@ function handlePrint(opts, printHtml = '') {
32587
32711
  if (styleUrls && styleUrls.length) {
32588
32712
  styleUrls.forEach(url => {
32589
32713
  if (!/.css$/.test(url)) {
32590
- warnLog$b('vxe.error.errProp', [url, `${url}.css`]);
32714
+ warnLog$c('vxe.error.errProp', [url, `${url}.css`]);
32591
32715
  }
32592
32716
  });
32593
32717
  }
@@ -33798,7 +33922,9 @@ var VxeRadioButtonComponent = defineVxeComponent({
33798
33922
  onClick: clickEvent
33799
33923
  }),
33800
33924
  h('span', {
33801
- class: 'vxe-radio--label'
33925
+ class: ['vxe-radio--label', {
33926
+ 'is--disabled': isDisabled
33927
+ }]
33802
33928
  }, defaultSlot ? defaultSlot({}) : getFuncText(content))
33803
33929
  ]);
33804
33930
  };
@@ -33837,6 +33963,10 @@ var VxeRadioGroupComponent = defineVxeComponent({
33837
33963
  default: null
33838
33964
  },
33839
33965
  type: String,
33966
+ status: {
33967
+ type: String,
33968
+ default: () => getConfig$3().radioGroup.status
33969
+ },
33840
33970
  options: Array,
33841
33971
  optionProps: Object,
33842
33972
  strict: {
@@ -33961,7 +34091,7 @@ var VxeRadioGroupComponent = defineVxeComponent({
33961
34091
  };
33962
34092
  Object.assign($xeRadioGroup, radioGroupMethods, radioGroupPrivateMethods);
33963
34093
  const renderVN = () => {
33964
- const { options, type } = props;
34094
+ const { options, type, status } = props;
33965
34095
  const vSize = computeSize.value;
33966
34096
  const defaultSlot = slots.default;
33967
34097
  const valueField = computeValueField.value;
@@ -33970,6 +34100,7 @@ var VxeRadioGroupComponent = defineVxeComponent({
33970
34100
  const btnComp = type === 'button' ? VxeRadioButtonComponent : VxeRadioComponent;
33971
34101
  return h('div', {
33972
34102
  class: ['vxe-radio-group', {
34103
+ [`theme--${status}`]: status,
33973
34104
  [`size--${vSize}`]: vSize
33974
34105
  }]
33975
34106
  }, defaultSlot
@@ -34625,7 +34756,7 @@ dynamicApp.use(VxeSelect);
34625
34756
  VxeUI.component(VxeSelectComponent);
34626
34757
  const Select = VxeSelect;
34627
34758
 
34628
- const { warnLog: warnLog$4, errLog: errLog$5 } = createComponentLog('splitter');
34759
+ const { warnLog: warnLog$5, errLog: errLog$5 } = createComponentLog('splitter');
34629
34760
  var VxeSplitComponent = defineVxeComponent({
34630
34761
  name: 'VxeSplitter',
34631
34762
  props: {
@@ -34825,7 +34956,7 @@ var VxeSplitComponent = defineVxeComponent({
34825
34956
  };
34826
34957
  reactData.itemList = list.map(item => {
34827
34958
  if (item.showAction) {
34828
- warnLog$4('vxe.error.removeProp', ['show-action']);
34959
+ warnLog$5('vxe.error.removeProp', ['show-action']);
34829
34960
  }
34830
34961
  if (item.slots) {
34831
34962
  XEUtils.each(item.slots, (func) => {
@@ -35538,7 +35669,7 @@ var VxeSplitComponent = defineVxeComponent({
35538
35669
  }
35539
35670
  reactData.itemList.forEach(item => {
35540
35671
  if (item.showAction) {
35541
- warnLog$4('vxe.error.removeProp', ['showAction']);
35672
+ warnLog$5('vxe.error.removeProp', ['showAction']);
35542
35673
  }
35543
35674
  });
35544
35675
  recalculate();
@@ -37202,7 +37333,7 @@ dynamicApp.use(VxeTableTransfer);
37202
37333
  VxeUI.component(VxeTableTransferComponent);
37203
37334
  const TableTransfer = VxeTableTransfer;
37204
37335
 
37205
- const { warnLog: warnLog$3, errLog: errLog$3 } = createComponentLog('tabs');
37336
+ const { warnLog: warnLog$4, errLog: errLog$3 } = createComponentLog('tabs');
37206
37337
  const scrollbarOffsetSize = 20;
37207
37338
  var VxeTabsComponent = defineVxeComponent({
37208
37339
  name: 'VxeTabs',
@@ -37739,11 +37870,11 @@ var VxeTabsComponent = defineVxeComponent({
37739
37870
  return handlePrevNext(true);
37740
37871
  },
37741
37872
  prevTab() {
37742
- warnLog$3('vxe.error.delFunc', ['prevTab', 'prev']);
37873
+ warnLog$4('vxe.error.delFunc', ['prevTab', 'prev']);
37743
37874
  return tabsMethods.prev();
37744
37875
  },
37745
37876
  nextTab() {
37746
- warnLog$3('vxe.error.delFunc', ['nextTab', 'next']);
37877
+ warnLog$4('vxe.error.delFunc', ['nextTab', 'next']);
37747
37878
  return tabsMethods.next();
37748
37879
  }
37749
37880
  };
@@ -38511,7 +38642,7 @@ dynamicApp.use(VxeText);
38511
38642
  VxeUI.component(VxeTextComponent);
38512
38643
  const Text = VxeText;
38513
38644
 
38514
- const { warnLog: warnLog$2 } = createComponentLog('textarea');
38645
+ const { warnLog: warnLog$3 } = createComponentLog('textarea');
38515
38646
  let autoTxtElem;
38516
38647
  var VxeTextareaComponent = defineVxeComponent({
38517
38648
  name: 'VxeTextarea',
@@ -38876,7 +39007,7 @@ var VxeTextareaComponent = defineVxeComponent({
38876
39007
  nextTick(() => {
38877
39008
  const { autosize, autoSize } = props;
38878
39009
  if (autosize) {
38879
- warnLog$2('vxe.error.delProp', ['autosize', 'auto-size']);
39010
+ warnLog$3('vxe.error.delProp', ['autosize', 'auto-size']);
38880
39011
  }
38881
39012
  if (autosize || autoSize) {
38882
39013
  updateAutoTxt();
@@ -39307,6 +39438,21 @@ function calcTreeLine($xeTree, node, prevNode) {
39307
39438
  }
39308
39439
  return (rowHeight || 28) * expandSize - (prevNode ? 1 : 12);
39309
39440
  }
39441
+ function getItemCacheObj(item) {
39442
+ return {
39443
+ item,
39444
+ index: -1,
39445
+ $index: -1,
39446
+ _index: -1,
39447
+ items: [],
39448
+ parent: null,
39449
+ nodes: [],
39450
+ level: 0,
39451
+ treeIndex: -1,
39452
+ lineCount: 0,
39453
+ treeLoaded: false
39454
+ };
39455
+ }
39310
39456
 
39311
39457
  // 跨树拖拽
39312
39458
  const crossTreeDragNodeInfo = reactive({
@@ -39316,7 +39462,7 @@ function getCrossTreeDragNodeInfo() {
39316
39462
  return crossTreeDragNodeInfo;
39317
39463
  }
39318
39464
 
39319
- const { errLog: errLog$2 } = createComponentLog('tree');
39465
+ const { warnLog: warnLog$2, errLog: errLog$2 } = createComponentLog('tree');
39320
39466
  const { menus, getConfig, getI18n, getIcon } = VxeUI;
39321
39467
  /**
39322
39468
  * 生成节点的唯一主键
@@ -39345,6 +39491,8 @@ function createInternalData$2() {
39345
39491
  offsetSize: 0,
39346
39492
  rowHeight: 0
39347
39493
  },
39494
+ removeRowMaps: {},
39495
+ insertRowMaps: {},
39348
39496
  // prevDragNode: null,
39349
39497
  // prevDragToChild: false,
39350
39498
  // prevDragPos: ''
@@ -39366,14 +39514,13 @@ function createReactData$2() {
39366
39514
  treeList: [],
39367
39515
  updateExpandedFlag: 1,
39368
39516
  updateCheckboxFlag: 1,
39517
+ insertRowFlag: 1,
39518
+ removeRowFlag: 1,
39369
39519
  dragNode: null,
39370
39520
  dragTipText: ''
39371
39521
  };
39372
39522
  }
39373
- // let crossTreeDragNodeObj: {
39374
- // $oldTree: VxeTreeConstructor & VxeTreePrivateMethods
39375
- // $newTree: (VxeTreeConstructor & VxeTreePrivateMethods) | null
39376
- // } | null = null
39523
+ let crossTreeDragNodeObj = null;
39377
39524
  var VxeTreeComponent = defineVxeComponent({
39378
39525
  name: 'VxeTree',
39379
39526
  props: {
@@ -39510,6 +39657,8 @@ var VxeTreeComponent = defineVxeComponent({
39510
39657
  'node-dragstart',
39511
39658
  'node-dragover',
39512
39659
  'node-dragend',
39660
+ 'node-remove-dragend',
39661
+ 'node-insert-dragend',
39513
39662
  'node-expand',
39514
39663
  'node-menu',
39515
39664
  'menu-click'
@@ -40634,6 +40783,149 @@ var VxeTreeComponent = defineVxeComponent({
40634
40783
  }
40635
40784
  recalculate();
40636
40785
  };
40786
+ const insertTreeNode = (newRecords, isAppend) => {
40787
+ const { treeFullData, nodeMaps } = internalData;
40788
+ const keyField = computeKeyField.value;
40789
+ const parentField = computeParentField.value;
40790
+ const childrenField = computeChildrenField.value;
40791
+ const mapChildrenField = computeMapChildrenField.value;
40792
+ const funcName = isAppend ? 'push' : 'unshift';
40793
+ newRecords.forEach((item) => {
40794
+ const parentRowId = item[parentField];
40795
+ const nodeid = getNodeId(item);
40796
+ const matchObj = parentRowId ? XEUtils.findTree(treeFullData, (item) => parentRowId === item[keyField], { children: mapChildrenField }) : null;
40797
+ const itemRest = getItemCacheObj(item);
40798
+ if (matchObj) {
40799
+ const { item: parentItem } = matchObj;
40800
+ const parentRest = nodeMaps[getNodeId(parentItem)];
40801
+ const parentLevel = parentRest ? parentRest.level : 0;
40802
+ let pChilds = parentItem[childrenField];
40803
+ let pMapChilds = parentItem[mapChildrenField];
40804
+ if (!XEUtils.isArray(pChilds)) {
40805
+ pChilds = parentItem[childrenField] = [];
40806
+ }
40807
+ if (!XEUtils.isArray(pMapChilds)) {
40808
+ pMapChilds = parentItem[mapChildrenField] = [];
40809
+ }
40810
+ itemRest.parent = parentItem;
40811
+ itemRest.items = pChilds;
40812
+ itemRest.level = parentLevel;
40813
+ pChilds[funcName](item);
40814
+ pMapChilds[funcName](item);
40815
+ }
40816
+ else {
40817
+ if (parentRowId) {
40818
+ warnLog$2('vxe.error.unableInsert');
40819
+ }
40820
+ treeFullData[funcName](item);
40821
+ }
40822
+ nodeMaps[nodeid] = itemRest;
40823
+ });
40824
+ };
40825
+ const handleInsertNodeAt = (records, targetNodeOrNodeid, isInsertNextNode) => {
40826
+ const { transform } = props;
40827
+ const { treeFullData, nodeMaps } = internalData;
40828
+ const keyField = computeKeyField.value;
40829
+ const parentField = computeParentField.value;
40830
+ const childrenField = computeChildrenField.value;
40831
+ const mapChildrenField = computeMapChildrenField.value;
40832
+ if (!transform) {
40833
+ errLog$2('vxe.error.reqSupportProp', ['insert() | insertAt() | insertNextAt()', 'transform']);
40834
+ return Promise.resolve({ node: null, nodes: [] });
40835
+ }
40836
+ if (!XEUtils.isArray(records)) {
40837
+ records = [records];
40838
+ }
40839
+ let targetNode = targetNodeOrNodeid;
40840
+ if (XEUtils.isString(targetNodeOrNodeid) || XEUtils.isNumber(targetNodeOrNodeid)) {
40841
+ const nodeRest = nodeMaps[targetNodeOrNodeid];
40842
+ if (nodeRest) {
40843
+ targetNode = nodeRest.item;
40844
+ }
40845
+ }
40846
+ if (!records.length) {
40847
+ return Promise.resolve({ node: null, nodes: [] });
40848
+ }
40849
+ const newRecords = records.map(record => XEUtils.assign({ [mapChildrenField]: [], [childrenField]: [] }, record));
40850
+ const treeRecords = XEUtils.toArrayTree(newRecords, { key: keyField, parentKey: parentField, children: childrenField });
40851
+ if (XEUtils.eqNull(targetNode)) {
40852
+ insertTreeNode(newRecords, false);
40853
+ }
40854
+ else {
40855
+ if (targetNode === -1) {
40856
+ insertTreeNode(newRecords, true);
40857
+ }
40858
+ else {
40859
+ const matchMapObj = XEUtils.findTree(treeFullData, item => targetNode[keyField] === item[keyField], { children: mapChildrenField });
40860
+ if (matchMapObj) {
40861
+ const { parent: parentNode } = matchMapObj;
40862
+ const parentMapChilds = parentNode ? parentNode[mapChildrenField] : treeFullData;
40863
+ const parentRest = nodeMaps[getNodeId(parentNode)];
40864
+ const parentLevel = parentRest ? parentRest.level : 0;
40865
+ treeRecords.forEach((row, i) => {
40866
+ if (parentNode) {
40867
+ if (row[parentField] !== parentNode[keyField]) {
40868
+ errLog$2('vxe.error.errProp', [`${parentField}=${row[parentField]}`, `${parentField}=${parentNode[keyField]}`]);
40869
+ row[parentField] = parentNode[keyField];
40870
+ }
40871
+ }
40872
+ else {
40873
+ if (row[parentField] !== null) {
40874
+ if (!XEUtils.eqNull(row[parentField])) {
40875
+ errLog$2('vxe.error.errProp', [`${parentField}=${row[parentField]}`, 'null']);
40876
+ }
40877
+ row[parentField] = null;
40878
+ }
40879
+ }
40880
+ let targetIndex = matchMapObj.index + i;
40881
+ if (isInsertNextNode) {
40882
+ targetIndex = targetIndex + 1;
40883
+ }
40884
+ parentMapChilds.splice(targetIndex, 0, row);
40885
+ });
40886
+ XEUtils.eachTree(treeRecords, (item) => {
40887
+ const nodeid = getNodeId(item);
40888
+ const nodeRest = getItemCacheObj(item);
40889
+ nodeRest.level = parentLevel;
40890
+ if (item[childrenField]) {
40891
+ item[mapChildrenField] = item[childrenField];
40892
+ }
40893
+ nodeMaps[nodeid] = nodeRest;
40894
+ }, { children: childrenField });
40895
+ // 源
40896
+ if (parentNode) {
40897
+ const matchObj = XEUtils.findTree(treeFullData, item => targetNode[keyField] === item[keyField], { children: childrenField });
40898
+ if (matchObj) {
40899
+ const parentChilds = matchObj.items;
40900
+ let targetIndex = matchObj.index;
40901
+ if (isInsertNextNode) {
40902
+ targetIndex = targetIndex + 1;
40903
+ }
40904
+ parentChilds.splice(targetIndex, 0, ...treeRecords);
40905
+ }
40906
+ }
40907
+ }
40908
+ else {
40909
+ warnLog$2('vxe.error.unableInsert');
40910
+ insertTreeNode(newRecords, true);
40911
+ }
40912
+ }
40913
+ }
40914
+ reactData.insertRowFlag++;
40915
+ cacheNodeMap();
40916
+ handleData(true);
40917
+ updateAfterDataIndex();
40918
+ updateCheckboxStatus();
40919
+ if (reactData.scrollYLoad) {
40920
+ updateYSpace();
40921
+ }
40922
+ return nextTick().then(() => {
40923
+ return {
40924
+ node: newRecords.length ? newRecords[newRecords.length - 1] : null,
40925
+ nodes: newRecords
40926
+ };
40927
+ });
40928
+ };
40637
40929
  const treeMethods = {
40638
40930
  dispatchEvent,
40639
40931
  getNodeId,
@@ -41037,7 +41329,91 @@ var VxeTreeComponent = defineVxeComponent({
41037
41329
  }
41038
41330
  return recalculate();
41039
41331
  },
41040
- clearScroll
41332
+ clearScroll,
41333
+ insert(records) {
41334
+ return handleInsertNodeAt(records, null);
41335
+ },
41336
+ insertAt(records, targetNodeOrNodeid) {
41337
+ return handleInsertNodeAt(records, targetNodeOrNodeid);
41338
+ },
41339
+ insertNextAt(records, targetNodeOrNodeid) {
41340
+ return handleInsertNodeAt(records, targetNodeOrNodeid, true);
41341
+ },
41342
+ remove(nodes) {
41343
+ const { transform } = props;
41344
+ const { treeFullData } = internalData;
41345
+ const childrenField = computeChildrenField.value;
41346
+ const mapChildrenField = computeMapChildrenField.value;
41347
+ if (!transform) {
41348
+ errLog$2('vxe.error.reqSupportProp', ['remove()', 'transform']);
41349
+ return Promise.resolve({ node: null, nodes: [] });
41350
+ }
41351
+ let delList = [];
41352
+ if (!nodes) {
41353
+ nodes = treeFullData;
41354
+ }
41355
+ else if (!XEUtils.isArray(nodes)) {
41356
+ nodes = [nodes];
41357
+ }
41358
+ if (!nodes.length) {
41359
+ return Promise.resolve({ node: null, nodes: [] });
41360
+ }
41361
+ // 从数据源中移除
41362
+ if (treeFullData === nodes) {
41363
+ nodes = delList = treeFullData.slice(0);
41364
+ internalData.treeFullData = [];
41365
+ }
41366
+ else {
41367
+ nodes.forEach((item) => {
41368
+ const nodeid = getNodeId(item);
41369
+ const matchMapObj = XEUtils.findTree(treeFullData, item => nodeid === getNodeId(item), { children: mapChildrenField });
41370
+ if (matchMapObj) {
41371
+ const rItems = matchMapObj.items.splice(matchMapObj.index, 1);
41372
+ delList.push(rItems[0]);
41373
+ }
41374
+ const matchObj = XEUtils.findTree(treeFullData, item => nodeid === getNodeId(item), { children: childrenField });
41375
+ if (matchObj) {
41376
+ const rItems = matchObj.items.splice(matchObj.index, 1);
41377
+ delList.push(rItems[0]);
41378
+ }
41379
+ });
41380
+ }
41381
+ reactData.removeRowFlag++;
41382
+ reactData.insertRowFlag++;
41383
+ cacheNodeMap();
41384
+ handleData(true);
41385
+ updateAfterDataIndex();
41386
+ updateCheckboxStatus();
41387
+ if (reactData.scrollYLoad) {
41388
+ updateYSpace();
41389
+ }
41390
+ return nextTick().then(() => {
41391
+ return recalculate();
41392
+ }).then(() => {
41393
+ return { node: delList.length ? delList[delList.length - 1] : null, nodes: delList };
41394
+ });
41395
+ },
41396
+ getInsertRecords() {
41397
+ const { insertRowMaps } = internalData;
41398
+ const insertRecords = [];
41399
+ XEUtils.each(insertRowMaps, (row) => {
41400
+ insertRecords.push(row);
41401
+ });
41402
+ return insertRecords;
41403
+ },
41404
+ getRemoveRecords() {
41405
+ const { removeRowMaps } = internalData;
41406
+ const removeRecords = [];
41407
+ XEUtils.each(removeRowMaps, (row) => {
41408
+ removeRecords.push(row);
41409
+ });
41410
+ return removeRecords;
41411
+ }
41412
+ };
41413
+ const handleNodeDragEndClearStatus = () => {
41414
+ clearNodeDragData();
41415
+ clearCrossTreeDragStatus();
41416
+ recalculate();
41041
41417
  };
41042
41418
  const clearNodeDropOrigin = () => {
41043
41419
  const el = refElem.value;
@@ -41088,7 +41464,7 @@ var VxeTreeComponent = defineVxeComponent({
41088
41464
  }
41089
41465
  };
41090
41466
  const clearCrossTreeDragStatus = () => {
41091
- // crossTreeDragNodeObj = null
41467
+ crossTreeDragNodeObj = null;
41092
41468
  crossTreeDragNodeInfo.node = null;
41093
41469
  };
41094
41470
  const clearDragStatus = () => {
@@ -41451,6 +41827,18 @@ var VxeTreeComponent = defineVxeComponent({
41451
41827
  const { dragNode } = reactData;
41452
41828
  const { nodeMaps, prevDragNode, prevDragPos, prevDragToChild } = internalData;
41453
41829
  const hasChildField = computeHasChildField.value;
41830
+ const dragConfig = computeDragOpts.value;
41831
+ const { isCrossDrag, isCrossTreeDrag } = dragConfig;
41832
+ // 跨树拖拽
41833
+ if (isCrossTreeDrag && crossTreeDragNodeObj) {
41834
+ const { $newTree } = crossTreeDragNodeObj;
41835
+ if ($newTree && $newTree.xID !== $xeTree.xID) {
41836
+ if (isCrossDrag) {
41837
+ $newTree.handleCrossTreeNodeDragInsertEvent(evnt);
41838
+ }
41839
+ return;
41840
+ }
41841
+ }
41454
41842
  if (lazy && prevDragToChild) {
41455
41843
  // 懒加载
41456
41844
  const newNodeid = getNodeId(prevDragNode);
@@ -41530,17 +41918,196 @@ var VxeTreeComponent = defineVxeComponent({
41530
41918
  /**
41531
41919
  * 处理跨树拖拽完成
41532
41920
  */
41533
- handleCrossTreeNodeDragFinishEvent() {
41921
+ handleCrossTreeNodeDragFinishEvent(evnt) {
41922
+ const { treeList } = reactData;
41923
+ const { nodeMaps } = internalData;
41924
+ const dragOpts = computeDragOpts.value;
41925
+ const { animation, isCrossTreeDrag } = dragOpts;
41926
+ const mapChildrenField = computeMapChildrenField.value;
41927
+ const el = refElem.value;
41928
+ if (!el) {
41929
+ return;
41930
+ }
41931
+ if (isCrossTreeDrag && crossTreeDragNodeObj && crossTreeDragNodeInfo) {
41932
+ const { node: dragNode } = crossTreeDragNodeInfo;
41933
+ if (dragNode) {
41934
+ const dragNodeid = getNodeId(dragNode);
41935
+ const dragNodeRest = nodeMaps[dragNodeid];
41936
+ let dragNodeHeight = 0;
41937
+ let rsIndex = -1;
41938
+ if (dragNodeRest) {
41939
+ if (animation) {
41940
+ const oldItemEl = el.querySelector(`.vxe-tree--node-wrapper[nodeid="${dragNodeid}"]`);
41941
+ const targetItemEl = oldItemEl;
41942
+ if (targetItemEl) {
41943
+ dragNodeHeight = targetItemEl.offsetHeight;
41944
+ }
41945
+ }
41946
+ rsIndex = dragNodeRest.$index;
41947
+ }
41948
+ const dragRangeList = rsIndex > -1 && rsIndex < treeList.length - 1 ? treeList.slice(rsIndex + 1) : [];
41949
+ const dragList = XEUtils.toTreeArray([dragNode], {
41950
+ updated: true,
41951
+ children: mapChildrenField
41952
+ });
41953
+ $xeTree.remove(dragList).then(() => {
41954
+ if (animation && dragNodeHeight && dragRangeList.length) {
41955
+ const wrapperEl = el;
41956
+ const dtClss = [];
41957
+ dragRangeList.forEach(item => {
41958
+ const nodeid = getNodeId(item);
41959
+ dtClss.push(`.vxe-tree--node-wrapper[nodeid="${nodeid}"]`);
41960
+ });
41961
+ const dtTrList = wrapperEl.querySelectorAll(dtClss.join(','));
41962
+ moveRowAnimateToTb(dtTrList, dragNodeHeight);
41963
+ }
41964
+ });
41965
+ dispatchEvent('node-remove-dragend', {
41966
+ node: dragNode
41967
+ }, evnt);
41968
+ handleNodeDragEndClearStatus();
41969
+ }
41970
+ }
41534
41971
  },
41535
41972
  /**
41536
41973
  * 处理跨树拖至新的空树
41537
41974
  */
41538
- handleCrossTreeNodeDragInsertEvent() {
41975
+ handleCrossTreeNodeDragoverEmptyEvent(evnt) {
41976
+ const { treeList } = reactData;
41977
+ const dragOpts = computeDragOpts.value;
41978
+ const { isCrossTreeDrag } = dragOpts;
41979
+ if (isCrossTreeDrag && crossTreeDragNodeObj && !treeList.length) {
41980
+ const { $oldTree, $newTree } = crossTreeDragNodeObj;
41981
+ if ($oldTree) {
41982
+ const oldTreeReactData = $oldTree;
41983
+ if ($oldTree.xID !== $xeTree.xID) {
41984
+ if ($newTree && $newTree.xID !== $xeTree.xID) {
41985
+ $newTree.hideCrossTreeNodeDropClearStatus();
41986
+ }
41987
+ evnt.preventDefault();
41988
+ $oldTree.hideCrossTreeNodeDropClearStatus();
41989
+ crossTreeDragNodeObj.$newTree = $xeTree;
41990
+ internalData.prevDragNode = null;
41991
+ reactData.dragTipText = oldTreeReactData.dragTipText;
41992
+ showDropTip(evnt, evnt.currentTarget, true, '');
41993
+ }
41994
+ }
41995
+ }
41539
41996
  },
41540
41997
  /**
41541
41998
  * 处理跨树拖插入
41542
41999
  */
41543
- handleCrossTreeNodeDragoverEmptyEvent() {
42000
+ handleCrossTreeNodeDragInsertEvent(evnt) {
42001
+ const { prevDragNode, prevDragPos, prevDragToChild } = internalData;
42002
+ const dragOpts = computeDragOpts.value;
42003
+ const { animation, isSelfToChildDrag, isCrossTreeDrag, dragEndMethod, dragToChildMethod } = dragOpts;
42004
+ const parentField = computeParentField.value;
42005
+ const mapChildrenField = computeMapChildrenField.value;
42006
+ const childrenField = computeChildrenField.value;
42007
+ // 跨表拖拽
42008
+ if (isCrossTreeDrag && crossTreeDragNodeObj && crossTreeDragNodeInfo) {
42009
+ const { node: oldNode } = crossTreeDragNodeInfo;
42010
+ const { $oldTree } = crossTreeDragNodeObj;
42011
+ const el = refElem.value;
42012
+ if (!el) {
42013
+ return;
42014
+ }
42015
+ if ($oldTree && oldNode) {
42016
+ const dragNode = oldNode;
42017
+ let dragOffsetIndex = -1;
42018
+ if (prevDragNode) {
42019
+ dragOffsetIndex = prevDragPos === 'bottom' ? 1 : 0;
42020
+ }
42021
+ const dragParams = {
42022
+ oldNode: dragNode,
42023
+ newNode: prevDragNode,
42024
+ dragNode,
42025
+ dragPos: prevDragPos,
42026
+ dragToChild: !!prevDragToChild,
42027
+ offsetIndex: dragOffsetIndex
42028
+ };
42029
+ const isDragToChildFlag = isSelfToChildDrag && dragToChildMethod ? dragToChildMethod(dragParams) : prevDragToChild;
42030
+ const errRest = {
42031
+ status: false
42032
+ };
42033
+ Promise.resolve(dragEndMethod ? dragEndMethod(dragParams) : true).then((status) => {
42034
+ if (!status) {
42035
+ if ($oldTree) {
42036
+ if ($oldTree.xID !== $xeTree.xID) {
42037
+ $oldTree.handleCrossTreeNodeDragCancelEvent(evnt);
42038
+ }
42039
+ }
42040
+ handleNodeDragEndClearStatus();
42041
+ return errRest;
42042
+ }
42043
+ let insertRest = Promise.resolve();
42044
+ const dragList = XEUtils.toTreeArray([dragNode], {
42045
+ updated: true,
42046
+ children: mapChildrenField
42047
+ });
42048
+ $oldTree.handleCrossTreeNodeDragFinishEvent(evnt);
42049
+ if (prevDragNode) {
42050
+ dragNode[parentField] = prevDragNode[parentField];
42051
+ }
42052
+ else {
42053
+ dragNode[parentField] = null;
42054
+ }
42055
+ dragList.forEach(row => {
42056
+ row[childrenField] = undefined;
42057
+ row[mapChildrenField] = undefined;
42058
+ });
42059
+ if (prevDragNode) {
42060
+ if (prevDragPos === 'bottom') {
42061
+ insertRest = $xeTree.insertNextAt(dragList, prevDragNode);
42062
+ }
42063
+ else {
42064
+ insertRest = $xeTree.insertAt(dragList, prevDragNode);
42065
+ }
42066
+ }
42067
+ else {
42068
+ insertRest = $xeTree.insert(dragList);
42069
+ }
42070
+ $xeTree.dispatchEvent('node-insert-dragend', {
42071
+ oldNode,
42072
+ newNode: prevDragNode,
42073
+ dragNode,
42074
+ dragPos: prevDragPos,
42075
+ dragToChild: isDragToChildFlag,
42076
+ offsetIndex: dragOffsetIndex
42077
+ }, evnt);
42078
+ clearNodeDragData();
42079
+ insertRest.then(() => {
42080
+ const { treeList } = reactData;
42081
+ const { nodeMaps } = internalData;
42082
+ const oldNodeid = getNodeId(dragNode);
42083
+ const oldNodeRest = nodeMaps[oldNodeid];
42084
+ let dragNodeHeight = 0;
42085
+ let rsIndex = -1;
42086
+ if (oldNodeRest) {
42087
+ if (animation) {
42088
+ const oldItemEl = el.querySelector(`.vxe-tree--node-wrapper[nodeid="${oldNodeid}"]`);
42089
+ const targetItemEl = oldItemEl;
42090
+ if (targetItemEl) {
42091
+ dragNodeHeight = targetItemEl.offsetHeight;
42092
+ }
42093
+ }
42094
+ rsIndex = oldNodeRest.$index;
42095
+ }
42096
+ const dragRangeList = rsIndex > -1 ? treeList.slice(rsIndex) : [];
42097
+ if (animation && dragNodeHeight && dragRangeList.length) {
42098
+ const wrapperEl = el;
42099
+ const dtClss = [];
42100
+ dragRangeList.forEach(item => {
42101
+ const nodeid = getNodeId(item);
42102
+ dtClss.push(`.vxe-tree--node-wrapper[nodeid="${nodeid}"]`);
42103
+ });
42104
+ const dtTrList = wrapperEl.querySelectorAll(dtClss.join(','));
42105
+ moveRowAnimateToTb(dtTrList, -dragNodeHeight);
42106
+ }
42107
+ });
42108
+ });
42109
+ }
42110
+ }
41544
42111
  },
41545
42112
  hideCrossTreeNodeDropClearStatus() {
41546
42113
  hideDropTip();
@@ -41838,12 +42405,15 @@ var VxeTreeComponent = defineVxeComponent({
41838
42405
  const loadingOpts = computeLoadingOpts.value;
41839
42406
  const isRowHover = computeIsRowHover.value;
41840
42407
  const treeStyle = computeTreeStyle.value;
42408
+ const dragOpts = computeDragOpts.value;
41841
42409
  const loadingSlot = slots.loading;
41842
42410
  const headerSlot = slots.header;
41843
42411
  const footerSlot = slots.footer;
41844
- return h('div', {
41845
- ref: refElem,
41846
- class: ['vxe-tree', {
42412
+ const teOns = {};
42413
+ if (dragOpts.isCrossTreeDrag && !treeList.length) {
42414
+ teOns.onDragover = $xeTree.handleCrossTreeNodeDragInsertEvent;
42415
+ }
42416
+ return h('div', Object.assign({ ref: refElem, class: ['vxe-tree', {
41847
42417
  [`size--${vSize}`]: vSize,
41848
42418
  'show--line': showLine,
41849
42419
  'checkbox--highlight': checkboxOpts.highlight,
@@ -41851,8 +42421,7 @@ var VxeTreeComponent = defineVxeComponent({
41851
42421
  'node--hover': isRowHover,
41852
42422
  'node--trigger': trigger === 'node',
41853
42423
  'is--loading': loading
41854
- }]
41855
- }, [
42424
+ }] }, teOns), [
41856
42425
  headerSlot
41857
42426
  ? h('div', {
41858
42427
  ref: refHeaderWrapperElem,
@@ -41958,8 +42527,8 @@ var VxeTreeComponent = defineVxeComponent({
41958
42527
  if (drag && !transform) {
41959
42528
  errLog$2('vxe.error.notSupportProp', ['drag', 'transform=false', 'transform=true']);
41960
42529
  }
41961
- if (dragOpts.isCrossTreeDrag) {
41962
- errLog$2('vxe.error.notProp', ['drag-config.isCrossTreeDrag']);
42530
+ if (dragOpts.isCrossTreeDrag && !dragOpts.isCrossDrag) {
42531
+ errLog$2('vxe.error.reqSupportProp', ['drag-config.isCrossTreeDrag', 'drag-config.isCrossDrag']);
41963
42532
  }
41964
42533
  // if (valueField) {
41965
42534
  // errLog('vxe.error.delProp', ['value-field', 'value-field'])