@vtx/components 3.1.89 → 3.1.91

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 (308) hide show
  1. package/lib/_util/filterSpecialCharacters.js +44 -55
  2. package/lib/_util/filterSpecialCharacters.js.map +1 -1
  3. package/lib/_util/getComponentProps.js +4 -1
  4. package/lib/_util/getComponentProps.js.map +1 -1
  5. package/lib/_util/getToken.js +15 -7
  6. package/lib/_util/getToken.js.map +1 -1
  7. package/lib/_util/getUrlParam.js +8 -1
  8. package/lib/_util/getUrlParam.js.map +1 -1
  9. package/lib/_util/isFunction.js +1 -0
  10. package/lib/_util/isFunction.js.map +1 -1
  11. package/lib/_util/isObject.js +1 -0
  12. package/lib/_util/isObject.js.map +1 -1
  13. package/lib/_util/useColSize.js +12 -2
  14. package/lib/_util/useColSize.js.map +1 -1
  15. package/lib/_util/useInterval.js +3 -0
  16. package/lib/_util/useInterval.js.map +1 -1
  17. package/lib/_util/useSet.js +39 -23
  18. package/lib/_util/useSet.js.map +1 -1
  19. package/lib/config.js +2 -1
  20. package/lib/config.js.map +1 -1
  21. package/lib/index.js +29 -0
  22. package/lib/index.js.map +1 -1
  23. package/lib/style/index.less +2 -2
  24. package/lib/style/themes/compact.less +1 -1
  25. package/lib/style/themes/dark.less +9 -9
  26. package/lib/style/themes/default.less +7 -7
  27. package/lib/style/themes/index.less +1 -1
  28. package/lib/style/themes/variable.less +5 -5
  29. package/lib/vtx-color-picker/index.js +26 -9
  30. package/lib/vtx-color-picker/index.js.map +1 -1
  31. package/lib/vtx-color-picker/style/css.js +2 -0
  32. package/lib/vtx-color-picker/style/css.js.map +1 -1
  33. package/lib/vtx-color-picker/style/index.js +2 -0
  34. package/lib/vtx-color-picker/style/index.js.map +1 -1
  35. package/lib/vtx-combogrid/Combogrid.js +86 -46
  36. package/lib/vtx-combogrid/Combogrid.js.map +1 -1
  37. package/lib/vtx-combogrid/index.js +58 -31
  38. package/lib/vtx-combogrid/index.js.map +1 -1
  39. package/lib/vtx-combogrid/style/css.js +7 -0
  40. package/lib/vtx-combogrid/style/css.js.map +1 -1
  41. package/lib/vtx-combogrid/style/index.js +7 -0
  42. package/lib/vtx-combogrid/style/index.js.map +1 -1
  43. package/lib/vtx-datagrid/Alert.js +14 -5
  44. package/lib/vtx-datagrid/Alert.js.map +1 -1
  45. package/lib/vtx-datagrid/ColumnSetting.js +80 -37
  46. package/lib/vtx-datagrid/ColumnSetting.js.map +1 -1
  47. package/lib/vtx-datagrid/ResizeableTitle.js +15 -3
  48. package/lib/vtx-datagrid/ResizeableTitle.js.map +1 -1
  49. package/lib/vtx-datagrid/index.js +190 -116
  50. package/lib/vtx-datagrid/index.js.map +1 -1
  51. package/lib/vtx-datagrid/renderColumnButtons.js +38 -7
  52. package/lib/vtx-datagrid/renderColumnButtons.js.map +1 -1
  53. package/lib/vtx-datagrid/style/css.js +10 -0
  54. package/lib/vtx-datagrid/style/css.js.map +1 -1
  55. package/lib/vtx-datagrid/style/index.js +10 -0
  56. package/lib/vtx-datagrid/style/index.js.map +1 -1
  57. package/lib/vtx-date-picker/QdatePicker.js +51 -21
  58. package/lib/vtx-date-picker/QdatePicker.js.map +1 -1
  59. package/lib/vtx-date-picker/generatePicker.js +65 -24
  60. package/lib/vtx-date-picker/generatePicker.js.map +1 -1
  61. package/lib/vtx-date-picker/index.js +7 -1
  62. package/lib/vtx-date-picker/index.js.map +1 -1
  63. package/lib/vtx-date-picker/style/css.js +1 -0
  64. package/lib/vtx-date-picker/style/css.js.map +1 -1
  65. package/lib/vtx-date-picker/style/index.js +1 -0
  66. package/lib/vtx-date-picker/style/index.js.map +1 -1
  67. package/lib/vtx-date-picker/style/index.less +39 -39
  68. package/lib/vtx-editor/index.js +28 -9
  69. package/lib/vtx-editor/index.js.map +1 -1
  70. package/lib/vtx-editor/style/css.js +1 -0
  71. package/lib/vtx-editor/style/css.js.map +1 -1
  72. package/lib/vtx-editor/style/index.js +1 -0
  73. package/lib/vtx-editor/style/index.js.map +1 -1
  74. package/lib/vtx-editor/style/index.less +8 -8
  75. package/lib/vtx-ellipsis-text/index.js +27 -14
  76. package/lib/vtx-ellipsis-text/index.js.map +1 -1
  77. package/lib/vtx-ellipsis-text/style/css.js +1 -0
  78. package/lib/vtx-ellipsis-text/style/css.js.map +1 -1
  79. package/lib/vtx-ellipsis-text/style/index.js +1 -0
  80. package/lib/vtx-ellipsis-text/style/index.js.map +1 -1
  81. package/lib/vtx-ellipsis-text/style/index.less +13 -13
  82. package/lib/vtx-export/index.js +61 -28
  83. package/lib/vtx-export/index.js.map +1 -1
  84. package/lib/vtx-export/style/css.js +5 -0
  85. package/lib/vtx-export/style/css.js.map +1 -1
  86. package/lib/vtx-export/style/index.js +5 -0
  87. package/lib/vtx-export/style/index.js.map +1 -1
  88. package/lib/vtx-export-async/History.js +100 -59
  89. package/lib/vtx-export-async/History.js.map +1 -1
  90. package/lib/vtx-export-async/index.js +105 -64
  91. package/lib/vtx-export-async/index.js.map +1 -1
  92. package/lib/vtx-export-async/style/css.js.map +1 -1
  93. package/lib/vtx-export-async/style/index.js.map +1 -1
  94. package/lib/vtx-export-async/util.js +13 -2
  95. package/lib/vtx-export-async/util.js.map +1 -1
  96. package/lib/vtx-form-layout/Card.js +33 -11
  97. package/lib/vtx-form-layout/Card.js.map +1 -1
  98. package/lib/vtx-form-layout/Divider.js +11 -5
  99. package/lib/vtx-form-layout/Divider.js.map +1 -1
  100. package/lib/vtx-form-layout/FormItem.js +33 -11
  101. package/lib/vtx-form-layout/FormItem.js.map +1 -1
  102. package/lib/vtx-form-layout/Pane.js +9 -3
  103. package/lib/vtx-form-layout/Pane.js.map +1 -1
  104. package/lib/vtx-form-layout/Row.js +8 -1
  105. package/lib/vtx-form-layout/Row.js.map +1 -1
  106. package/lib/vtx-form-layout/context.js +4 -1
  107. package/lib/vtx-form-layout/context.js.map +1 -1
  108. package/lib/vtx-form-layout/demo/Modal.less +43 -43
  109. package/lib/vtx-form-layout/index.js +24 -9
  110. package/lib/vtx-form-layout/index.js.map +1 -1
  111. package/lib/vtx-form-layout/style/css.js +7 -0
  112. package/lib/vtx-form-layout/style/css.js.map +1 -1
  113. package/lib/vtx-form-layout/style/index.js +7 -0
  114. package/lib/vtx-form-layout/style/index.js.map +1 -1
  115. package/lib/vtx-form-layout/style/index.less +216 -216
  116. package/lib/vtx-image/Image.js +113 -73
  117. package/lib/vtx-image/Image.js.map +1 -1
  118. package/lib/vtx-image/Preview.js +59 -30
  119. package/lib/vtx-image/Preview.js.map +1 -1
  120. package/lib/vtx-image/PreviewGroup.js +47 -17
  121. package/lib/vtx-image/PreviewGroup.js.map +1 -1
  122. package/lib/vtx-image/index.js +11 -4
  123. package/lib/vtx-image/index.js.map +1 -1
  124. package/lib/vtx-image/style/css.js +1 -0
  125. package/lib/vtx-image/style/css.js.map +1 -1
  126. package/lib/vtx-image/style/index.js +1 -0
  127. package/lib/vtx-image/style/index.js.map +1 -1
  128. package/lib/vtx-import/index.js +78 -45
  129. package/lib/vtx-import/index.js.map +1 -1
  130. package/lib/vtx-import/result.js +28 -10
  131. package/lib/vtx-import/result.js.map +1 -1
  132. package/lib/vtx-import/style/css.js +3 -0
  133. package/lib/vtx-import/style/css.js.map +1 -1
  134. package/lib/vtx-import/style/index.js +3 -0
  135. package/lib/vtx-import/style/index.js.map +1 -1
  136. package/lib/vtx-import/style/index.less +8 -8
  137. package/lib/vtx-import2/CheckResult.js +8 -1
  138. package/lib/vtx-import2/CheckResult.js.map +1 -1
  139. package/lib/vtx-import2/Content.js +33 -11
  140. package/lib/vtx-import2/Content.js.map +1 -1
  141. package/lib/vtx-import2/DownloadSvg.js +6 -1
  142. package/lib/vtx-import2/DownloadSvg.js.map +1 -1
  143. package/lib/vtx-import2/ImportResult.js +14 -7
  144. package/lib/vtx-import2/ImportResult.js.map +1 -1
  145. package/lib/vtx-import2/UploadSvg.js +6 -1
  146. package/lib/vtx-import2/UploadSvg.js.map +1 -1
  147. package/lib/vtx-import2/index.js +107 -51
  148. package/lib/vtx-import2/index.js.map +1 -1
  149. package/lib/vtx-import2/style/css.js +3 -0
  150. package/lib/vtx-import2/style/css.js.map +1 -1
  151. package/lib/vtx-import2/style/index.js +3 -0
  152. package/lib/vtx-import2/style/index.js.map +1 -1
  153. package/lib/vtx-import2/style/index.less +102 -102
  154. package/lib/vtx-input/TextArea.js +27 -10
  155. package/lib/vtx-input/TextArea.js.map +1 -1
  156. package/lib/vtx-input/index.js +45 -20
  157. package/lib/vtx-input/index.js.map +1 -1
  158. package/lib/vtx-input/style/css.js +1 -0
  159. package/lib/vtx-input/style/css.js.map +1 -1
  160. package/lib/vtx-input/style/index.js +1 -0
  161. package/lib/vtx-input/style/index.js.map +1 -1
  162. package/lib/vtx-input/style/index.less +24 -24
  163. package/lib/vtx-input/useLength.js +20 -7
  164. package/lib/vtx-input/useLength.js.map +1 -1
  165. package/lib/vtx-modal/Title.js +8 -2
  166. package/lib/vtx-modal/Title.js.map +1 -1
  167. package/lib/vtx-modal/index.js +82 -49
  168. package/lib/vtx-modal/index.js.map +1 -1
  169. package/lib/vtx-modal/style/css.js +1 -0
  170. package/lib/vtx-modal/style/css.js.map +1 -1
  171. package/lib/vtx-modal/style/index.js +1 -0
  172. package/lib/vtx-modal/style/index.js.map +1 -1
  173. package/lib/vtx-page-layout/Basic.js +8 -3
  174. package/lib/vtx-page-layout/Basic.js.map +1 -1
  175. package/lib/vtx-page-layout/Content.js +26 -15
  176. package/lib/vtx-page-layout/Content.js.map +1 -1
  177. package/lib/vtx-page-layout/Pane.js +12 -3
  178. package/lib/vtx-page-layout/Pane.js.map +1 -1
  179. package/lib/vtx-page-layout/TableLayout.js +60 -30
  180. package/lib/vtx-page-layout/TableLayout.js.map +1 -1
  181. package/lib/vtx-page-layout/TableWrap.js +22 -11
  182. package/lib/vtx-page-layout/TableWrap.js.map +1 -1
  183. package/lib/vtx-page-layout/container.js +51 -23
  184. package/lib/vtx-page-layout/container.js.map +1 -1
  185. package/lib/vtx-page-layout/index.js +10 -1
  186. package/lib/vtx-page-layout/index.js.map +1 -1
  187. package/lib/vtx-page-layout/style/css.js.map +1 -1
  188. package/lib/vtx-page-layout/style/index.js.map +1 -1
  189. package/lib/vtx-page-layout/style/index.less +138 -138
  190. package/lib/vtx-rps-frame/index.js +57 -37
  191. package/lib/vtx-rps-frame/index.js.map +1 -1
  192. package/lib/vtx-rps-frame/style/css.js.map +1 -1
  193. package/lib/vtx-rps-frame/style/index.js.map +1 -1
  194. package/lib/vtx-scrollable-row/index.js +64 -30
  195. package/lib/vtx-scrollable-row/index.js.map +1 -1
  196. package/lib/vtx-scrollable-row/style/css.js.map +1 -1
  197. package/lib/vtx-scrollable-row/style/index.js.map +1 -1
  198. package/lib/vtx-scrollable-row/style/index.less +113 -113
  199. package/lib/vtx-search/VtxCol.js +26 -7
  200. package/lib/vtx-search/VtxCol.js.map +1 -1
  201. package/lib/vtx-search/VtxRow.js +14 -7
  202. package/lib/vtx-search/VtxRow.js.map +1 -1
  203. package/lib/vtx-search/index.js +106 -61
  204. package/lib/vtx-search/index.js.map +1 -1
  205. package/lib/vtx-search/style/css.js +4 -0
  206. package/lib/vtx-search/style/css.js.map +1 -1
  207. package/lib/vtx-search/style/index.js +4 -0
  208. package/lib/vtx-search/style/index.js.map +1 -1
  209. package/lib/vtx-search-map-input/index.js +93 -58
  210. package/lib/vtx-search-map-input/index.js.map +1 -1
  211. package/lib/vtx-search-map-input/style/css.js +2 -0
  212. package/lib/vtx-search-map-input/style/css.js.map +1 -1
  213. package/lib/vtx-search-map-input/style/index.js +2 -0
  214. package/lib/vtx-search-map-input/style/index.js.map +1 -1
  215. package/lib/vtx-select/index.js +91 -39
  216. package/lib/vtx-select/index.js.map +1 -1
  217. package/lib/vtx-select/style/css.js +8 -0
  218. package/lib/vtx-select/style/css.js.map +1 -1
  219. package/lib/vtx-select/style/index.js +8 -0
  220. package/lib/vtx-select/style/index.js.map +1 -1
  221. package/lib/vtx-select/style/index.less +68 -68
  222. package/lib/vtx-signature/index.js +33 -18
  223. package/lib/vtx-signature/index.js.map +1 -1
  224. package/lib/vtx-signature/style/css.js +2 -0
  225. package/lib/vtx-signature/style/css.js.map +1 -1
  226. package/lib/vtx-signature/style/index.js +2 -0
  227. package/lib/vtx-signature/style/index.js.map +1 -1
  228. package/lib/vtx-signature/style/index.less +33 -33
  229. package/lib/vtx-split-pane/Pane.js +22 -11
  230. package/lib/vtx-split-pane/Pane.js.map +1 -1
  231. package/lib/vtx-split-pane/Resizer.js +39 -19
  232. package/lib/vtx-split-pane/Resizer.js.map +1 -1
  233. package/lib/vtx-split-pane/SplitPane.js +107 -51
  234. package/lib/vtx-split-pane/SplitPane.js.map +1 -1
  235. package/lib/vtx-split-pane/index.js +6 -1
  236. package/lib/vtx-split-pane/index.js.map +1 -1
  237. package/lib/vtx-split-pane/style/css.js +3 -0
  238. package/lib/vtx-split-pane/style/css.js.map +1 -1
  239. package/lib/vtx-split-pane/style/index.js +3 -0
  240. package/lib/vtx-split-pane/style/index.js.map +1 -1
  241. package/lib/vtx-split-pane/style/index.less +76 -76
  242. package/lib/vtx-statistics-column/Back.js +9 -2
  243. package/lib/vtx-statistics-column/Back.js.map +1 -1
  244. package/lib/vtx-statistics-column/Item.js +30 -14
  245. package/lib/vtx-statistics-column/Item.js.map +1 -1
  246. package/lib/vtx-statistics-column/Total.js +30 -14
  247. package/lib/vtx-statistics-column/Total.js.map +1 -1
  248. package/lib/vtx-statistics-column/context.js +4 -1
  249. package/lib/vtx-statistics-column/context.js.map +1 -1
  250. package/lib/vtx-statistics-column/index.js +18 -1
  251. package/lib/vtx-statistics-column/index.js.map +1 -1
  252. package/lib/vtx-statistics-column/style/css.js +1 -0
  253. package/lib/vtx-statistics-column/style/css.js.map +1 -1
  254. package/lib/vtx-statistics-column/style/index.js +1 -0
  255. package/lib/vtx-statistics-column/style/index.js.map +1 -1
  256. package/lib/vtx-statistics-column/style/index.less +59 -59
  257. package/lib/vtx-time-picker/index.js +18 -4
  258. package/lib/vtx-time-picker/index.js.map +1 -1
  259. package/lib/vtx-time-picker/style/css.js.map +1 -1
  260. package/lib/vtx-time-picker/style/index.js.map +1 -1
  261. package/lib/vtx-tree/index.js +114 -49
  262. package/lib/vtx-tree/index.js.map +1 -1
  263. package/lib/vtx-tree/style/css.js +2 -0
  264. package/lib/vtx-tree/style/css.js.map +1 -1
  265. package/lib/vtx-tree/style/index.js +2 -0
  266. package/lib/vtx-tree/style/index.js.map +1 -1
  267. package/lib/vtx-tree/utils.js +27 -6
  268. package/lib/vtx-tree/utils.js.map +1 -1
  269. package/lib/vtx-tree-select/index.js +71 -27
  270. package/lib/vtx-tree-select/index.js.map +1 -1
  271. package/lib/vtx-tree-select/style/css.js +3 -0
  272. package/lib/vtx-tree-select/style/css.js.map +1 -1
  273. package/lib/vtx-tree-select/style/index.js +3 -0
  274. package/lib/vtx-tree-select/style/index.js.map +1 -1
  275. package/lib/vtx-upload/FilePreview.js +33 -15
  276. package/lib/vtx-upload/FilePreview.js.map +1 -1
  277. package/lib/vtx-upload/index.js +151 -78
  278. package/lib/vtx-upload/index.js.map +1 -1
  279. package/lib/vtx-upload/style/css.js +6 -0
  280. package/lib/vtx-upload/style/css.js.map +1 -1
  281. package/lib/vtx-upload/style/index.js +6 -0
  282. package/lib/vtx-upload/style/index.js.map +1 -1
  283. package/lib/vtx-upload/style/index.less +61 -61
  284. package/lib/vtx-wang-editor/index.js +116 -74
  285. package/lib/vtx-wang-editor/index.js.map +1 -1
  286. package/lib/vtx-wang-editor/style/css.js +1 -0
  287. package/lib/vtx-wang-editor/style/css.js.map +1 -1
  288. package/lib/vtx-wang-editor/style/index.js +1 -0
  289. package/lib/vtx-wang-editor/style/index.js.map +1 -1
  290. package/lib/vtx-wang-editor/style/index.less +12 -12
  291. package/lib/vtx-wang-editor/wangEditorUtil.js +136 -75
  292. package/lib/vtx-wang-editor/wangEditorUtil.js.map +1 -1
  293. package/lib/vtx-ztree/index.js +119 -69
  294. package/lib/vtx-ztree/index.js.map +1 -1
  295. package/lib/vtx-ztree/style/css.js +1 -0
  296. package/lib/vtx-ztree/style/css.js.map +1 -1
  297. package/lib/vtx-ztree/style/index.js +1 -0
  298. package/lib/vtx-ztree/style/index.js.map +1 -1
  299. package/lib/vtx-ztree/style/index.less +45 -45
  300. package/lib/vtx-ztree-select/index.js +144 -77
  301. package/lib/vtx-ztree-select/index.js.map +1 -1
  302. package/lib/vtx-ztree-select/style/css.js +3 -0
  303. package/lib/vtx-ztree-select/style/css.js.map +1 -1
  304. package/lib/vtx-ztree-select/style/index.css +5 -0
  305. package/lib/vtx-ztree-select/style/index.js +3 -0
  306. package/lib/vtx-ztree-select/style/index.js.map +1 -1
  307. package/lib/vtx-ztree-select/style/index.less +109 -107
  308. package/package.json +121 -121
@@ -1,55 +1,97 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
3
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports["default"] = void 0;
9
+
8
10
  var _react = _interopRequireDefault(require("react"));
11
+
9
12
  var _popover = _interopRequireDefault(require("antd/lib/popover"));
13
+
10
14
  var _input = _interopRequireDefault(require("antd/lib/input"));
15
+
11
16
  var _tag = _interopRequireDefault(require("antd/lib/tag"));
17
+
12
18
  var _CloseCircleFilled = _interopRequireDefault(require("@ant-design/icons/CloseCircleFilled"));
19
+
13
20
  var _DownOutlined = _interopRequireDefault(require("@ant-design/icons/DownOutlined"));
21
+
14
22
  var _lodash = _interopRequireDefault(require("lodash.isequal"));
23
+
15
24
  var _propTypes = _interopRequireDefault(require("prop-types"));
25
+
16
26
  var _classnames2 = _interopRequireDefault(require("classnames"));
27
+
17
28
  var _vtxZtree = _interopRequireDefault(require("../vtx-ztree"));
29
+
18
30
  var _icons = require("@ant-design/icons");
31
+
19
32
  var _button = _interopRequireDefault(require("antd/lib/button"));
33
+
20
34
  var _empty = _interopRequireDefault(require("antd/lib/empty"));
35
+
21
36
  var _excluded = ["children"];
37
+
22
38
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
39
+
23
40
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
41
+
24
42
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
43
+
25
44
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
45
+
26
46
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
47
+
27
48
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
49
+
28
50
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
29
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
51
+
52
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
53
+
30
54
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
55
+
31
56
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
32
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
33
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
34
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
57
+
58
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
59
+
60
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
61
+
62
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
63
+
35
64
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
36
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
65
+
66
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
67
+
37
68
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
38
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
39
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
40
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
69
+
70
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
71
+
72
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
73
+
74
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
75
+
41
76
  function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
77
+
42
78
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
43
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
79
+
80
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
81
+
44
82
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
45
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
46
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
47
- var VtxZtreeSelect = exports["default"] = /*#__PURE__*/function (_React$Component) {
83
+
84
+ var VtxZtreeSelect = /*#__PURE__*/function (_React$Component) {
48
85
  _inherits(VtxZtreeSelect, _React$Component);
86
+
87
+ var _super = _createSuper(VtxZtreeSelect);
88
+
49
89
  function VtxZtreeSelect(props) {
50
90
  var _this;
91
+
51
92
  _classCallCheck(this, VtxZtreeSelect);
52
- _this = _callSuper(this, VtxZtreeSelect, [props]);
93
+
94
+ _this = _super.call(this, props);
53
95
  _this.tree = null;
54
96
  _this.treeRefreshFlag = 1;
55
97
  _this.state = {
@@ -59,16 +101,16 @@ var VtxZtreeSelect = exports["default"] = /*#__PURE__*/function (_React$Componen
59
101
  inputRef: null
60
102
  };
61
103
  _this.keyNodesMapping = {};
104
+
62
105
  _this.getKeyNodesMapping();
106
+
63
107
  _this.TextEnum = _objectSpread({
64
108
  alreadyChooseText: '已选择',
65
109
  clearChoosedOptionsText: '清空已选项',
66
110
  emptyDescriptionText: '暂无数据'
67
111
  }, props.customEnumText || {});
68
112
  return _this;
69
- }
70
-
71
- // UNSAFE_componentWillReceiveProps(nextProps) {
113
+ } // UNSAFE_componentWillReceiveProps(nextProps) {
72
114
  // if (!isEqual(this.props.data, nextProps.data)) {
73
115
  // this.getKeyNodesMapping(nextProps.data);
74
116
  // }
@@ -76,14 +118,16 @@ var VtxZtreeSelect = exports["default"] = /*#__PURE__*/function (_React$Componen
76
118
  // this.treeRefreshFlag++;
77
119
  // }
78
120
  // }
79
-
80
121
  // 替换componentWillReceiveProps
122
+
123
+
81
124
  _createClass(VtxZtreeSelect, [{
82
125
  key: "componentDidUpdate",
83
126
  value: function componentDidUpdate(prevProps) {
84
127
  if (!(0, _lodash["default"])(this.props.data, prevProps.data)) {
85
128
  this.getKeyNodesMapping(this.props.data);
86
129
  }
130
+
87
131
  if (!(0, _lodash["default"])(this.props.expandedKeys, prevProps.expandedKeys)) {
88
132
  this.treeRefreshFlag++;
89
133
  }
@@ -93,11 +137,14 @@ var VtxZtreeSelect = exports["default"] = /*#__PURE__*/function (_React$Componen
93
137
  value: function getKeyNodesMapping(nodes) {
94
138
  var t = this;
95
139
  t.keyNodesMapping = {};
140
+
96
141
  (function genNodes(nodes) {
97
142
  nodes.map(function (item) {
98
143
  var children = item.children,
99
- rest = _objectWithoutProperties(item, _excluded);
144
+ rest = _objectWithoutProperties(item, _excluded);
145
+
100
146
  t.keyNodesMapping[item.key] = rest;
147
+
101
148
  if (Array.isArray(children) && children.length > 0) {
102
149
  genNodes(children);
103
150
  }
@@ -116,31 +163,38 @@ var VtxZtreeSelect = exports["default"] = /*#__PURE__*/function (_React$Componen
116
163
  this.tree.cancelSelectedNodes(this.props.value);
117
164
  }
118
165
  }
166
+
119
167
  this.props.onChange && this.props.onChange({
120
168
  nodes: [],
121
169
  keys: [],
122
170
  leafKeys: [],
123
171
  names: []
124
172
  });
173
+
125
174
  if (this.tree) {
126
175
  var _this$tree;
176
+
127
177
  this.setState({
128
178
  searchValue: ''
129
179
  });
130
- (_this$tree = this.tree) === null || _this$tree === void 0 || _this$tree.fuzzySearch('');
180
+ (_this$tree = this.tree) === null || _this$tree === void 0 ? void 0 : _this$tree.fuzzySearch('');
131
181
  }
132
182
  }
133
183
  }, {
134
184
  key: "clearKey",
135
185
  value: function clearKey(key) {
136
186
  var _this2 = this;
187
+
137
188
  var keyIndex = this.props.value.indexOf(key);
189
+
138
190
  if (keyIndex != -1) {
139
191
  var keyList = _toConsumableArray(this.props.value);
192
+
140
193
  keyList.splice(keyIndex, 1);
141
194
  var nodes = keyList.map(function (key) {
142
195
  return _this2.keyNodesMapping[key];
143
196
  });
197
+
144
198
  if (this.tree) {
145
199
  if (this.props.treeCheckable) {
146
200
  this.tree.checkNodes([key], false);
@@ -148,6 +202,7 @@ var VtxZtreeSelect = exports["default"] = /*#__PURE__*/function (_React$Componen
148
202
  this.tree.cancelSelectedNodes([key]);
149
203
  }
150
204
  }
205
+
151
206
  this.props.onChange && this.props.onChange({
152
207
  nodes: nodes,
153
208
  keys: keyList,
@@ -170,41 +225,42 @@ var VtxZtreeSelect = exports["default"] = /*#__PURE__*/function (_React$Componen
170
225
  }, {
171
226
  key: "render",
172
227
  value: function render() {
173
- var _data$;
174
- var t = this;
175
- // 必填参数
228
+ var _data$, _treeProps;
229
+
230
+ var t = this; // 必填参数
231
+
176
232
  var _t$props = t.props,
177
- data = _t$props.data,
178
- value = _t$props.value;
179
- // 可配参数
233
+ data = _t$props.data,
234
+ value = _t$props.value; // 可配参数
235
+
180
236
  var _t$props2 = t.props,
181
- _t$props2$prefixCls = _t$props2.prefixCls,
182
- prefixCls = _t$props2$prefixCls === void 0 ? 'vtx-ztree-select' : _t$props2$prefixCls,
183
- _t$props2$treeCheckab = _t$props2.treeCheckable,
184
- treeCheckable = _t$props2$treeCheckab === void 0 ? false : _t$props2$treeCheckab,
185
- _t$props2$treeDefault = _t$props2.treeDefaultExpandAll,
186
- treeDefaultExpandAll = _t$props2$treeDefault === void 0 ? false : _t$props2$treeDefault,
187
- _t$props2$multiple = _t$props2.multiple,
188
- multiple = _t$props2$multiple === void 0 ? false : _t$props2$multiple,
189
- _t$props2$showSearch = _t$props2.showSearch,
190
- showSearch = _t$props2$showSearch === void 0 ? true : _t$props2$showSearch,
191
- searchPlaceholder = _t$props2.searchPlaceholder,
192
- _t$props2$dropdownSty = _t$props2.dropdownStyle,
193
- dropdownStyle = _t$props2$dropdownSty === void 0 ? {} : _t$props2$dropdownSty,
194
- _t$props2$style = _t$props2.style,
195
- style = _t$props2$style === void 0 ? {} : _t$props2$style,
196
- _t$props2$disabled = _t$props2.disabled,
197
- disabled = _t$props2$disabled === void 0 ? false : _t$props2$disabled,
198
- _t$props2$refreshFlag = _t$props2.refreshFlag,
199
- refreshFlag = _t$props2$refreshFlag === void 0 ? null : _t$props2$refreshFlag,
200
- expandedKeys = _t$props2.expandedKeys,
201
- customCfg = _t$props2.customCfg,
202
- checkStrictly = _t$props2.checkStrictly,
203
- _t$props2$popoverProp = _t$props2.popoverProps,
204
- popoverProps = _t$props2$popoverProp === void 0 ? {} : _t$props2$popoverProp,
205
- _t$props2$allowClear = _t$props2.allowClear,
206
- allowClear = _t$props2$allowClear === void 0 ? true : _t$props2$allowClear;
207
- // eslint-disable-next-line camelcase
237
+ _t$props2$prefixCls = _t$props2.prefixCls,
238
+ prefixCls = _t$props2$prefixCls === void 0 ? 'vtx-ztree-select' : _t$props2$prefixCls,
239
+ _t$props2$treeCheckab = _t$props2.treeCheckable,
240
+ treeCheckable = _t$props2$treeCheckab === void 0 ? false : _t$props2$treeCheckab,
241
+ _t$props2$treeDefault = _t$props2.treeDefaultExpandAll,
242
+ treeDefaultExpandAll = _t$props2$treeDefault === void 0 ? false : _t$props2$treeDefault,
243
+ _t$props2$multiple = _t$props2.multiple,
244
+ multiple = _t$props2$multiple === void 0 ? false : _t$props2$multiple,
245
+ _t$props2$showSearch = _t$props2.showSearch,
246
+ showSearch = _t$props2$showSearch === void 0 ? true : _t$props2$showSearch,
247
+ searchPlaceholder = _t$props2.searchPlaceholder,
248
+ _t$props2$dropdownSty = _t$props2.dropdownStyle,
249
+ dropdownStyle = _t$props2$dropdownSty === void 0 ? {} : _t$props2$dropdownSty,
250
+ _t$props2$style = _t$props2.style,
251
+ style = _t$props2$style === void 0 ? {} : _t$props2$style,
252
+ _t$props2$disabled = _t$props2.disabled,
253
+ disabled = _t$props2$disabled === void 0 ? false : _t$props2$disabled,
254
+ _t$props2$refreshFlag = _t$props2.refreshFlag,
255
+ refreshFlag = _t$props2$refreshFlag === void 0 ? null : _t$props2$refreshFlag,
256
+ expandedKeys = _t$props2.expandedKeys,
257
+ customCfg = _t$props2.customCfg,
258
+ checkStrictly = _t$props2.checkStrictly,
259
+ _t$props2$popoverProp = _t$props2.popoverProps,
260
+ popoverProps = _t$props2$popoverProp === void 0 ? {} : _t$props2$popoverProp,
261
+ _t$props2$allowClear = _t$props2.allowClear,
262
+ allowClear = _t$props2$allowClear === void 0 ? true : _t$props2$allowClear; // eslint-disable-next-line camelcase
263
+
208
264
  var value_arr = function (val) {
209
265
  if (Array.isArray(val)) {
210
266
  return val;
@@ -214,6 +270,7 @@ var VtxZtreeSelect = exports["default"] = /*#__PURE__*/function (_React$Componen
214
270
  return [];
215
271
  }
216
272
  }(value);
273
+
217
274
  var selectedNodes = value_arr.filter(function (k) {
218
275
  return k in t.keyNodesMapping;
219
276
  }).map(function (item) {
@@ -221,9 +278,9 @@ var VtxZtreeSelect = exports["default"] = /*#__PURE__*/function (_React$Componen
221
278
  id: item,
222
279
  name: t.keyNodesMapping[item].name
223
280
  };
224
- });
225
- // ztree配置
226
- var treeProps = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
281
+ }); // ztree配置
282
+
283
+ var treeProps = (_treeProps = {
227
284
  data: data,
228
285
  // 树的数据
229
286
  // showSearch: showSearch,
@@ -231,12 +288,13 @@ var VtxZtreeSelect = exports["default"] = /*#__PURE__*/function (_React$Componen
231
288
  searchPlaceholder: searchPlaceholder,
232
289
  multiple: multiple,
233
290
  checkable: treeCheckable
234
- }, treeCheckable ? 'checkedKeys' : 'selectedKeys', value_arr), "defaultExpandAll", treeDefaultExpandAll), "expandedKeys", expandedKeys ? expandedKeys : (data === null || data === void 0 || (_data$ = data[0]) === null || _data$ === void 0 ? void 0 : _data$.key) || '-1'), "refreshFlag", refreshFlag || t.treeRefreshFlag), "customCfg", customCfg), "checkStrictly", checkStrictly), "ref", function ref(instance) {
291
+ }, _defineProperty(_treeProps, treeCheckable ? 'checkedKeys' : 'selectedKeys', value_arr), _defineProperty(_treeProps, "defaultExpandAll", treeDefaultExpandAll), _defineProperty(_treeProps, "expandedKeys", expandedKeys ? expandedKeys : (data === null || data === void 0 ? void 0 : (_data$ = data[0]) === null || _data$ === void 0 ? void 0 : _data$.key) || '-1'), _defineProperty(_treeProps, "refreshFlag", refreshFlag || t.treeRefreshFlag), _defineProperty(_treeProps, "customCfg", customCfg), _defineProperty(_treeProps, "checkStrictly", checkStrictly), _defineProperty(_treeProps, "ref", function ref(instance) {
235
292
  if (instance) t.tree = instance;
236
- }), "onClick", function onClick(_ref) {
293
+ }), _defineProperty(_treeProps, "onClick", function onClick(_ref) {
237
294
  var selectedNodes = _ref.selectedNodes,
238
- selectedKeys = _ref.selectedKeys,
239
- selectedNames = _ref.selectedNames;
295
+ selectedKeys = _ref.selectedKeys,
296
+ selectedNames = _ref.selectedNames;
297
+
240
298
  // console.log(selectedNodes,selectedKeys,selectedNames)
241
299
  if (!treeCheckable) {
242
300
  t.props.onChange && t.props.onChange({
@@ -249,19 +307,22 @@ var VtxZtreeSelect = exports["default"] = /*#__PURE__*/function (_React$Componen
249
307
  }),
250
308
  names: selectedNames
251
309
  });
310
+
252
311
  if (!multiple) {
253
312
  var _t$tree;
313
+
254
314
  t.setState({
255
315
  popoverVisible: false,
256
316
  searchValue: ''
257
317
  });
258
- (_t$tree = t.tree) === null || _t$tree === void 0 || _t$tree.fuzzySearch('');
318
+ (_t$tree = t.tree) === null || _t$tree === void 0 ? void 0 : _t$tree.fuzzySearch('');
259
319
  }
260
320
  }
261
- }), "onCheck", function onCheck(_ref2) {
321
+ }), _defineProperty(_treeProps, "onCheck", function onCheck(_ref2) {
262
322
  var checkedNodes = _ref2.checkedNodes,
263
- checkedKeys = _ref2.checkedKeys,
264
- checkedNames = _ref2.checkedNames;
323
+ checkedKeys = _ref2.checkedKeys,
324
+ checkedNames = _ref2.checkedNames;
325
+
265
326
  if (treeCheckable) {
266
327
  t.props.onChange && t.props.onChange({
267
328
  nodes: checkedNodes,
@@ -274,11 +335,10 @@ var VtxZtreeSelect = exports["default"] = /*#__PURE__*/function (_React$Componen
274
335
  names: checkedNames
275
336
  });
276
337
  }
277
- }), "beforeCheck", function beforeCheck(treeNode) {
338
+ }), _defineProperty(_treeProps, "beforeCheck", function beforeCheck(treeNode) {
278
339
  return t.props.beforeCheck ? t.props.beforeCheck(treeNode) : true;
279
- });
340
+ }), _treeProps); // 多选组件
280
341
 
281
- // 多选组件
282
342
  var MultiSelect = /*#__PURE__*/_react["default"].createElement("div", {
283
343
  className: (0, _classnames2["default"])("".concat(prefixCls, "-multiple-box")),
284
344
  style: style,
@@ -312,9 +372,7 @@ var VtxZtreeSelect = exports["default"] = /*#__PURE__*/function (_React$Componen
312
372
  e.stopPropagation();
313
373
  t.clear();
314
374
  }
315
- })], selectedNodes.length == 0 && !t.state.focusMultiple && !t.state.searchValue && /*#__PURE__*/_react["default"].createElement("span", {
316
- className: "".concat(prefixCls, "-placeholder")
317
- }, t.props.placeholder), /*#__PURE__*/_react["default"].createElement(_input["default"], {
375
+ })], /*#__PURE__*/_react["default"].createElement(_input["default"], {
318
376
  ref: function ref(_ref3) {
319
377
  if (_ref3 && !t.state.inputRef) {
320
378
  t.setState({
@@ -326,10 +384,11 @@ var VtxZtreeSelect = exports["default"] = /*#__PURE__*/function (_React$Componen
326
384
  onChange: function onChange(e) {
327
385
  if (t.tree) {
328
386
  var _t$tree2;
387
+
329
388
  t.setState({
330
389
  searchValue: e.target.value
331
390
  });
332
- (_t$tree2 = t.tree) === null || _t$tree2 === void 0 || _t$tree2.fuzzySearch(e.target.value.trim());
391
+ (_t$tree2 = t.tree) === null || _t$tree2 === void 0 ? void 0 : _t$tree2.fuzzySearch(e.target.value.trim());
333
392
  }
334
393
  },
335
394
  onBlur: function onBlur() {
@@ -337,6 +396,7 @@ var VtxZtreeSelect = exports["default"] = /*#__PURE__*/function (_React$Componen
337
396
  focusMultiple: false
338
397
  });
339
398
  },
399
+ placeholder: t.props.placeholder,
340
400
  style: {
341
401
  width: 'fit-content',
342
402
  border: 'none',
@@ -383,15 +443,14 @@ var VtxZtreeSelect = exports["default"] = /*#__PURE__*/function (_React$Componen
383
443
  onClick: function onClick(e) {
384
444
  e.stopPropagation();
385
445
  }
386
- })));
446
+ }))); // 单选组件
447
+
387
448
 
388
- // 单选组件
389
449
  var SingleSelect = /*#__PURE__*/_react["default"].createElement(_input["default"], {
390
450
  value: t.state.focusSingle ? t.state.searchValue : t.state.searchValue || selectedNodes.map(function (item) {
391
451
  return item.name;
392
452
  }).join(', '),
393
- style: style
394
- // readOnly
453
+ style: style // readOnly
395
454
  ,
396
455
  disabled: disabled,
397
456
  placeholder: t.props.placeholder,
@@ -419,13 +478,15 @@ var VtxZtreeSelect = exports["default"] = /*#__PURE__*/function (_React$Componen
419
478
  onChange: function onChange(e) {
420
479
  if (t.tree) {
421
480
  var _t$tree3;
481
+
422
482
  t.setState({
423
483
  searchValue: e.target.value
424
484
  });
425
- (_t$tree3 = t.tree) === null || _t$tree3 === void 0 || _t$tree3.fuzzySearch(e.target.value.trim());
485
+ (_t$tree3 = t.tree) === null || _t$tree3 === void 0 ? void 0 : _t$tree3.fuzzySearch(e.target.value.trim());
426
486
  }
427
487
  }
428
488
  });
489
+
429
490
  return /*#__PURE__*/_react["default"].createElement("div", {
430
491
  className: prefixCls
431
492
  }, disabled ? multiple || treeCheckable ? MultiSelect : SingleSelect : /*#__PURE__*/_react["default"].createElement(_popover["default"], _extends({
@@ -442,24 +503,30 @@ var VtxZtreeSelect = exports["default"] = /*#__PURE__*/function (_React$Componen
442
503
  cursor: 'end'
443
504
  });
444
505
  }
506
+
445
507
  t.setState({
446
508
  popoverVisible: v,
447
509
  focusMultiple: v
448
510
  });
511
+
449
512
  if (!v) {
450
513
  var _t$tree4;
514
+
451
515
  t.setState({
452
516
  searchValue: ''
453
517
  });
454
- (_t$tree4 = t.tree) === null || _t$tree4 === void 0 || _t$tree4.fuzzySearch('');
518
+ (_t$tree4 = t.tree) === null || _t$tree4 === void 0 ? void 0 : _t$tree4.fuzzySearch('');
455
519
  }
456
520
  },
457
521
  visible: t.state.popoverVisible
458
522
  }), multiple || treeCheckable ? MultiSelect : SingleSelect));
459
523
  }
460
524
  }]);
525
+
461
526
  return VtxZtreeSelect;
462
527
  }(_react["default"].Component);
528
+
529
+ exports["default"] = VtxZtreeSelect;
463
530
  VtxZtreeSelect.propTypes = {
464
531
  data: _propTypes["default"].array,
465
532
  expandedKeys: _propTypes["default"].arrayOf(_propTypes["default"].string),