vxe-pc-ui 4.16.7 → 4.16.9

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 (217) hide show
  1. package/README.en.md +3 -3
  2. package/README.ja-JP.md +3 -3
  3. package/README.md +3 -3
  4. package/README.zh-TW.md +3 -3
  5. package/dist/all.esm.js +118 -47
  6. package/dist/style.css +1 -1
  7. package/dist/style.min.css +1 -1
  8. package/es/button/style.css +14 -0
  9. package/es/button/style.min.css +1 -1
  10. package/es/cascader/src/cascader.js +66 -26
  11. package/es/cascader/style.css +9 -9
  12. package/es/cascader/style.min.css +1 -1
  13. package/es/checkbox/src/group.js +7 -4
  14. package/es/checkbox/style.css +11 -0
  15. package/es/checkbox/style.min.css +1 -1
  16. package/es/checkbox-button/style.css +6 -0
  17. package/es/checkbox-button/style.min.css +1 -1
  18. package/es/date-range-picker/src/date-range-picker.js +25 -9
  19. package/es/form/style.css +12 -0
  20. package/es/form/style.min.css +1 -1
  21. package/es/icon/style.css +7 -1
  22. package/es/icon/style.min.css +1 -1
  23. package/es/input/style.css +276 -66
  24. package/es/input/style.min.css +1 -1
  25. package/es/menu/src/menu.js +4 -3
  26. package/es/menu/style.css +10 -0
  27. package/es/menu/style.min.css +1 -1
  28. package/es/number-input/style.css +28 -21
  29. package/es/number-input/style.min.css +1 -1
  30. package/es/password-input/src/password-input.js +1 -0
  31. package/es/password-input/style.css +28 -399
  32. package/es/password-input/style.min.css +1 -1
  33. package/es/radio/src/group.js +3 -3
  34. package/es/radio/style.css +11 -0
  35. package/es/radio/style.min.css +1 -1
  36. package/es/radio-button/style.css +6 -0
  37. package/es/radio-button/style.min.css +1 -1
  38. package/es/select/style.css +10 -0
  39. package/es/select/style.min.css +1 -1
  40. package/es/style.css +1 -1
  41. package/es/style.min.css +1 -1
  42. package/es/switch/style.css +36 -22
  43. package/es/switch/style.min.css +1 -1
  44. package/es/tag/style.css +20 -19
  45. package/es/tag/style.min.css +1 -1
  46. package/es/tree/src/tree.js +13 -2
  47. package/es/tree/style.css +4 -1
  48. package/es/tree/style.min.css +1 -1
  49. package/es/ui/index.js +1 -1
  50. package/es/ui/src/log.js +1 -1
  51. package/es/upload/style.css +10 -0
  52. package/es/upload/style.min.css +1 -1
  53. package/es/vxe-button/style.css +14 -0
  54. package/es/vxe-button/style.min.css +1 -1
  55. package/es/vxe-cascader/style.css +9 -9
  56. package/es/vxe-cascader/style.min.css +1 -1
  57. package/es/vxe-checkbox/style.css +11 -0
  58. package/es/vxe-checkbox/style.min.css +1 -1
  59. package/es/vxe-checkbox-button/style.css +6 -0
  60. package/es/vxe-checkbox-button/style.min.css +1 -1
  61. package/es/vxe-form/style.css +12 -0
  62. package/es/vxe-form/style.min.css +1 -1
  63. package/es/vxe-icon/style.css +6 -0
  64. package/es/vxe-icon/style.min.css +1 -1
  65. package/es/vxe-input/style.css +276 -66
  66. package/es/vxe-input/style.min.css +1 -1
  67. package/es/vxe-menu/style.css +10 -0
  68. package/es/vxe-menu/style.min.css +1 -1
  69. package/es/vxe-number-input/style.css +28 -21
  70. package/es/vxe-number-input/style.min.css +1 -1
  71. package/es/vxe-password-input/style.css +28 -399
  72. package/es/vxe-password-input/style.min.css +1 -1
  73. package/es/vxe-radio/style.css +11 -0
  74. package/es/vxe-radio/style.min.css +1 -1
  75. package/es/vxe-radio-button/style.css +6 -0
  76. package/es/vxe-radio-button/style.min.css +1 -1
  77. package/es/vxe-select/style.css +10 -0
  78. package/es/vxe-select/style.min.css +1 -1
  79. package/es/vxe-switch/style.css +36 -22
  80. package/es/vxe-switch/style.min.css +1 -1
  81. package/es/vxe-tag/style.css +20 -19
  82. package/es/vxe-tag/style.min.css +1 -1
  83. package/es/vxe-tree/style.css +4 -1
  84. package/es/vxe-tree/style.min.css +1 -1
  85. package/es/vxe-upload/style.css +10 -0
  86. package/es/vxe-upload/style.min.css +1 -1
  87. package/lib/button/style/style.css +14 -0
  88. package/lib/button/style/style.min.css +1 -1
  89. package/lib/cascader/src/cascader.js +73 -27
  90. package/lib/cascader/src/cascader.min.js +1 -1
  91. package/lib/cascader/style/style.css +9 -9
  92. package/lib/cascader/style/style.min.css +1 -1
  93. package/lib/checkbox/src/group.js +8 -4
  94. package/lib/checkbox/src/group.min.js +1 -1
  95. package/lib/checkbox/style/style.css +11 -0
  96. package/lib/checkbox/style/style.min.css +1 -1
  97. package/lib/checkbox-button/style/style.css +6 -0
  98. package/lib/checkbox-button/style/style.min.css +1 -1
  99. package/lib/date-range-picker/src/date-range-picker.js +27 -9
  100. package/lib/date-range-picker/src/date-range-picker.min.js +1 -1
  101. package/lib/form/style/style.css +12 -0
  102. package/lib/form/style/style.min.css +1 -1
  103. package/lib/icon/style/style.css +7 -1
  104. package/lib/icon/style/style.min.css +7 -1
  105. package/lib/index.umd.js +129 -50
  106. package/lib/index.umd.min.js +1 -1
  107. package/lib/input/style/style.css +276 -66
  108. package/lib/input/style/style.min.css +1 -1
  109. package/lib/menu/src/menu.js +4 -3
  110. package/lib/menu/src/menu.min.js +1 -1
  111. package/lib/menu/style/style.css +10 -0
  112. package/lib/menu/style/style.min.css +1 -1
  113. package/lib/number-input/style/style.css +28 -21
  114. package/lib/number-input/style/style.min.css +1 -1
  115. package/lib/password-input/src/password-input.js +1 -0
  116. package/lib/password-input/src/password-input.min.js +1 -1
  117. package/lib/password-input/style/style.css +28 -399
  118. package/lib/password-input/style/style.min.css +1 -1
  119. package/lib/radio/src/group.js +4 -4
  120. package/lib/radio/src/group.min.js +1 -1
  121. package/lib/radio/style/style.css +11 -0
  122. package/lib/radio/style/style.min.css +1 -1
  123. package/lib/radio-button/style/style.css +6 -0
  124. package/lib/radio-button/style/style.min.css +1 -1
  125. package/lib/select/style/style.css +10 -0
  126. package/lib/select/style/style.min.css +1 -1
  127. package/lib/style.css +1 -1
  128. package/lib/style.min.css +1 -1
  129. package/lib/switch/style/style.css +36 -22
  130. package/lib/switch/style/style.min.css +1 -1
  131. package/lib/tag/style/style.css +20 -19
  132. package/lib/tag/style/style.min.css +1 -1
  133. package/lib/tree/src/tree.js +10 -2
  134. package/lib/tree/src/tree.min.js +1 -1
  135. package/lib/tree/style/style.css +4 -1
  136. package/lib/tree/style/style.min.css +1 -1
  137. package/lib/ui/index.js +1 -1
  138. package/lib/ui/index.min.js +1 -1
  139. package/lib/ui/src/log.js +1 -1
  140. package/lib/ui/src/log.min.js +1 -1
  141. package/lib/upload/style/style.css +10 -0
  142. package/lib/upload/style/style.min.css +1 -1
  143. package/lib/vxe-button/style/style.css +14 -0
  144. package/lib/vxe-button/style/style.min.css +1 -1
  145. package/lib/vxe-cascader/style/style.css +9 -9
  146. package/lib/vxe-cascader/style/style.min.css +1 -1
  147. package/lib/vxe-checkbox/style/style.css +11 -0
  148. package/lib/vxe-checkbox/style/style.min.css +1 -1
  149. package/lib/vxe-checkbox-button/style/style.css +6 -0
  150. package/lib/vxe-checkbox-button/style/style.min.css +1 -1
  151. package/lib/vxe-form/style/style.css +12 -0
  152. package/lib/vxe-form/style/style.min.css +1 -1
  153. package/lib/vxe-icon/style/style.css +6 -0
  154. package/lib/vxe-icon/style/style.min.css +1 -1
  155. package/lib/vxe-input/style/style.css +276 -66
  156. package/lib/vxe-input/style/style.min.css +1 -1
  157. package/lib/vxe-menu/style/style.css +10 -0
  158. package/lib/vxe-menu/style/style.min.css +1 -1
  159. package/lib/vxe-number-input/style/style.css +28 -21
  160. package/lib/vxe-number-input/style/style.min.css +1 -1
  161. package/lib/vxe-password-input/style/style.css +28 -399
  162. package/lib/vxe-password-input/style/style.min.css +1 -1
  163. package/lib/vxe-radio/style/style.css +11 -0
  164. package/lib/vxe-radio/style/style.min.css +1 -1
  165. package/lib/vxe-radio-button/style/style.css +6 -0
  166. package/lib/vxe-radio-button/style/style.min.css +1 -1
  167. package/lib/vxe-select/style/style.css +10 -0
  168. package/lib/vxe-select/style/style.min.css +1 -1
  169. package/lib/vxe-switch/style/style.css +36 -22
  170. package/lib/vxe-switch/style/style.min.css +1 -1
  171. package/lib/vxe-tag/style/style.css +20 -19
  172. package/lib/vxe-tag/style/style.min.css +1 -1
  173. package/lib/vxe-tree/style/style.css +4 -1
  174. package/lib/vxe-tree/style/style.min.css +1 -1
  175. package/lib/vxe-upload/style/style.css +10 -0
  176. package/lib/vxe-upload/style/style.min.css +1 -1
  177. package/package.json +3 -3
  178. package/packages/cascader/src/cascader.ts +66 -25
  179. package/packages/checkbox/src/group.ts +7 -4
  180. package/packages/date-range-picker/src/date-range-picker.ts +23 -9
  181. package/packages/menu/src/menu.ts +4 -3
  182. package/packages/password-input/src/password-input.ts +1 -0
  183. package/packages/radio/src/group.ts +3 -3
  184. package/packages/tree/src/tree.ts +13 -2
  185. package/styles/components/button.scss +12 -0
  186. package/styles/components/cascader.scss +9 -9
  187. package/styles/components/checkbox-button.scss +6 -0
  188. package/styles/components/checkbox.scss +11 -0
  189. package/styles/components/form.scss +12 -0
  190. package/styles/components/icon.scss +6 -0
  191. package/styles/components/input.scss +52 -28
  192. package/styles/components/menu.scss +8 -0
  193. package/styles/components/number-input.scss +29 -23
  194. package/styles/components/password-input.scss +29 -173
  195. package/styles/components/radio-button.scss +6 -0
  196. package/styles/components/radio.scss +11 -0
  197. package/styles/components/select.scss +8 -0
  198. package/styles/components/switch.scss +37 -22
  199. package/styles/components/tag.scss +21 -21
  200. package/styles/components/tree.scss +3 -1
  201. package/styles/components/upload.scss +8 -0
  202. package/styles/theme/base.scss +47 -0
  203. package/types/components/cascader.d.ts +1 -0
  204. package/types/components/checkbox-group.d.ts +2 -0
  205. package/types/components/tree.d.ts +7 -0
  206. /package/es/icon/{iconfont.1783873713408.ttf → iconfont.1783939831164.ttf} +0 -0
  207. /package/es/icon/{iconfont.1783873713408.woff → iconfont.1783939831164.woff} +0 -0
  208. /package/es/icon/{iconfont.1783873713408.woff2 → iconfont.1783939831164.woff2} +0 -0
  209. /package/es/{iconfont.1783873713408.ttf → iconfont.1783939831164.ttf} +0 -0
  210. /package/es/{iconfont.1783873713408.woff → iconfont.1783939831164.woff} +0 -0
  211. /package/es/{iconfont.1783873713408.woff2 → iconfont.1783939831164.woff2} +0 -0
  212. /package/lib/icon/style/{iconfont.1783873713408.ttf → iconfont.1783939831164.ttf} +0 -0
  213. /package/lib/icon/style/{iconfont.1783873713408.woff → iconfont.1783939831164.woff} +0 -0
  214. /package/lib/icon/style/{iconfont.1783873713408.woff2 → iconfont.1783939831164.woff2} +0 -0
  215. /package/lib/{iconfont.1783873713408.ttf → iconfont.1783939831164.ttf} +0 -0
  216. /package/lib/{iconfont.1783873713408.woff → iconfont.1783939831164.woff} +0 -0
  217. /package/lib/{iconfont.1783873713408.woff2 → iconfont.1783939831164.woff2} +0 -0
package/README.en.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  [简体中文](README.md) | [繁體中文](README.zh-TW.md) | English | [日本語](README.ja-JP.md)
4
4
 
5
- [![github star](https://img.shields.io/github/stars/x-extends/vxe-pc-ui.svg)](https://github.com/x-extends/vxe-pc-ui/stargazers)
6
- [![gitee star](https://gitee.com/x-extends/vxe-pc-ui/badge/star.svg)](https://gitee.com/x-extends/vxe-pc-ui/stargazers)
7
- [![gitcode star](https://gitcode.com/x-extends/vxe-pc-ui/star/badge.svg)](https://gitcode.com/x-extends/vxe-pc-ui/stargazers)
5
+ [![github star](https://img.shields.io/github/stars/x-extends/vxe-pc-ui.svg)](https://github.com/x-extends/vxe-pc-ui)
6
+ [![gitee star](https://gitee.com/x-extends/vxe-pc-ui/badge/star.svg)](https://gitee.com/x-extends/vxe-pc-ui)
7
+ [![gitcode star](https://gitcode.com/x-extends/vxe-pc-ui/star/badge.svg)](https://gitcode.com/x-extends/vxe-pc-ui)
8
8
  [![npm version](https://img.shields.io/npm/v/vxe-pc-ui.svg?style=flat-square)](https://www.npmjs.com/package/vxe-pc-ui)
9
9
  [![NodeJS with Webpack](https://github.com/x-extends/vxe-pc-ui/actions/workflows/webpack.yml/badge.svg)](https://github.com/x-extends/vxe-pc-ui/actions/workflows/webpack.yml)
10
10
  [![npm downloads](https://img.shields.io/npm/dt/vxe-pc-ui.svg?style=flat-square)](https://npm-stat.com/charts.html?package=vxe-pc-ui)
package/README.ja-JP.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  [简体中文](README.md) | [繁體中文](README.zh-TW.md) | [English](README.en.md) | 日本語
4
4
 
5
- [![github star](https://img.shields.io/github/stars/x-extends/vxe-pc-ui.svg)](https://github.com/x-extends/vxe-pc-ui/stargazers)
6
- [![gitee star](https://gitee.com/x-extends/vxe-pc-ui/badge/star.svg)](https://gitee.com/x-extends/vxe-pc-ui/stargazers)
7
- [![gitcode star](https://gitcode.com/x-extends/vxe-pc-ui/star/badge.svg)](https://gitcode.com/x-extends/vxe-pc-ui/stargazers)
5
+ [![github star](https://img.shields.io/github/stars/x-extends/vxe-pc-ui.svg)](https://github.com/x-extends/vxe-pc-ui)
6
+ [![gitee star](https://gitee.com/x-extends/vxe-pc-ui/badge/star.svg)](https://gitee.com/x-extends/vxe-pc-ui)
7
+ [![gitcode star](https://gitcode.com/x-extends/vxe-pc-ui/star/badge.svg)](https://gitcode.com/x-extends/vxe-pc-ui)
8
8
  [![npm version](https://img.shields.io/npm/v/vxe-pc-ui.svg?style=flat-square)](https://www.npmjs.com/package/vxe-pc-ui)
9
9
  [![NodeJS with Webpack](https://github.com/x-extends/vxe-pc-ui/actions/workflows/webpack.yml/badge.svg)](https://github.com/x-extends/vxe-pc-ui/actions/workflows/webpack.yml)
10
10
  [![npm downloads](https://img.shields.io/npm/dt/vxe-pc-uie.svg?style=flat-square)](https://npm-stat.com/charts.html?package=vxe-pc-ui)
package/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  简体中文 | [繁體中文](README.zh-TW.md) | [English](README.en.md) | [日本語](README.ja-JP.md)
4
4
 
5
- [![github star](https://img.shields.io/github/stars/x-extends/vxe-pc-ui.svg)](https://github.com/x-extends/vxe-pc-ui/stargazers)
6
- [![gitee star](https://gitee.com/x-extends/vxe-pc-ui/badge/star.svg)](https://gitee.com/x-extends/vxe-pc-ui/stargazers)
7
- [![gitcode star](https://gitcode.com/x-extends/vxe-pc-ui/star/badge.svg)](https://gitcode.com/x-extends/vxe-pc-ui/stargazers)
5
+ [![github star](https://img.shields.io/github/stars/x-extends/vxe-pc-ui.svg)](https://github.com/x-extends/vxe-pc-ui)
6
+ [![gitee star](https://gitee.com/x-extends/vxe-pc-ui/badge/star.svg)](https://gitee.com/x-extends/vxe-pc-ui)
7
+ [![gitcode star](https://gitcode.com/x-extends/vxe-pc-ui/star/badge.svg)](https://gitcode.com/x-extends/vxe-pc-ui)
8
8
  [![npm version](https://img.shields.io/npm/v/vxe-pc-ui.svg?style=flat-square)](https://www.npmjs.com/package/vxe-pc-ui)
9
9
  [![NodeJS with Webpack](https://github.com/x-extends/vxe-pc-ui/actions/workflows/webpack.yml/badge.svg)](https://github.com/x-extends/vxe-pc-ui/actions/workflows/webpack.yml)
10
10
  [![gzip size: JS](http://img.badgesize.io/https://unpkg.com/vxe-pc-ui/lib/index.umd.min.js?compression=gzip&label=gzip%20size:%20JS)](https://unpkg.com/vxe-pc-ui/lib/index.umd.min.js)
package/README.zh-TW.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  [简体中文](README.md) | 繁體中文 | [English](README.en.md) | [日本語](README.ja-JP.md)
4
4
 
5
- [![github star](https://img.shields.io/github/stars/x-extends/vxe-pc-ui.svg)](https://github.com/x-extends/vxe-pc-ui/stargazers)
6
- [![gitee star](https://gitee.com/x-extends/vxe-pc-ui/badge/star.svg)](https://gitee.com/x-extends/vxe-pc-ui/stargazers)
7
- [![gitcode star](https://gitcode.com/x-extends/vxe-pc-ui/star/badge.svg)](https://gitcode.com/x-extends/vxe-pc-ui/stargazers)
5
+ [![github star](https://img.shields.io/github/stars/x-extends/vxe-pc-ui.svg)](https://github.com/x-extends/vxe-pc-ui)
6
+ [![gitee star](https://gitee.com/x-extends/vxe-pc-ui/badge/star.svg)](https://gitee.com/x-extends/vxe-pc-ui)
7
+ [![gitcode star](https://gitcode.com/x-extends/vxe-pc-ui/star/badge.svg)](https://gitcode.com/x-extends/vxe-pc-ui)
8
8
  [![npm version](https://img.shields.io/npm/v/vxe-pc-ui.svg?style=flat-square)](https://www.npmjs.com/package/vxe-pc-ui)
9
9
  [![NodeJS with Webpack](https://github.com/x-extends/vxe-pc-ui/actions/workflows/webpack.yml/badge.svg)](https://github.com/x-extends/vxe-pc-ui/actions/workflows/webpack.yml)
10
10
  [![npm downloads](https://img.shields.io/npm/dt/vxe-pc-ui.svg?style=flat-square)](https://npm-stat.com/charts.html?package=vxe-pc-ui)
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.16.7"}`;
84
+ const uiVersion = `ui v${"4.16.9"}`;
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}` : '';
@@ -95,7 +95,7 @@ function createComponentLog(name) {
95
95
  const warnLog$h = log.create('warn', uiVersion);
96
96
  log.create('error', uiVersion);
97
97
 
98
- const version = "4.16.7";
98
+ const version = "4.16.9";
99
99
  VxeUI.uiVersion = version;
100
100
  VxeUI.dynamicApp = dynamicApp;
101
101
  function config(options) {
@@ -11732,6 +11732,7 @@ function createInternalData$i() {
11732
11732
  selectCheckboxMaps: {},
11733
11733
  treeExpandedMaps: {},
11734
11734
  treeExpandLazyLoadedMaps: {}
11735
+ // isUpdateMode: false
11735
11736
  };
11736
11737
  }
11737
11738
  var VxeCascaderComponent = defineVxeComponent({
@@ -11994,6 +11995,20 @@ var VxeCascaderComponent = defineVxeComponent({
11994
11995
  const nodeKey = node[valueField];
11995
11996
  return enNodeValue(nodeKey);
11996
11997
  };
11998
+ const isPathInTree = (treeData, pathIds) => {
11999
+ if (!pathIds || !pathIds.length) {
12000
+ return false;
12001
+ }
12002
+ let currentNodes = treeData;
12003
+ for (const nodeid of pathIds) {
12004
+ const found = currentNodes.find(node => getNodeId(node) === nodeid);
12005
+ if (!found) {
12006
+ return false;
12007
+ }
12008
+ currentNodes = found.children || [];
12009
+ }
12010
+ return true;
12011
+ };
11997
12012
  const isCheckedByCheckboxNodeId = (nodeid) => {
11998
12013
  const { updateCheckboxFlag } = reactData;
11999
12014
  const { selectCheckboxMaps } = internalData;
@@ -12187,7 +12202,7 @@ var VxeCascaderComponent = defineVxeComponent({
12187
12202
  if (transform) {
12188
12203
  treeList = XEUtils.searchTree(treeFullData, handleSearch, {
12189
12204
  original: true,
12190
- isEvery: true,
12205
+ isEvery: false,
12191
12206
  children: childrenField,
12192
12207
  mapChildren: mapChildrenField
12193
12208
  });
@@ -12207,7 +12222,7 @@ var VxeCascaderComponent = defineVxeComponent({
12207
12222
  if (transform) {
12208
12223
  treeList = XEUtils.searchTree(treeFullData, () => true, {
12209
12224
  original: true,
12210
- isEvery: true,
12225
+ isEvery: false,
12211
12226
  children: childrenField,
12212
12227
  mapChildren: mapChildrenField
12213
12228
  });
@@ -12300,17 +12315,26 @@ var VxeCascaderComponent = defineVxeComponent({
12300
12315
  }
12301
12316
  const triggerSearchEvent = XEUtils.debounce(() => {
12302
12317
  handleData(true);
12303
- updateModelChecked();
12318
+ updateCheckboxStatus();
12319
+ const { currentItems } = reactData;
12320
+ const { afterTreeList } = internalData;
12304
12321
  const filterOpts = computeFilterOpts.value;
12305
12322
  const { autoExpandMode } = filterOpts;
12306
- const { afterTreeList } = internalData;
12307
- // 默认展开第
12308
- if (autoExpandMode === 'first' || autoExpandMode === 'last') {
12309
- const stItems = handleHasChildNodeIds(afterTreeList, autoExpandMode);
12310
- reactData.currentItems = stItems;
12311
- }
12312
- else {
12313
- handleCurrentItems();
12323
+ // 如果当前不在列表情况下,触发默认行为
12324
+ if (!isPathInTree(afterTreeList, currentItems)) {
12325
+ // 默认展开
12326
+ if (autoExpandMode === 'first' || autoExpandMode === 'last') {
12327
+ const stItems = handleHasChildNodeIds(afterTreeList, autoExpandMode);
12328
+ const expandedMaps = {};
12329
+ stItems.forEach(nodeid => {
12330
+ expandedMaps[nodeid] = true;
12331
+ });
12332
+ internalData.treeExpandedMaps = expandedMaps;
12333
+ reactData.currentItems = stItems;
12334
+ }
12335
+ else {
12336
+ handleCurrentItems();
12337
+ }
12314
12338
  }
12315
12339
  updateCurrentChunk();
12316
12340
  }, 350, { trailing: true });
@@ -12454,6 +12478,7 @@ var VxeCascaderComponent = defineVxeComponent({
12454
12478
  };
12455
12479
  const setCurrentNode = (node) => {
12456
12480
  reactData.currentNode = node;
12481
+ updateCurrentChunk();
12457
12482
  return nextTick();
12458
12483
  };
12459
12484
  const setAllCheckboxNode = (checked) => {
@@ -12492,6 +12517,7 @@ var VxeCascaderComponent = defineVxeComponent({
12492
12517
  };
12493
12518
  const changeEvent = (evnt, selectValue, node) => {
12494
12519
  const value = XEUtils.isArray(selectValue) ? selectValue.map(deNodeValue) : deNodeValue(selectValue);
12520
+ internalData.isUpdateMode = true;
12495
12521
  emitModel(value);
12496
12522
  if (value !== props.modelValue) {
12497
12523
  dispatchEvent('change', { value, node, option: node }, evnt);
@@ -12602,9 +12628,10 @@ var VxeCascaderComponent = defineVxeComponent({
12602
12628
  reactData.currentNode = node;
12603
12629
  dispatchEvent('current-change', { node, checked: isChecked }, evnt);
12604
12630
  };
12605
- const changeRadioEvent = (evnt, node) => {
12631
+ const changeRadioEvent = (evnt, node, chunks, chunkIndex) => {
12606
12632
  evnt.preventDefault();
12607
12633
  evnt.stopPropagation();
12634
+ const { currentItems } = reactData;
12608
12635
  const { nodeMaps } = internalData;
12609
12636
  const radioOpts = computeRadioOpts.value;
12610
12637
  const childrenField = computeChildrenField.value;
@@ -12624,6 +12651,10 @@ var VxeCascaderComponent = defineVxeComponent({
12624
12651
  const value = nodeid;
12625
12652
  reactData.selectRadioKey = value;
12626
12653
  changeEvent(evnt, value, node);
12654
+ if (!currentItems.includes(nodeid)) {
12655
+ changeCurrentEvent(evnt, node);
12656
+ toggleExpandEvent(evnt, node, chunks, chunkIndex);
12657
+ }
12627
12658
  hideOptionPanel(evnt);
12628
12659
  };
12629
12660
  const handleAsyncTreeExpandChilds = (node) => {
@@ -12746,7 +12777,6 @@ var VxeCascaderComponent = defineVxeComponent({
12746
12777
  handleBaseTreeExpand([node], expanded);
12747
12778
  }
12748
12779
  setCurrentNode(node);
12749
- updateCurrentChunk();
12750
12780
  dispatchEvent('node-expand', { node, expanded }, evnt);
12751
12781
  };
12752
12782
  const updateCheckboxStatus = () => {
@@ -12855,9 +12885,11 @@ var VxeCascaderComponent = defineVxeComponent({
12855
12885
  reactData.updateCheckboxFlag++;
12856
12886
  }
12857
12887
  };
12858
- const changeCheckboxEvent = (evnt, node) => {
12888
+ const changeCheckboxEvent = (evnt, node, chunks, chunkIndex) => {
12859
12889
  evnt.preventDefault();
12860
12890
  evnt.stopPropagation();
12891
+ // const { filterable } = props
12892
+ const { currentItems } = reactData;
12861
12893
  const { selectCheckboxMaps, nodeMaps } = internalData;
12862
12894
  const childrenField = computeChildrenField.value;
12863
12895
  const mapChildrenField = computeMapChildrenField.value;
@@ -12883,11 +12915,11 @@ var VxeCascaderComponent = defineVxeComponent({
12883
12915
  selectCheckboxMaps[nodeid] = node;
12884
12916
  }
12885
12917
  if (!checkStrictly) {
12886
- XEUtils.eachTree(XEUtils.get(node, transform ? mapChildrenField : childrenField), (childNode) => {
12918
+ XEUtils.eachTree(childList, (childNode) => {
12887
12919
  const childNodeid = getNodeId(childNode);
12888
12920
  if (isChecked) {
12889
12921
  if (!selectCheckboxMaps[childNodeid]) {
12890
- selectCheckboxMaps[childNodeid] = true;
12922
+ selectCheckboxMaps[childNodeid] = childNode;
12891
12923
  }
12892
12924
  }
12893
12925
  else {
@@ -12897,11 +12929,16 @@ var VxeCascaderComponent = defineVxeComponent({
12897
12929
  }
12898
12930
  }, { children: transform ? mapChildrenField : childrenField });
12899
12931
  }
12932
+ selectCheckboxMaps[nodeid] = node;
12900
12933
  reactData.updateCheckboxFlag++;
12901
12934
  updateCheckboxStatus();
12902
12935
  const nodeids = XEUtils.keys(selectCheckboxMaps);
12903
12936
  const value = nodeids;
12904
12937
  changeEvent(evnt, value, node);
12938
+ if (!currentItems.includes(nodeid)) {
12939
+ changeCurrentEvent(evnt, node);
12940
+ toggleExpandEvent(evnt, node, chunks, chunkIndex);
12941
+ }
12905
12942
  };
12906
12943
  const handleNodeClickEvent = (evnt, node, chunks, chunkIndex) => {
12907
12944
  const { multiple, showCheckbox, showRadio } = props;
@@ -12925,13 +12962,13 @@ var VxeCascaderComponent = defineVxeComponent({
12925
12962
  if (multiple) {
12926
12963
  if (checkboxOpts.trigger === 'node' || (!showCheckbox && (!childList || !childList.length))) {
12927
12964
  triggerCheckbox = true;
12928
- changeCheckboxEvent(evnt, node);
12965
+ changeCheckboxEvent(evnt, node, chunks, chunkIndex);
12929
12966
  }
12930
12967
  }
12931
12968
  else {
12932
12969
  if (radioOpts.trigger === 'node' || (!showRadio && (!childList || !childList.length))) {
12933
12970
  triggerRadio = true;
12934
- changeRadioEvent(evnt, node);
12971
+ changeRadioEvent(evnt, node, chunks, chunkIndex);
12935
12972
  }
12936
12973
  }
12937
12974
  dispatchEvent('node-click', { node, triggerCurrent, triggerRadio, triggerCheckbox, triggerExpand }, evnt);
@@ -13056,7 +13093,7 @@ var VxeCascaderComponent = defineVxeComponent({
13056
13093
  }
13057
13094
  return true;
13058
13095
  };
13059
- const renderRadio = (node, isExistChild, nLevel, isChecked) => {
13096
+ const renderRadio = (node, isExistChild, nLevel, isChecked, chunks, chunkIndex) => {
13060
13097
  const { showRadio } = props;
13061
13098
  const radioOpts = computeRadioOpts.value;
13062
13099
  const { checkMode, checkMethod, visibleMode, visibleMethod } = radioOpts;
@@ -13070,7 +13107,7 @@ var VxeCascaderComponent = defineVxeComponent({
13070
13107
  }],
13071
13108
  onClick: (evnt) => {
13072
13109
  if (!isDisabled) {
13073
- changeRadioEvent(evnt, node);
13110
+ changeRadioEvent(evnt, node, chunks, chunkIndex);
13074
13111
  }
13075
13112
  }
13076
13113
  }, [
@@ -13081,7 +13118,7 @@ var VxeCascaderComponent = defineVxeComponent({
13081
13118
  }
13082
13119
  return renderEmptyElement($xeCascader);
13083
13120
  };
13084
- const renderCheckbox = (node, isExistChild, nLevel, isChecked, isIndeterminate) => {
13121
+ const renderCheckbox = (node, isExistChild, nLevel, isChecked, isIndeterminate, chunks, chunkIndex) => {
13085
13122
  const { showCheckbox } = props;
13086
13123
  const checkboxOpts = computeCheckboxOpts.value;
13087
13124
  const { checkMode, checkMethod, visibleMode, visibleMethod } = checkboxOpts;
@@ -13096,7 +13133,7 @@ var VxeCascaderComponent = defineVxeComponent({
13096
13133
  }],
13097
13134
  onClick: (evnt) => {
13098
13135
  if (!isDisabled) {
13099
- changeCheckboxEvent(evnt, node);
13136
+ changeCheckboxEvent(evnt, node, chunks, chunkIndex);
13100
13137
  }
13101
13138
  }
13102
13139
  }, [
@@ -13164,7 +13201,7 @@ var VxeCascaderComponent = defineVxeComponent({
13164
13201
  handleNodeClickEvent(evnt, node, chunks, chunkIndex);
13165
13202
  }
13166
13203
  }, [
13167
- multiple ? renderCheckbox(node, isExistChild, nLevel, isCheckboxChecked, isIndeterminate) : renderRadio(node, isExistChild, nLevel, isRadioChecked),
13204
+ multiple ? renderCheckbox(node, isExistChild, nLevel, isCheckboxChecked, isIndeterminate, chunks, chunkIndex) : renderRadio(node, isExistChild, nLevel, isRadioChecked, chunks, chunkIndex),
13168
13205
  h('div', {
13169
13206
  class: 'vxe-cascader-chunk--node-item-inner'
13170
13207
  }, [
@@ -13385,9 +13422,12 @@ var VxeCascaderComponent = defineVxeComponent({
13385
13422
  ]);
13386
13423
  };
13387
13424
  watch(() => props.modelValue, () => {
13388
- updateModelChecked();
13389
- handleCurrentItems();
13390
- updateCurrentChunk();
13425
+ if (!internalData.isUpdateMode) {
13426
+ updateModelChecked();
13427
+ handleCurrentItems();
13428
+ updateCurrentChunk();
13429
+ }
13430
+ internalData.isUpdateMode = false;
13391
13431
  });
13392
13432
  watch(() => props.options, () => {
13393
13433
  cacheNodeMap();
@@ -13837,6 +13877,7 @@ var VxeCheckboxGroupComponent = defineVxeComponent({
13837
13877
  type: Boolean,
13838
13878
  default: null
13839
13879
  },
13880
+ type: String,
13840
13881
  disabled: {
13841
13882
  type: Boolean,
13842
13883
  default: null
@@ -13996,7 +14037,7 @@ var VxeCheckboxGroupComponent = defineVxeComponent({
13996
14037
  };
13997
14038
  Object.assign($xeCheckboxGroup, checkboxGroupMethods, checkboxGroupPrivateMethods);
13998
14039
  const renderVN = () => {
13999
- const { status, options } = props;
14040
+ const { status, options, type } = props;
14000
14041
  const defaultSlot = slots.default;
14001
14042
  const valueField = computeValueField.value;
14002
14043
  const labelField = computeLabelField.value;
@@ -14005,8 +14046,9 @@ var VxeCheckboxGroupComponent = defineVxeComponent({
14005
14046
  const titleField = computeTitleField.value;
14006
14047
  const isReadonly = computeIsReadonly.value;
14007
14048
  const isDisabled = computeIsDisabled.value;
14049
+ const btnComp = type === 'button' ? VxeCheckboxButton : VxeCheckbox;
14008
14050
  return h('div', {
14009
- class: ['vxe-checkbox-group', {
14051
+ class: ['vxe-checkbox-group', `type--${type === 'button' ? type : ''}`, {
14010
14052
  [`theme--${status}`]: status,
14011
14053
  'is--readonly': isReadonly,
14012
14054
  'is--disabled': isDisabled
@@ -14015,7 +14057,7 @@ var VxeCheckboxGroupComponent = defineVxeComponent({
14015
14057
  ? defaultSlot({})
14016
14058
  : (options
14017
14059
  ? options.map(item => {
14018
- return h(VxeCheckboxComponent, {
14060
+ return h(btnComp, {
14019
14061
  key: item[valueField],
14020
14062
  checkedValue: item[valueField],
14021
14063
  content: item[labelField],
@@ -22055,18 +22097,26 @@ var VxeDateRangePickerComponent = defineVxeComponent({
22055
22097
  hidePanel();
22056
22098
  };
22057
22099
  const startPanelChangeEvent = (params) => {
22100
+ const { paneStartVal } = reactData;
22058
22101
  const { selectStatus } = internalData;
22059
22102
  const { value, currValue, $event } = params;
22060
22103
  const paneVals = value ? (XEUtils.isString(value) ? value.split(',') : [value]) : [];
22061
22104
  let startValue = '';
22062
22105
  let endValue = '';
22063
22106
  if (selectStatus) {
22064
- startValue = paneVals[0];
22065
- if (paneVals[1]) {
22066
- endValue = paneVals[1];
22107
+ // 如果选择同一天
22108
+ if (!value && currValue === paneStartVal[0]) {
22109
+ startValue = currValue;
22110
+ endValue = currValue;
22067
22111
  }
22068
22112
  else {
22069
- endValue = reactData.selectEdValue;
22113
+ startValue = paneVals[0];
22114
+ if (paneVals[1]) {
22115
+ endValue = paneVals[1];
22116
+ }
22117
+ else {
22118
+ endValue = reactData.selectEdValue;
22119
+ }
22070
22120
  }
22071
22121
  }
22072
22122
  else {
@@ -22089,19 +22139,27 @@ var VxeDateRangePickerComponent = defineVxeComponent({
22089
22139
  });
22090
22140
  };
22091
22141
  const endPanelChangeEvent = (params) => {
22142
+ const { paneEndVal } = reactData;
22092
22143
  const { selectStatus } = internalData;
22093
22144
  const { value, currValue, $event } = params;
22094
22145
  const paneVals = value ? (XEUtils.isString(value) ? value.split(',') : [value]) : [];
22095
22146
  let startValue = '';
22096
22147
  let endValue = '';
22097
22148
  if (selectStatus) {
22098
- endValue = paneVals[0];
22099
- if (paneVals[1]) {
22100
- startValue = paneVals[0];
22101
- endValue = paneVals[1];
22149
+ // 如果选择同一天
22150
+ if (!value && currValue === paneEndVal[1]) {
22151
+ startValue = currValue;
22152
+ endValue = currValue;
22102
22153
  }
22103
22154
  else {
22104
- startValue = reactData.selectStValue;
22155
+ endValue = paneVals[0];
22156
+ if (paneVals[1]) {
22157
+ startValue = paneVals[0];
22158
+ endValue = paneVals[1];
22159
+ }
22160
+ else {
22161
+ startValue = reactData.selectStValue;
22162
+ }
22105
22163
  }
22106
22164
  }
22107
22165
  else {
@@ -28572,6 +28630,7 @@ var VxeMenuComponent = defineVxeComponent({
28572
28630
  const { accordion } = props;
28573
28631
  const { menuEffectMaps } = internalData;
28574
28632
  const { itemId, hasChild, isExpand } = item;
28633
+ const isCollapsed = computeIsCollapsed.value;
28575
28634
  const expanded = !isExpand;
28576
28635
  if (hasChild) {
28577
28636
  evnt.stopPropagation();
@@ -28587,9 +28646,9 @@ var VxeMenuComponent = defineVxeComponent({
28587
28646
  });
28588
28647
  }
28589
28648
  item.isExpand = expanded;
28590
- const el = refElem.value;
28591
- if (el) {
28592
- const nemuEl = el.querySelector(`.vxe-menu--item-wrapper[data-menu-id="${itemId}"]`);
28649
+ const wrapperEl = isCollapsed ? refCollapseElem.value : refElem.value;
28650
+ if (wrapperEl) {
28651
+ const nemuEl = wrapperEl.querySelector(`.vxe-menu--item-wrapper[data-menu-id="${itemId}"]`);
28593
28652
  const groupEl = nemuEl ? nemuEl.querySelector('.vxe-menu--item-group') : null;
28594
28653
  if (groupEl) {
28595
28654
  if (expanded) {
@@ -33401,6 +33460,7 @@ var VxePasswordInputComponent = defineVxeComponent({
33401
33460
  const blurEvent = (evnt) => {
33402
33461
  const { inputValue } = reactData;
33403
33462
  const value = inputValue;
33463
+ reactData.isActivated = false;
33404
33464
  $xePasswordInput.dispatchEvent('blur', { value }, evnt);
33405
33465
  // 自动更新校验状态
33406
33466
  if ($xeForm && formItemInfo) {
@@ -35186,9 +35246,9 @@ var VxeRadioGroupComponent = defineVxeComponent({
35186
35246
  const disabledField = computeDisabledField.value;
35187
35247
  const iconField = computeIconField.value;
35188
35248
  const titleField = computeTitleField.value;
35189
- const btnComp = type === 'button' ? VxeRadioButtonComponent : VxeRadioComponent;
35249
+ const btnComp = type === 'button' ? VxeRadioButton : VxeRadio;
35190
35250
  return h('div', {
35191
- class: ['vxe-radio-group', {
35251
+ class: ['vxe-radio-group', `type--${type === 'button' ? type : ''}`, {
35192
35252
  [`theme--${status}`]: status,
35193
35253
  [`size--${vSize}`]: vSize
35194
35254
  }]
@@ -40625,6 +40685,10 @@ var VxeTreeComponent = defineVxeComponent({
40625
40685
  type: [String, Number],
40626
40686
  default: () => getConfig().tree.minHeight
40627
40687
  },
40688
+ emptyText: {
40689
+ type: [String, Number],
40690
+ default: () => getConfig().tree.emptyText
40691
+ },
40628
40692
  loading: Boolean,
40629
40693
  loadingConfig: Object,
40630
40694
  accordion: {
@@ -43640,14 +43704,21 @@ var VxeTreeComponent = defineVxeComponent({
43640
43704
  ]);
43641
43705
  };
43642
43706
  const renderList = (treeList) => {
43643
- const { transform } = props;
43707
+ const { transform, emptyText } = props;
43644
43708
  const { treeExpandedMaps } = internalData;
43645
43709
  const childrenField = computeChildrenField.value;
43710
+ const emptySlot = slots.empty;
43646
43711
  if (!treeList.length) {
43647
43712
  return [
43648
43713
  h('div', {
43649
43714
  class: 'vxe-tree--empty-placeholder'
43650
- }, getI18n('vxe.tree.searchEmpty'))
43715
+ }, emptySlot
43716
+ ? emptySlot({})
43717
+ : [
43718
+ h('div', {
43719
+ class: 'vxe-tree--empty-placeholder-content'
43720
+ }, getText(emptyText || getI18n('vxe.tree.searchEmpty')))
43721
+ ])
43651
43722
  ];
43652
43723
  }
43653
43724
  const nodeVNs = [];