@vtx/components 4.0.0-beta.7 → 4.0.0-beta.70

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 (161) hide show
  1. package/es/index.js +3 -0
  2. package/es/utils/filterSpecialCharacters.js +47 -46
  3. package/es/utils/index.js +1 -2
  4. package/es/vtx-color-picker/index.js +138 -33
  5. package/es/vtx-color-picker/style/index.js +36 -12
  6. package/es/vtx-combogrid/Combogrid.js +16 -10
  7. package/es/vtx-combogrid/index.js +7 -4
  8. package/es/vtx-combogrid/style/index.js +4 -4
  9. package/es/vtx-datagrid/Store/Provide.js +109 -132
  10. package/es/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +11 -5
  11. package/es/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
  12. package/es/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
  13. package/es/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
  14. package/es/vtx-datagrid/ToolBar/index.js +2 -2
  15. package/es/vtx-datagrid/columnState.js +64 -0
  16. package/es/vtx-datagrid/index.js +114 -35
  17. package/es/vtx-datagrid/mergeComponents.js +15 -0
  18. package/es/vtx-datagrid/renderColumnButtons.js +30 -11
  19. package/es/vtx-datagrid/style/index.js +102 -20
  20. package/es/vtx-date-picker/QdatePicker.js +1 -1
  21. package/es/vtx-descriptions/Descriptions.js +29 -0
  22. package/es/vtx-descriptions/index.js +3 -0
  23. package/es/vtx-descriptions/style/index.js +19 -0
  24. package/es/vtx-ellipsis-text/index.js +7 -2
  25. package/es/vtx-ellipsis-text/style/index.js +3 -1
  26. package/es/vtx-export/index.js +25 -25
  27. package/es/vtx-export-async/History.js +7 -3
  28. package/es/vtx-export-async/index.js +42 -14
  29. package/es/vtx-form-layout/Card.js +10 -10
  30. package/es/vtx-form-layout/Divider.js +1 -1
  31. package/es/vtx-form-layout/FormItem.js +18 -17
  32. package/es/vtx-form-layout/Pane.js +23 -12
  33. package/es/vtx-icon/index.js +54 -45
  34. package/es/vtx-icon/index.js1 +90 -0
  35. package/es/vtx-image/Preview.js +11 -6
  36. package/es/vtx-image/style/index.js +0 -1
  37. package/es/vtx-import/index.js +155 -43
  38. package/es/vtx-import/result.js +6 -2
  39. package/es/vtx-import/style/index.js +16 -1
  40. package/es/vtx-import2/Content.js +2 -1
  41. package/es/vtx-import2/index.js +31 -20
  42. package/es/vtx-import2/style/index.js +60 -9
  43. package/es/vtx-input/TextArea/index.js +11 -6
  44. package/es/vtx-modal/index.js +9 -4
  45. package/es/vtx-modal/style/index.js +5 -3
  46. package/es/vtx-page-layout/Content.js +1 -1
  47. package/es/vtx-page-layout/TabLayout.js +1 -7
  48. package/es/vtx-page-layout/TableLayout.js +14 -4
  49. package/es/vtx-page-layout/TableWrap.js +3 -2
  50. package/es/vtx-page-layout/TreeLayout.js +2 -8
  51. package/es/vtx-page-layout/container.js +6 -5
  52. package/es/vtx-page-layout/style/index.js +4 -2
  53. package/es/vtx-provider/index.js +20 -10
  54. package/es/vtx-provider/locale/en_US.js +65 -5
  55. package/es/vtx-provider/locale/zh_CN.js +75 -5
  56. package/es/vtx-provider/useStyle/index.js +8 -4
  57. package/es/vtx-scrollable-row/index.js +38 -28
  58. package/es/vtx-search/index.js +18 -13
  59. package/es/vtx-search/style/index.js +2 -1
  60. package/es/vtx-select/index.js +132 -46
  61. package/es/vtx-select/style/index.js +11 -56
  62. package/es/vtx-signature/index.js +5 -4
  63. package/es/vtx-signature/style/index.js +1 -1
  64. package/es/vtx-split-pane/Resizer.js +0 -1
  65. package/es/vtx-split-pane/SplitPane.js +34 -25
  66. package/es/vtx-split-pane/style/index.js +8 -112
  67. package/es/vtx-time-picker/index.js +27 -1
  68. package/es/vtx-transfer/Transfer.js +29 -0
  69. package/es/vtx-transfer/index.js +3 -0
  70. package/es/vtx-transfer/style/index.js +19 -0
  71. package/es/vtx-transfer-select/TransferSelect.js +143 -0
  72. package/es/vtx-transfer-select/index.js +3 -0
  73. package/es/vtx-transfer-select/style/index.js +19 -0
  74. package/es/vtx-tree/index.js +104 -40
  75. package/es/vtx-tree-select/index.js +75 -105
  76. package/es/vtx-tree-select/style/index.js +9 -3
  77. package/es/vtx-upload/FilePreview.js +2 -1
  78. package/es/vtx-wang-editor/index.js +291 -113
  79. package/es/vtx-wang-editor/wangEditorUtil.js +59 -9
  80. package/lib/index.js +36 -0
  81. package/lib/utils/filterSpecialCharacters.js +48 -46
  82. package/lib/utils/index.js +0 -7
  83. package/lib/vtx-color-picker/index.js +139 -34
  84. package/lib/vtx-color-picker/style/index.js +36 -12
  85. package/lib/vtx-combogrid/Combogrid.js +16 -10
  86. package/lib/vtx-combogrid/index.js +7 -4
  87. package/lib/vtx-combogrid/style/index.js +4 -4
  88. package/lib/vtx-datagrid/Store/Provide.js +116 -138
  89. package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/index.js +11 -6
  90. package/lib/vtx-datagrid/ToolBar/components/ColumnSetting/style.js +5 -2
  91. package/lib/vtx-datagrid/ToolBar/components/Density/index.js +3 -0
  92. package/lib/vtx-datagrid/ToolBar/components/TableStyle/index.js +3 -0
  93. package/lib/vtx-datagrid/ToolBar/index.js +2 -2
  94. package/lib/vtx-datagrid/columnState.js +73 -0
  95. package/lib/vtx-datagrid/index.js +115 -35
  96. package/lib/vtx-datagrid/mergeComponents.js +21 -0
  97. package/lib/vtx-datagrid/renderColumnButtons.js +30 -11
  98. package/lib/vtx-datagrid/style/index.js +102 -20
  99. package/lib/vtx-date-picker/QdatePicker.js +1 -1
  100. package/lib/vtx-descriptions/Descriptions.js +38 -0
  101. package/lib/vtx-descriptions/index.js +15 -0
  102. package/lib/vtx-descriptions/style/index.js +25 -0
  103. package/lib/vtx-ellipsis-text/index.js +7 -2
  104. package/lib/vtx-ellipsis-text/style/index.js +3 -1
  105. package/lib/vtx-export/index.js +26 -26
  106. package/lib/vtx-export-async/History.js +7 -3
  107. package/lib/vtx-export-async/index.js +40 -12
  108. package/lib/vtx-form-layout/Card.js +9 -9
  109. package/lib/vtx-form-layout/Divider.js +1 -1
  110. package/lib/vtx-form-layout/FormItem.js +18 -17
  111. package/lib/vtx-form-layout/Pane.js +22 -11
  112. package/lib/vtx-icon/index.js +54 -52
  113. package/lib/vtx-icon/index.js1 +90 -0
  114. package/lib/vtx-image/Preview.js +11 -6
  115. package/lib/vtx-image/style/index.js +0 -1
  116. package/lib/vtx-import/index.js +154 -42
  117. package/lib/vtx-import/result.js +6 -2
  118. package/lib/vtx-import/style/index.js +16 -1
  119. package/lib/vtx-import2/Content.js +2 -1
  120. package/lib/vtx-import2/index.js +30 -19
  121. package/lib/vtx-import2/style/index.js +60 -9
  122. package/lib/vtx-input/TextArea/index.js +11 -6
  123. package/lib/vtx-modal/index.js +9 -4
  124. package/lib/vtx-modal/style/index.js +5 -3
  125. package/lib/vtx-page-layout/Content.js +1 -1
  126. package/lib/vtx-page-layout/TabLayout.js +3 -9
  127. package/lib/vtx-page-layout/TableLayout.js +14 -4
  128. package/lib/vtx-page-layout/TableWrap.js +3 -2
  129. package/lib/vtx-page-layout/TreeLayout.js +4 -10
  130. package/lib/vtx-page-layout/container.js +6 -5
  131. package/lib/vtx-page-layout/style/index.js +4 -2
  132. package/lib/vtx-provider/index.js +19 -10
  133. package/lib/vtx-provider/locale/en_US.js +65 -5
  134. package/lib/vtx-provider/locale/zh_CN.js +75 -5
  135. package/lib/vtx-provider/useStyle/index.js +8 -4
  136. package/lib/vtx-scrollable-row/index.js +38 -28
  137. package/lib/vtx-search/index.js +18 -13
  138. package/lib/vtx-search/style/index.js +2 -1
  139. package/lib/vtx-select/index.js +134 -48
  140. package/lib/vtx-select/style/index.js +11 -56
  141. package/lib/vtx-signature/index.js +4 -3
  142. package/lib/vtx-signature/style/index.js +1 -1
  143. package/lib/vtx-split-pane/Resizer.js +0 -1
  144. package/lib/vtx-split-pane/SplitPane.js +32 -23
  145. package/lib/vtx-split-pane/style/index.js +8 -112
  146. package/lib/vtx-time-picker/index.js +27 -1
  147. package/lib/vtx-transfer/Transfer.js +38 -0
  148. package/lib/vtx-transfer/index.js +15 -0
  149. package/lib/vtx-transfer/style/index.js +25 -0
  150. package/lib/vtx-transfer-select/TransferSelect.js +151 -0
  151. package/lib/vtx-transfer-select/index.js +15 -0
  152. package/lib/vtx-transfer-select/style/index.js +25 -0
  153. package/lib/vtx-tree/index.js +102 -38
  154. package/lib/vtx-tree-select/index.js +75 -105
  155. package/lib/vtx-tree-select/style/index.js +9 -3
  156. package/lib/vtx-upload/FilePreview.js +2 -1
  157. package/lib/vtx-wang-editor/index.js +289 -113
  158. package/lib/vtx-wang-editor/wangEditorUtil.js +59 -10
  159. package/package.json +44 -28
  160. package/es/utils/hooks/useFetchData/index.js +0 -82
  161. package/lib/utils/hooks/useFetchData/index.js +0 -89
@@ -10,7 +10,6 @@ var _tinycolor = require("@ctrl/tinycolor");
10
10
  var _antd = require("antd");
11
11
  var _react = require("react");
12
12
  var _index = require("../index");
13
- var _merge = require("../utils/merge");
14
13
  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); }
15
14
  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; }
16
15
  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; }
@@ -75,7 +74,7 @@ var operationUnit = exports.operationUnit = function operationUnit(token) {
75
74
  * @returns UseStyleResult
76
75
  */
77
76
  function useStyle(componentName, styleFn) {
78
- var _token$proComponentsC;
77
+ var _token$vtxComponentsC;
79
78
  // eslint-disable-next-line prefer-const
80
79
  var _useContext = (0, _react.useContext)(_index.VtxProvider),
81
80
  _useContext$token = _useContext.token,
@@ -93,8 +92,13 @@ function useStyle(componentName, styleFn) {
93
92
  if (!token.layout) {
94
93
  token = _objectSpread({}, antdToken);
95
94
  }
96
- token.proComponentsCls = (_token$proComponentsC = token.proComponentsCls) !== null && _token$proComponentsC !== void 0 ? _token$proComponentsC : ".".concat(getPrefixCls('pro'));
95
+ token.vtxComponentsCls = (_token$vtxComponentsC = token.vtxComponentsCls) !== null && _token$vtxComponentsC !== void 0 ? _token$vtxComponentsC : ".vtx";
97
96
  token.antCls = ".".concat(getPrefixCls());
97
+ // wrapSSR 样式注入器 支持 SSR
98
+ // useStyleRegister 生成注入器的工厂
99
+ // nonce CSP 通行证 把生成的 <style> 标签加上 nonce="xxx",防止内联样式被 CSP 拦截
100
+ // path 缓存键 相同 path 就复用已编译的 CSS,避免重复生成样式
101
+ // layer @layer 名称:把全部规则包进 @layer vtx- { ... },方便后续层叠控制与覆盖
98
102
  return {
99
103
  wrapSSR: (0, _cssinjs.useStyleRegister)({
100
104
  theme: theme,
@@ -102,7 +106,7 @@ function useStyle(componentName, styleFn) {
102
106
  path: [componentName],
103
107
  nonce: csp === null || csp === void 0 ? void 0 : csp.nonce,
104
108
  layer: {
105
- name: 'vtx-'
109
+ name: 'vtx'
106
110
  }
107
111
  }, function () {
108
112
  return styleFn(token);
@@ -63,44 +63,54 @@ function VtxScrollableRow(props) {
63
63
  setNextPrev();
64
64
  }, 200);
65
65
  window.addEventListener('resize', debouncedResize);
66
- setNextPrev();
66
+ // 使用 requestAnimationFrame 确保 DOM 已渲染
67
+ requestAnimationFrame(function () {
68
+ setNextPrev();
69
+ });
67
70
  return function () {
71
+ debouncedResize.cancel();
68
72
  window.removeEventListener('resize', debouncedResize);
69
73
  };
70
- }, [navRef === null || navRef === void 0 ? void 0 : navRef.current, containerRef.current, navWrapRef.current]);
74
+ }, []);
71
75
  function setNextPrev() {
72
76
  if (navRef !== null && navRef !== void 0 && navRef.current && containerRef.current && navWrapRef.current) {
73
77
  var navNodeW = navRef.current.scrollWidth;
74
78
  var containerW = containerRef.current.offsetWidth;
75
79
  var navWrapNodeW = navWrapRef.current.offsetWidth;
76
80
  var minOffset = containerW - navNodeW;
77
- var _next = state.next,
78
- _prev = state.prev;
79
- if (minOffset >= 0) {
80
- _next = false;
81
- setOffset(0, false);
82
- offset.current = 0;
83
- } else if (minOffset < offset.current) {
84
- _next = true;
85
- } else {
86
- _next = false;
87
- var realOffset = navWrapNodeW - navNodeW;
88
- setOffset(realOffset, false);
89
- offset.current = realOffset;
90
- }
91
- if (offset.current < 0) {
92
- _prev = true;
93
- } else {
94
- _prev = false;
95
- }
96
- setState({
97
- next: _next,
98
- prev: _prev
81
+
82
+ // ✅ 使用函数式更新确保状态一致性
83
+ setState(function (prevState) {
84
+ var next = prevState.next,
85
+ prev = prevState.prev;
86
+ var newOffset = offset.current;
87
+ if (minOffset >= 0) {
88
+ next = false;
89
+ setOffset(0, false);
90
+ newOffset = 0;
91
+ } else if (minOffset < newOffset) {
92
+ next = true;
93
+ } else {
94
+ next = false;
95
+ var realOffset = navWrapNodeW - navNodeW;
96
+ setOffset(realOffset, false);
97
+ newOffset = realOffset;
98
+ }
99
+ if (newOffset < 0) {
100
+ prev = true;
101
+ } else {
102
+ prev = false;
103
+ }
104
+
105
+ // 同步更新 ref 值
106
+ offset.current = newOffset;
107
+
108
+ // 返回新的状态对象
109
+ return {
110
+ next: next,
111
+ prev: prev
112
+ };
99
113
  });
100
- return {
101
- next: _next,
102
- prev: _prev
103
- };
104
114
  }
105
115
  }
106
116
  var setOffset = function setOffset(os) {
@@ -61,10 +61,6 @@ function VtxSearch(props) {
61
61
  isClearButton = _props$isClearButton === void 0 ? true : _props$isClearButton,
62
62
  _props$isMoreButton = props.isMoreButton,
63
63
  isMoreButton = _props$isMoreButton === void 0 ? true : _props$isMoreButton,
64
- _props$confirmText = props.confirmText,
65
- confirmText = _props$confirmText === void 0 ? intl.getMessage('tableForm.search', '查询') : _props$confirmText,
66
- _props$clearText = props.clearText,
67
- clearText = _props$clearText === void 0 ? intl.getMessage('tableForm.reset', '重置') : _props$clearText,
68
64
  onConfirm = props.onConfirm,
69
65
  onClear = props.onClear,
70
66
  renderButtons = props.renderButtons,
@@ -72,7 +68,15 @@ function VtxSearch(props) {
72
68
  showAll = _props$showAll === void 0 ? false : _props$showAll,
73
69
  onToggleShow = props.onToggleShow,
74
70
  _props$customEnumText = props.customEnumText,
75
- customEnumText = _props$customEnumText === void 0 ? {} : _props$customEnumText;
71
+ customEnumText = _props$customEnumText === void 0 ? {
72
+ confirmText: intl.getMessage('tableForm.search', '查询'),
73
+ //确认按钮文本
74
+ clearText: intl.getMessage('tableForm.reset', '重置'),
75
+ //情况按钮文本
76
+ collapseText: intl.getMessage('tableForm.expand', '收起'),
77
+ //情况按钮文本
78
+ expandText: intl.getMessage('tableForm.collapsed', '展开') //情况按钮文本
79
+ } : _props$customEnumText;
76
80
  var vtxSearchRef = (0, _react.useRef)();
77
81
  var ref = (0, _react.useRef)();
78
82
  var size = (0, _useColSize.default)(vtxSearchRef);
@@ -100,7 +104,7 @@ function VtxSearch(props) {
100
104
  return !!item;
101
105
  }) : props === null || props === void 0 ? void 0 : props.children;
102
106
  var grid = (0, _react.useMemo)(function () {
103
- var weightArr = props.gridWeight.filter(function (item) {
107
+ var weightArr = (props.gridWeight || []).filter(function (item) {
104
108
  return !!item;
105
109
  });
106
110
  var sum = 0;
@@ -127,7 +131,7 @@ function VtxSearch(props) {
127
131
  cumulative: cumulative,
128
132
  // 总数量
129
133
  len: cumulative[cumulative.length - 1],
130
- lenWeight: cumulativeWeight[cumulative.length - 2] + weightArr[(weightArr === null || weightArr === void 0 ? void 0 : weightArr.length) - 1],
134
+ lenWeight: cumulativeWeight[Math.max(0, cumulative.length - 2)] + (weightArr[(weightArr === null || weightArr === void 0 ? void 0 : weightArr.length) - 1] || 0),
131
135
  // 几个children
132
136
  count: count,
133
137
  // 兼容的处理
@@ -224,12 +228,13 @@ function VtxSearch(props) {
224
228
  } else {
225
229
  var chData = [];
226
230
  cData.forEach(function (item) {
227
- if (typeof item == 'function') {
231
+ if (typeof item === 'function') {
228
232
  var ite = item();
229
233
  if (Array.isArray(ite)) {
230
234
  chData.push.apply(chData, _toConsumableArray(ite));
235
+ } else {
236
+ chData.push(ite);
231
237
  }
232
- chData.push(ite);
233
238
  return;
234
239
  }
235
240
  if (Array.isArray(item)) {
@@ -301,7 +306,7 @@ function VtxSearch(props) {
301
306
  },
302
307
  type: "primary",
303
308
  onClick: onConfirm,
304
- children: confirmText
309
+ children: customEnumText.confirmText
305
310
  })
306
311
  }), isClearButton && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
307
312
  "data-type": 'bt',
@@ -311,7 +316,7 @@ function VtxSearch(props) {
311
316
  width: '100%'
312
317
  },
313
318
  onClick: onClear,
314
- children: clearText
319
+ children: customEnumText.clearText
315
320
  })
316
321
  }), isMoreButton && grid.len > realColumn - 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
317
322
  "data-type": 'bt',
@@ -320,9 +325,9 @@ function VtxSearch(props) {
320
325
  },
321
326
  className: (0, _classnames.default)("".concat(_index.prefix, "-more"), hashId),
322
327
  children: showMore ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
323
- children: [(customEnumText === null || customEnumText === void 0 ? void 0 : customEnumText.collapseText) || '收起', /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.UpOutlined, {})]
328
+ children: [customEnumText.collapseText, /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.UpOutlined, {})]
324
329
  }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
325
- children: [(customEnumText === null || customEnumText === void 0 ? void 0 : customEnumText.expandText) || '展开', /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.DownOutlined, {})]
330
+ children: [customEnumText.expandText, /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.DownOutlined, {})]
326
331
  })
327
332
  })]
328
333
  })
@@ -23,7 +23,8 @@ var genVtxStyle = function genVtxStyle(token) {
23
23
  transitionDuration: token.toggleSpeed,
24
24
  transitionProperty: 'height',
25
25
  boxSizing: 'border-box',
26
- overflow: 'hidden'
26
+ overflow: 'hidden',
27
+ color: token.colorText
27
28
  }, "".concat(componentCls, "-element"), {}), "".concat(componentCls, "-label_v"), {
28
29
  overflow: 'hidden',
29
30
  lineHeight: 1,
@@ -1,12 +1,11 @@
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); }
4
3
  Object.defineProperty(exports, "__esModule", {
5
4
  value: true
6
5
  });
7
6
  exports.default = exports.VtxSelect = void 0;
8
7
  var _antd = require("antd");
9
- var _classnames = _interopRequireDefault(require("classnames"));
8
+ var _classnames2 = _interopRequireDefault(require("classnames"));
10
9
  var _react = _interopRequireWildcard(require("react"));
11
10
  var _style = require("./style");
12
11
  var _icons = require("@ant-design/icons");
@@ -14,18 +13,24 @@ var _vtxIcon = _interopRequireDefault(require("../vtx-icon"));
14
13
  var _utils = require("../utils");
15
14
  var _vtxProvider = require("../vtx-provider");
16
15
  var _jsxRuntime = require("react/jsx-runtime");
16
+ var _excluded = ["value", "mode", "size", "onChange", "maxTagCount", "maxTagTextLength", "maxTagPlaceholder", "showAll", "selectStyle", "selectAll", "selectSearchAll", "defaultBindBodyToPopupContainer", "customEnumText", "showSearch", "optionFilterProp", "onSearch"],
17
+ _excluded2 = ["onSearch", "optionFilterProp"];
17
18
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
18
19
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
20
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
+ 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); }
20
22
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
21
23
  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."); }
22
24
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
23
25
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
26
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
24
27
  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; }
25
28
  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; }
26
29
  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; }
27
30
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
28
31
  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); }
32
+ 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; }
33
+ 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; }
29
34
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
30
35
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
31
36
  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); }
@@ -33,13 +38,14 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
33
38
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
34
39
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
35
40
  var VtxSelect = exports.VtxSelect = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
41
+ var _props$options;
36
42
  var intl = (0, _vtxProvider.useIntl)();
37
43
  var _useState = (0, _react.useState)(0),
38
44
  _useState2 = _slicedToArray(_useState, 2),
39
45
  popWidth = _useState2[0],
40
46
  setPopWidth = _useState2[1];
41
47
  var elRef = (0, _react.useRef)();
42
- var elId = (0, _react.useRef)("vtx-select-".concat(Date.now()));
48
+ var elId = (0, _react.useRef)("vtx-select-".concat(Math.random().toString(36).substr(2, 9)));
43
49
  var _useState3 = (0, _react.useState)(''),
44
50
  _useState4 = _slicedToArray(_useState3, 2),
45
51
  searchValue = _useState4[0],
@@ -65,42 +71,94 @@ var VtxSelect = exports.VtxSelect = /*#__PURE__*/(0, _react.forwardRef)(function
65
71
  _props$defaultBindBod = props.defaultBindBodyToPopupContainer,
66
72
  defaultBindBodyToPopupContainer = _props$defaultBindBod === void 0 ? true : _props$defaultBindBod,
67
73
  _props$customEnumText = props.customEnumText,
68
- customEnumText = _props$customEnumText === void 0 ? {} : _props$customEnumText;
74
+ customEnumText = _props$customEnumText === void 0 ? {} : _props$customEnumText,
75
+ showSearch = props.showSearch,
76
+ optionFilterProp = props.optionFilterProp,
77
+ _onSearch = props.onSearch,
78
+ rest = _objectWithoutProperties(props, _excluded);
69
79
  var TextEnum = _objectSpread({
70
80
  selectAllText: intl.getMessage('select.selectAll', '全选'),
71
81
  defaultPlaceholderText: intl.getMessage('tableForm.selectPlaceholder', '请选择'),
72
82
  emptyDescriptionText: intl.getMessage('select.empty', '暂无数据')
73
83
  }, customEnumText);
84
+ var _useContext = (0, _react.useContext)(_vtxProvider.VtxProvider),
85
+ getPrefixCls = _useContext.getPrefixCls;
86
+ var prefixCls = getPrefixCls('select', props.prefixCls);
87
+ var _useStyle = (0, _style.useStyle)(prefixCls),
88
+ wrapSSR = _useStyle.wrapSSR,
89
+ hashId = _useStyle.hashId;
74
90
  (0, _react.useEffect)(function () {
75
- if (mode === 'multiple' || mode === 'tags') {
76
- var timer = setInterval(function () {
77
- var _elRef$current;
78
- var _width = (_elRef$current = elRef.current) === null || _elRef$current === void 0 ? void 0 : _elRef$current.clientWidth;
79
- if (_width > 0) {
80
- setPopWidth(_width);
81
- clearInterval(timer);
91
+ if ((mode === 'multiple' || mode === 'tags') && elRef.current) {
92
+ var element = elRef.current;
93
+ // 立即设置一次
94
+ setPopWidth(element.clientWidth);
95
+
96
+ // 使用 ResizeObserver 监听尺寸变化
97
+ var resizeObserver = new ResizeObserver(function (entries) {
98
+ var _iterator = _createForOfIteratorHelper(entries),
99
+ _step;
100
+ try {
101
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
102
+ var entry = _step.value;
103
+ setPopWidth(entry.contentRect.width);
104
+ }
105
+ } catch (err) {
106
+ _iterator.e(err);
107
+ } finally {
108
+ _iterator.f();
82
109
  }
83
- }, 1000);
110
+ });
111
+ resizeObserver.observe(element);
84
112
  return function () {
85
- return clearInterval(timer);
113
+ resizeObserver.disconnect();
86
114
  };
87
115
  }
88
- }, []);
89
- var newChildren = props.children ? Array.isArray(props.children) ? props.children : [props.children] : [];
116
+ }, [mode]);
117
+ var newChildren = props.children ? _react.default.Children.toArray(props.children) : ((_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.map(function (v) {
118
+ return _objectSpread(_objectSpread({}, v), {}, {
119
+ key: v.value,
120
+ props: _objectSpread(_objectSpread({}, v), {}, {
121
+ children: v.label
122
+ })
123
+ });
124
+ })) || [];
125
+ var getOptionValue = function getOptionValue(item) {
126
+ var _ref, _itemProps$value;
127
+ var itemProps = (item === null || item === void 0 ? void 0 : item.props) || {};
128
+ return (_ref = (_itemProps$value = itemProps.value) !== null && _itemProps$value !== void 0 ? _itemProps$value : item.value) !== null && _ref !== void 0 ? _ref : item.key;
129
+ };
130
+ var getOptionLabel = function getOptionLabel(item) {
131
+ var _ref2, _itemProps$children;
132
+ var itemProps = (item === null || item === void 0 ? void 0 : item.props) || {};
133
+ return (_ref2 = (_itemProps$children = itemProps.children) !== null && _itemProps$children !== void 0 ? _itemProps$children : itemProps.label) !== null && _ref2 !== void 0 ? _ref2 : item.label;
134
+ };
135
+ var getSelectedValue = function getSelectedValue(item) {
136
+ if ((0, _utils.isObject)(item)) {
137
+ var _item$value;
138
+ return (_item$value = item.value) !== null && _item$value !== void 0 ? _item$value : item.key;
139
+ }
140
+ return item;
141
+ };
142
+ var normalizedOptions = newChildren.map(function (item) {
143
+ return {
144
+ value: getOptionValue(item),
145
+ label: getOptionLabel(item),
146
+ raw: item
147
+ };
148
+ });
90
149
  var getContent = function getContent() {
91
150
  var child = {};
92
- newChildren.forEach(function (item) {
93
- var _item$props;
94
- child[item.key] = item === null || item === void 0 || (_item$props = item.props) === null || _item$props === void 0 ? void 0 : _item$props.children;
151
+ normalizedOptions.forEach(function (item) {
152
+ child[item.value] = item.label;
95
153
  });
96
154
  var getChildren = function getChildren() {
97
155
  var child = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
98
156
  var value = arguments.length > 1 ? arguments[1] : undefined;
99
- var key = (0, _utils.isObject)(value) ? value.key : value;
157
+ var key = getSelectedValue(value);
100
158
  return child[key] || '';
101
159
  };
102
160
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
103
- className: "vtx-all-list",
161
+ className: (0, _classnames2.default)("".concat(prefixCls, "-all-list"), hashId),
104
162
  children: Array.isArray(value) && value.length ? value.map(function (item, index) {
105
163
  var name = getChildren(child, item);
106
164
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Tag, {
@@ -112,10 +170,13 @@ var VtxSelect = exports.VtxSelect = /*#__PURE__*/(0, _react.forwardRef)(function
112
170
  e.preventDefault();
113
171
  var valueClone = _toConsumableArray(value);
114
172
  valueClone.splice(index, 1);
115
- var options = newChildren.filter(function (ite) {
116
- return valueClone.includes(ite.props.value);
173
+ var selectedValueSet = new Set(valueClone.map(getSelectedValue));
174
+ var options = normalizedOptions.filter(function (ite) {
175
+ return selectedValueSet.has(ite.value);
176
+ }).map(function (ite) {
177
+ return ite.raw;
117
178
  });
118
- _onChange(valueClone, options);
179
+ _onChange && _onChange(valueClone, options);
119
180
  },
120
181
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Tooltip, {
121
182
  title: name,
@@ -128,16 +189,51 @@ var VtxSelect = exports.VtxSelect = /*#__PURE__*/(0, _react.forwardRef)(function
128
189
  })
129
190
  });
130
191
  };
131
- var newProps = _objectSpread(_objectSpread({
132
- showSearch: true,
133
- optionFilterProp: 'children',
192
+ var defaultOptionFilterProp = ['label', 'children'];
193
+ var handleSearch = function handleSearch(value) {
194
+ setSearchValue(value ? String(value).toLowerCase() : '');
195
+ _onSearch && _onSearch(value);
196
+ };
197
+ var getSearchProps = function getSearchProps() {
198
+ if (showSearch && _typeof(showSearch) === 'object') {
199
+ var showSearchOnSearch = showSearch.onSearch,
200
+ showSearchOptionFilterProp = showSearch.optionFilterProp,
201
+ searchConfig = _objectWithoutProperties(showSearch, _excluded2);
202
+ return {
203
+ showSearch: _objectSpread(_objectSpread({}, searchConfig), {}, {
204
+ optionFilterProp: showSearchOptionFilterProp || optionFilterProp || defaultOptionFilterProp,
205
+ onSearch: function onSearch(value) {
206
+ setSearchValue(value ? String(value).toLowerCase() : '');
207
+ showSearchOnSearch && showSearchOnSearch(value);
208
+ _onSearch && _onSearch(value);
209
+ }
210
+ })
211
+ };
212
+ }
213
+ return {
214
+ showSearch: showSearch === undefined ? true : showSearch,
215
+ optionFilterProp: optionFilterProp || defaultOptionFilterProp
216
+ };
217
+ };
218
+ var newProps = _objectSpread(_objectSpread(_objectSpread({}, getSearchProps()), {}, {
134
219
  placeholder: TextEnum.defaultPlaceholderText,
135
- allowClear: true
136
- }, props), {}, {
137
- onSearch: function onSearch(value) {
138
- setSearchValue(value ? String(value).toLowerCase() : '');
139
- props.onSearch && props.onSearch(value);
140
- },
220
+ allowClear: true,
221
+ value: value,
222
+ mode: mode,
223
+ size: size,
224
+ //同步button大小
225
+ onChange: _onChange,
226
+ maxTagCount: maxTagCount,
227
+ maxTagTextLength: maxTagTextLength,
228
+ maxTagPlaceholder: maxTagPlaceholder,
229
+ showAll: showAll,
230
+ //是否显示全部选项
231
+ selectStyle: selectStyle,
232
+ selectAll: selectAll,
233
+ selectSearchAll: selectSearchAll,
234
+ defaultBindBodyToPopupContainer: defaultBindBodyToPopupContainer
235
+ }, rest), {}, {
236
+ onSearch: handleSearch,
141
237
  onBlur: function onBlur(e) {
142
238
  setSearchValue('');
143
239
  props.onBlur && props.onBlur(e);
@@ -166,7 +262,7 @@ var VtxSelect = exports.VtxSelect = /*#__PURE__*/(0, _react.forwardRef)(function
166
262
  if (e.target.checked) {
167
263
  var tempChildren = newChildren.filter(function (item) {
168
264
  if (selectSearchAll && searchValue) {
169
- return String(item.props.children).toLowerCase().indexOf(searchValue) > -1;
265
+ return String(getOptionLabel(item)).toLowerCase().indexOf(searchValue) > -1;
170
266
  }
171
267
  return true;
172
268
  });
@@ -174,13 +270,13 @@ var VtxSelect = exports.VtxSelect = /*#__PURE__*/(0, _react.forwardRef)(function
174
270
  if (props.labelInValue) {
175
271
  keys = tempChildren.map(function (item) {
176
272
  return {
177
- label: item.props.children,
178
- value: item.key
273
+ label: getOptionLabel(item),
274
+ value: getOptionValue(item)
179
275
  };
180
276
  });
181
277
  } else {
182
278
  keys = tempChildren.map(function (item) {
183
- return item.key;
279
+ return getOptionValue(item);
184
280
  });
185
281
  }
186
282
  _onChange && _onChange(keys, tempChildren);
@@ -200,21 +296,11 @@ var VtxSelect = exports.VtxSelect = /*#__PURE__*/(0, _react.forwardRef)(function
200
296
  });
201
297
  }
202
298
  }
203
- var _useContext = (0, _react.useContext)(_vtxProvider.VtxProvider),
204
- getPrefixCls = _useContext.getPrefixCls;
205
- var prefixCls = getPrefixCls('select', props.prefixCls);
206
- var _useStyle = (0, _style.useStyle)(prefixCls),
207
- wrapSSR = _useStyle.wrapSSR,
208
- hashId = _useStyle.hashId;
209
299
  return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
210
- className: (0, _classnames.default)(prefixCls, hashId, {
211
- 'vtx-multi-select': mode == 'multiple' || mode == 'tags'
212
- }),
300
+ className: (0, _classnames2.default)(prefixCls, hashId, _defineProperty({}, "".concat(prefixCls, "-multi"), mode == 'multiple' || mode == 'tags')),
213
301
  id: elId.current,
214
302
  ref: elRef,
215
- style: _objectSpread(_objectSpread({}, props.style), {}, {
216
- paddingRight: (mode == 'multiple' || mode == 'tags') && showAll ? 32 : 0
217
- }),
303
+ style: _objectSpread({}, props.style),
218
304
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Space.Compact, {
219
305
  style: {
220
306
  width: '100%'
@@ -13,66 +13,21 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
13
13
  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); }
14
14
  var genVtxSelectStyle = function genVtxSelectStyle(token) {
15
15
  var componentCls = token.componentCls;
16
- return _defineProperty(_defineProperty({}, componentCls, {
17
- backgroundColor: 'transparent',
18
- position: 'relative',
19
- display: 'inline-block',
20
- width: '100%',
21
- '.vtx-select-count': {
22
- position: 'absolute',
23
- top: '0',
24
- verticalAlign: 'top'
25
- },
26
- '.vtx-all-list': {
27
- position: 'absolute',
28
- zIndex: 999,
29
- boxSizing: 'border-box',
30
- width: '100%',
31
- padding: '5px',
32
- boxShadow: '0 2px 8px #d9d9d9',
33
- backgroundColor: 'red !important'
34
- },
35
- '.ant-select-selection--multiple': {
36
- maxHeight: '32px',
37
- overflow: 'hidden'
38
- }
39
- }), '.vtx-multi-select', {
40
- position: 'relative',
41
- display: 'inline-block',
42
- width: '100%',
43
- maxHeight: '32px !important',
44
- boxSizing: 'border-box',
45
- '.vtx-select-count': {
46
- position: 'absolute',
47
- top: 0,
48
- right: 0,
49
- verticalAlign: 'top',
50
- borderLeft: 'none',
51
- borderTopLeftRadius: 0,
52
- 'border-bottom-left-radius': 0
53
- },
54
- '.vtx-all-list': {
55
- position: 'absolute',
56
- zIndex: 999,
57
- boxSizing: 'border-box',
58
- width: '100%',
59
- padding: '5px',
60
- boxShadow: '0 2px 8px #d9d9d9'
61
- },
62
- '.ant-select-selector': {
63
- 'border-top-right-radius': 0,
64
- 'border-bottom-right-radius': 0,
65
- maxHeight: '32px !important',
66
- overflow: 'hidden'
67
- },
68
- '.ant-select-selection--multiple': {
69
- maxHeight: '32px',
70
- overflow: 'hidden'
16
+ return _defineProperty(_defineProperty(_defineProperty({}, componentCls, _defineProperty({
17
+ width: "100%"
18
+ }, '.ant-select', {
19
+ overflow: "hidden"
20
+ })), "".concat(componentCls, "-multi"), {
21
+ ".ant-select-content": {
22
+ flexWrap: "nowrap"
71
23
  }
24
+ }), "".concat(componentCls, "-all-list"), {
25
+ maxHeight: 300,
26
+ overflowY: "auto"
72
27
  });
73
28
  };
74
29
  function useStyle(prefixCls) {
75
- return (0, _vtxProvider.useStyle)('VtxSelect', function (token) {
30
+ return (0, _vtxProvider.useStyle)('', function (token) {
76
31
  var vtxSelectToken = _objectSpread(_objectSpread({}, token), {}, {
77
32
  componentCls: ".".concat(prefixCls)
78
33
  });
@@ -53,7 +53,7 @@ var VtxSignature = exports.VtxSignature = /*#__PURE__*/(0, _react.forwardRef)(fu
53
53
  clear();
54
54
  }
55
55
  }
56
- (0, _react.useEffect)(function () {
56
+ (0, _react.useLayoutEffect)(function () {
57
57
  signaturePad.current = new _signature_pad.default(canvasRef.current, {
58
58
  dotSize: dotSize,
59
59
  minWidth: minWidth,
@@ -74,7 +74,9 @@ var VtxSignature = exports.VtxSignature = /*#__PURE__*/(0, _react.forwardRef)(fu
74
74
  _onEnd && _onEnd();
75
75
  }
76
76
  });
77
- resizeCanvas();
77
+ setTimeout(function () {
78
+ resizeCanvas();
79
+ }, 0);
78
80
  window.addEventListener('resize', (0, _debounce.default)(resizeCanvas, 150));
79
81
  return function () {
80
82
  window.removeEventListener('resize', (0, _debounce.default)(resizeCanvas, 150));
@@ -91,7 +93,6 @@ var VtxSignature = exports.VtxSignature = /*#__PURE__*/(0, _react.forwardRef)(fu
91
93
  };
92
94
  return wrapSSR( /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
93
95
  className: (0, _classnames.default)(prefixCls, hashId),
94
- ref: ref,
95
96
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
96
97
  className: (0, _classnames.default)("".concat(prefixCls, "--body")),
97
98
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("canvas", {
@@ -17,7 +17,7 @@ var genVtxSignatureStyle = function genVtxSignatureStyle(token) {
17
17
  position: 'relative',
18
18
  display: 'flex',
19
19
  flexDirection: 'column',
20
- height: '300px',
20
+ height: 300,
21
21
  padding: '16px',
22
22
  backgroundColor: token.colorBgBase,
23
23
  border: "1px solid ".concat(token.colorBorder),
@@ -48,5 +48,4 @@ function Resizer(props) {
48
48
  }));
49
49
  }
50
50
  Resizer.propTypes = {};
51
- Resizer.defaultProps = {};
52
51
  var _default = exports.default = Resizer;