@kdcloudjs/kdesign 1.6.5 → 1.6.6

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.
@@ -226,15 +226,7 @@ export function useResizeObserver(element, handler) {
226
226
 
227
227
  ['width', 'height', 'x', 'y', 'bottom', 'top', 'left', 'right'].forEach(function (prop) {
228
228
  rect[prop] = contentRect[prop];
229
- }); // rect.width = contentRect.width
230
- // rect.height = contentRect.height
231
- // rect.x = contentRect.x
232
- // rect.y = contentRect.y
233
- // rect.bottom = contentRect.bottom
234
- // rect.top = contentRect.top
235
- // rect.left = contentRect.left
236
- // rect.right = contentRect.right
237
-
229
+ });
238
230
  handler && handler(rect);
239
231
  };
240
232
 
@@ -283,6 +283,7 @@ declare const compDefaultProps: {
283
283
  borderType: string;
284
284
  disabled: boolean;
285
285
  count: boolean;
286
+ countPosition: string;
286
287
  maxLength: number;
287
288
  };
288
289
  Timeline: {
@@ -294,6 +294,7 @@ var compDefaultProps = {
294
294
  borderType: 'underline',
295
295
  disabled: false,
296
296
  count: true,
297
+ countPosition: 'outter',
297
298
  maxLength: 255
298
299
  },
299
300
  Timeline: {
@@ -5,6 +5,7 @@ export interface textAreaProps extends React.TextareaHTMLAttributes<HTMLInputEle
5
5
  borderType?: BorderType;
6
6
  defaultValue?: string;
7
7
  count?: boolean;
8
+ countPosition?: string;
8
9
  value?: any;
9
10
  canResize?: boolean;
10
11
  disabled?: boolean;
@@ -1,5 +1,5 @@
1
- import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
2
1
  import _extends from "@babel/runtime-corejs3/helpers/extends";
2
+ import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime-corejs3/helpers/slicedToArray";
4
4
  import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
5
5
  import _Number$MAX_SAFE_INTEGER from "@babel/runtime-corejs3/core-js-stable/number/max-safe-integer";
@@ -49,6 +49,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
49
49
  borderType = textAreaProps.borderType,
50
50
  defaultValue = textAreaProps.defaultValue,
51
51
  count = textAreaProps.count,
52
+ countPosition = textAreaProps.countPosition,
52
53
  autoSize = textAreaProps.autoSize,
53
54
  className = textAreaProps.className,
54
55
  customPrefixcls = textAreaProps.prefixCls,
@@ -61,7 +62,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
61
62
  placeholder = textAreaProps.placeholder,
62
63
  style = textAreaProps.style,
63
64
  size = textAreaProps.size,
64
- others = __rest(textAreaProps, ["value", "allowClear", "borderType", "defaultValue", "count", "autoSize", "className", "prefixCls", "canResize", "maxLength", "disabled", "onBlur", "onFocus", "onChange", "placeholder", "style", "size"]);
65
+ others = __rest(textAreaProps, ["value", "allowClear", "borderType", "defaultValue", "count", "countPosition", "autoSize", "className", "prefixCls", "canResize", "maxLength", "disabled", "onBlur", "onFocus", "onChange", "placeholder", "style", "size"]);
65
66
 
66
67
  var textAreaPrefixCls = getPrefixCls(prefixCls, 'input', customPrefixcls); // TextArea样式前缀
67
68
 
@@ -116,7 +117,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
116
117
  };
117
118
 
118
119
  var handleBlur = function handleBlur(e) {
119
- showNumberMark && setShowNumberMark(false);
120
+ // showNumberMark && setShowNumberMark(false)
120
121
  onBlur && onBlur(e);
121
122
  };
122
123
 
@@ -145,8 +146,9 @@ var InternalTextarea = function InternalTextarea(props, ref) {
145
146
  }
146
147
 
147
148
  if (count && showNumberMark && !disabled && maxLength !== '' && maxLength >= 0) {
149
+ var countClass = classNames("".concat(textAreaPrefixCls, "-textarea-mark"), _defineProperty({}, "".concat(textAreaPrefixCls, "-textarea-mark-inner"), countPosition === 'inner'));
148
150
  return /*#__PURE__*/React.createElement("div", {
149
- className: "".concat(textAreaPrefixCls, "-textarea-mark")
151
+ className: countClass
150
152
  }, enteredLength, "/", maxLength);
151
153
  }
152
154
 
@@ -163,7 +165,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
163
165
  }, [propsValue, setValue]);
164
166
 
165
167
  var renderTextArea = function renderTextArea(prefixCls) {
166
- var _context, _classNames, _context2;
168
+ var _context, _classNames2, _context2;
167
169
 
168
170
  var hadCount = count && !disabled && !allowClear;
169
171
 
@@ -195,7 +197,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
195
197
  ref: textareaRef,
196
198
  disabled: disabled,
197
199
  style: _extends({}, textareaStyles, hadCount || !!allowClear ? otherStyles : style),
198
- className: classNames("".concat(prefixCls, "-textarea"), (_classNames = {}, _defineProperty(_classNames, _concatInstanceProperty(_context = "".concat(prefixCls, "-size-")).call(_context, size), size), _defineProperty(_classNames, "".concat(prefixCls, "-borderless"), borderType === 'none'), _defineProperty(_classNames, "".concat(prefixCls, "-underline"), borderType === 'underline'), _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), disabled), _defineProperty(_classNames, "".concat(prefixCls, "-no-resize"), canResize !== true), _defineProperty(_classNames, "".concat(prefixCls, "-allowClear-spacing"), !!allowClear), _classNames), _defineProperty({}, className, className && !allowClear && !hadCount)),
200
+ className: classNames("".concat(prefixCls, "-textarea"), (_classNames2 = {}, _defineProperty(_classNames2, _concatInstanceProperty(_context = "".concat(prefixCls, "-size-")).call(_context, size), size), _defineProperty(_classNames2, "".concat(prefixCls, "-borderless"), borderType === 'none'), _defineProperty(_classNames2, "".concat(prefixCls, "-underline"), borderType === 'underline'), _defineProperty(_classNames2, "".concat(prefixCls, "-disabled"), disabled), _defineProperty(_classNames2, "".concat(prefixCls, "-no-resize"), canResize !== true), _defineProperty(_classNames2, "".concat(prefixCls, "-allowClear-spacing"), !!allowClear), _classNames2), _defineProperty({}, className, className && !allowClear && !hadCount)),
199
201
  onChange: handleChange,
200
202
  onFocus: !disabled ? handleFocus : undefined,
201
203
  onBlur: !disabled ? handleBlur : undefined,
@@ -205,6 +205,13 @@ textarea {
205
205
  z-index: 1;
206
206
  color: var(--kd-c-input-placeholder-color-text, var(--kd-g-color-text-placeholder, #ccc));
207
207
  font-size: var(--kd-c-input-font-size-small, var(--kd-g-font-size-small, 12px));
208
+ line-height: 18px;
209
+ background-color: #fff;
210
+ }
211
+ .kd-input-textarea-mark-inner {
212
+ top: auto;
213
+ bottom: 5px;
214
+ right: 8px;
208
215
  }
209
216
  .kd-input-no-resize {
210
217
  resize: none;
@@ -37,7 +37,14 @@ textarea {
37
37
  z-index: 1;
38
38
  color: @input-placeholder-color-inner;
39
39
  font-size: @input-small-font-size-inner;
40
+ line-height: 18px;
41
+ background-color: #fff;
40
42
  }
43
+ &-mark-inner {
44
+ top: auto;
45
+ bottom: 5px;
46
+ right: 8px;
47
+ }
41
48
  }
42
49
  &-no-resize {
43
50
  resize: none;
@@ -10,6 +10,14 @@ declare type TablePropsOfComponents = Pick<BaseTableProps, 'components'> & {
10
10
  };
11
11
  };
12
12
  declare type TablePropsOfExtend = Omit<BaseTableProps, 'components'>;
13
+ export declare type TableApi = {
14
+ getColumns: () => any[];
15
+ getDataSource: () => any[];
16
+ getFooterDataSource: () => any[];
17
+ };
18
+ export declare type TableInstance = {
19
+ api: TableApi;
20
+ };
13
21
  export interface TableProps extends TablePropsOfExtend, TablePropsOfComponents {
14
22
  rowSelection?: TableRowSelection;
15
23
  prefixCls?: string;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { TableProps } from './interface';
3
- declare function Table(props: TableProps): JSX.Element;
3
+ declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<unknown>>;
4
4
  export default Table;
package/es/table/table.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime-corejs3/helpers/extends";
2
2
  import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
3
3
  import _sortInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/sort";
4
- import React, { useContext } from 'react';
4
+ import React, { forwardRef, useContext, useImperativeHandle, useRef } from 'react';
5
5
  import { Table as BaseTable, useTablePipeline } from '@kdcloudjs/table';
6
6
  import ConfigContext from '../config-provider/ConfigContext';
7
7
  import Checkbox from '../checkbox/index';
@@ -19,8 +19,7 @@ import useColumnDrag from './feature/columnDrag';
19
19
  import useContextMenu from './feature/contextMenu';
20
20
  import useRangeSelection from './feature/useRangeSelection';
21
21
  import devWarning from '../_utils/devwarning';
22
-
23
- function Table(props) {
22
+ var Table = /*#__PURE__*/forwardRef(function (props, ref) {
24
23
  var columns = props.columns,
25
24
  dataSource = props.dataSource,
26
25
  columnDrag = props.columnDrag,
@@ -68,19 +67,32 @@ function Table(props) {
68
67
  columns: columns,
69
68
  dataSource: dataSource
70
69
  });
70
+ var pipelineRef = useRef(pipeline);
71
+ pipelineRef.current = pipeline;
71
72
 
72
73
  if (footerDataSource) {
73
74
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
74
75
  // @ts-ignore
75
76
  pipeline.footerDataSource(footerDataSource);
76
77
  }
78
+
79
+ useImperativeHandle(ref, function () {
80
+ var _a, _b, _c;
81
+
82
+ return {
83
+ api: {
84
+ getColumns: (_a = pipelineRef.current.getColumns) === null || _a === void 0 ? void 0 : _a.bind(pipelineRef.current),
85
+ getDataSource: (_b = pipelineRef.current.getDataSource) === null || _b === void 0 ? void 0 : _b.bind(pipelineRef.current),
86
+ getFooterDataSource: (_c = pipelineRef.current.getFooterDataSource) === null || _c === void 0 ? void 0 : _c.bind(pipelineRef.current)
87
+ }
88
+ };
89
+ });
77
90
  /* -------------------------------------------------------------------------- */
78
91
 
79
92
  /* features */
80
93
 
81
94
  /* -------------------------------------------------------------------------- */
82
95
 
83
-
84
96
  useRowSelection(pipeline, rowSelection);
85
97
  useRowDetail(pipeline, rowDetail);
86
98
  useFilter(pipeline, filter);
@@ -135,6 +147,6 @@ function Table(props) {
135
147
  scrollbarWidth: scrollbarWidth,
136
148
  scrollLoad: scrollLoad
137
149
  }));
138
- }
139
-
150
+ });
151
+ Table.displayName = 'Table';
140
152
  export default Table;
@@ -114,7 +114,7 @@
114
114
  -webkit-font-feature-settings: 'tnum';
115
115
  font-feature-settings: 'tnum';
116
116
  max-width: var(--kd-c-tooltip-sizing-max-width, 360px);
117
- padding: var(--kd-c-tooltip-spacing-padding-vertical, 8px) var(--kd-c-tooltip-spacing-padding-vertical, 12px);
117
+ padding: var(--kd-c-tooltip-spacing-padding-vertical, 8px) var(--kd-c-tooltip-spacing-padding-horizontal, 12px);
118
118
  color: var(--kd-c-tooltip-color-text, var(--kd-g-color-text-primary, #212121));
119
119
  border-radius: var(--kd-c-tooltip-radius-border, var(--kd-g-radius-border, 2px));
120
120
  font-size: var(--kd-c-tooltip-color-text, var(--kd-g-font-size-small, 12px));
@@ -11,7 +11,7 @@
11
11
 
12
12
  // spacing
13
13
  @tooltip-vertical-gap: var(~'@{tooltip-custom-prefix}-spacing-padding-vertical', 8px);
14
- @tooltip-horizontal-gap: var(~'@{tooltip-custom-prefix}-spacing-padding-vertical', 12px);
14
+ @tooltip-horizontal-gap: var(~'@{tooltip-custom-prefix}-spacing-padding-horizontal', 12px);
15
15
 
16
16
  // sizing
17
17
  @tooltip-max-width: var(~'@{tooltip-custom-prefix}-sizing-max-width', 360px);
@@ -252,15 +252,7 @@ function useResizeObserver(element, handler) {
252
252
  }, contentRect);
253
253
  ['width', 'height', 'x', 'y', 'bottom', 'top', 'left', 'right'].forEach(function (prop) {
254
254
  rect[prop] = contentRect[prop];
255
- }); // rect.width = contentRect.width
256
- // rect.height = contentRect.height
257
- // rect.x = contentRect.x
258
- // rect.y = contentRect.y
259
- // rect.bottom = contentRect.bottom
260
- // rect.top = contentRect.top
261
- // rect.left = contentRect.left
262
- // rect.right = contentRect.right
263
-
255
+ });
264
256
  handler && handler(rect);
265
257
  };
266
258
 
@@ -283,6 +283,7 @@ declare const compDefaultProps: {
283
283
  borderType: string;
284
284
  disabled: boolean;
285
285
  count: boolean;
286
+ countPosition: string;
286
287
  maxLength: number;
287
288
  };
288
289
  Timeline: {
@@ -312,6 +312,7 @@ var compDefaultProps = {
312
312
  borderType: 'underline',
313
313
  disabled: false,
314
314
  count: true,
315
+ countPosition: 'outter',
315
316
  maxLength: 255
316
317
  },
317
318
  Timeline: {
@@ -5,6 +5,7 @@ export interface textAreaProps extends React.TextareaHTMLAttributes<HTMLInputEle
5
5
  borderType?: BorderType;
6
6
  defaultValue?: string;
7
7
  count?: boolean;
8
+ countPosition?: string;
8
9
  value?: any;
9
10
  canResize?: boolean;
10
11
  disabled?: boolean;
@@ -13,10 +13,10 @@ Object.defineProperty(exports, "__esModule", {
13
13
  });
14
14
  exports.default = void 0;
15
15
 
16
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
17
-
18
16
  var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
19
17
 
18
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
19
+
20
20
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
21
21
 
22
22
  var _getOwnPropertySymbols = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols"));
@@ -81,6 +81,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
81
81
  borderType = textAreaProps.borderType,
82
82
  defaultValue = textAreaProps.defaultValue,
83
83
  count = textAreaProps.count,
84
+ countPosition = textAreaProps.countPosition,
84
85
  autoSize = textAreaProps.autoSize,
85
86
  className = textAreaProps.className,
86
87
  customPrefixcls = textAreaProps.prefixCls,
@@ -93,7 +94,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
93
94
  placeholder = textAreaProps.placeholder,
94
95
  style = textAreaProps.style,
95
96
  size = textAreaProps.size,
96
- others = __rest(textAreaProps, ["value", "allowClear", "borderType", "defaultValue", "count", "autoSize", "className", "prefixCls", "canResize", "maxLength", "disabled", "onBlur", "onFocus", "onChange", "placeholder", "style", "size"]);
97
+ others = __rest(textAreaProps, ["value", "allowClear", "borderType", "defaultValue", "count", "countPosition", "autoSize", "className", "prefixCls", "canResize", "maxLength", "disabled", "onBlur", "onFocus", "onChange", "placeholder", "style", "size"]);
97
98
 
98
99
  var textAreaPrefixCls = getPrefixCls(prefixCls, 'input', customPrefixcls); // TextArea样式前缀
99
100
 
@@ -148,7 +149,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
148
149
  };
149
150
 
150
151
  var handleBlur = function handleBlur(e) {
151
- showNumberMark && setShowNumberMark(false);
152
+ // showNumberMark && setShowNumberMark(false)
152
153
  onBlur && onBlur(e);
153
154
  };
154
155
 
@@ -177,8 +178,9 @@ var InternalTextarea = function InternalTextarea(props, ref) {
177
178
  }
178
179
 
179
180
  if (count && showNumberMark && !disabled && maxLength !== '' && maxLength >= 0) {
181
+ var countClass = (0, _classnames.default)("".concat(textAreaPrefixCls, "-textarea-mark"), (0, _defineProperty2.default)({}, "".concat(textAreaPrefixCls, "-textarea-mark-inner"), countPosition === 'inner'));
180
182
  return /*#__PURE__*/_react.default.createElement("div", {
181
- className: "".concat(textAreaPrefixCls, "-textarea-mark")
183
+ className: countClass
182
184
  }, enteredLength, "/", maxLength);
183
185
  }
184
186
 
@@ -195,7 +197,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
195
197
  }, [propsValue, setValue]);
196
198
 
197
199
  var renderTextArea = function renderTextArea(prefixCls) {
198
- var _context, _classNames, _context2;
200
+ var _context, _classNames2, _context2;
199
201
 
200
202
  var hadCount = count && !disabled && !allowClear;
201
203
 
@@ -227,7 +229,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
227
229
  ref: textareaRef,
228
230
  disabled: disabled,
229
231
  style: (0, _extends2.default)({}, textareaStyles, hadCount || !!allowClear ? otherStyles : style),
230
- className: (0, _classnames.default)("".concat(prefixCls, "-textarea"), (_classNames = {}, (0, _defineProperty2.default)(_classNames, (0, _concat.default)(_context = "".concat(prefixCls, "-size-")).call(_context, size), size), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-borderless"), borderType === 'none'), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-underline"), borderType === 'underline'), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-disabled"), disabled), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-no-resize"), canResize !== true), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-allowClear-spacing"), !!allowClear), _classNames), (0, _defineProperty2.default)({}, className, className && !allowClear && !hadCount)),
232
+ className: (0, _classnames.default)("".concat(prefixCls, "-textarea"), (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, (0, _concat.default)(_context = "".concat(prefixCls, "-size-")).call(_context, size), size), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-borderless"), borderType === 'none'), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-underline"), borderType === 'underline'), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-disabled"), disabled), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-no-resize"), canResize !== true), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-allowClear-spacing"), !!allowClear), _classNames2), (0, _defineProperty2.default)({}, className, className && !allowClear && !hadCount)),
231
233
  onChange: handleChange,
232
234
  onFocus: !disabled ? handleFocus : undefined,
233
235
  onBlur: !disabled ? handleBlur : undefined,
@@ -205,6 +205,13 @@ textarea {
205
205
  z-index: 1;
206
206
  color: var(--kd-c-input-placeholder-color-text, var(--kd-g-color-text-placeholder, #ccc));
207
207
  font-size: var(--kd-c-input-font-size-small, var(--kd-g-font-size-small, 12px));
208
+ line-height: 18px;
209
+ background-color: #fff;
210
+ }
211
+ .kd-input-textarea-mark-inner {
212
+ top: auto;
213
+ bottom: 5px;
214
+ right: 8px;
208
215
  }
209
216
  .kd-input-no-resize {
210
217
  resize: none;
@@ -37,7 +37,14 @@ textarea {
37
37
  z-index: 1;
38
38
  color: @input-placeholder-color-inner;
39
39
  font-size: @input-small-font-size-inner;
40
+ line-height: 18px;
41
+ background-color: #fff;
40
42
  }
43
+ &-mark-inner {
44
+ top: auto;
45
+ bottom: 5px;
46
+ right: 8px;
47
+ }
41
48
  }
42
49
  &-no-resize {
43
50
  resize: none;
@@ -10,6 +10,14 @@ declare type TablePropsOfComponents = Pick<BaseTableProps, 'components'> & {
10
10
  };
11
11
  };
12
12
  declare type TablePropsOfExtend = Omit<BaseTableProps, 'components'>;
13
+ export declare type TableApi = {
14
+ getColumns: () => any[];
15
+ getDataSource: () => any[];
16
+ getFooterDataSource: () => any[];
17
+ };
18
+ export declare type TableInstance = {
19
+ api: TableApi;
20
+ };
13
21
  export interface TableProps extends TablePropsOfExtend, TablePropsOfComponents {
14
22
  rowSelection?: TableRowSelection;
15
23
  prefixCls?: string;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { TableProps } from './interface';
3
- declare function Table(props: TableProps): JSX.Element;
3
+ declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<unknown>>;
4
4
  export default Table;
@@ -59,7 +59,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "functi
59
59
 
60
60
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
61
61
 
62
- function Table(props) {
62
+ var Table = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
63
63
  var columns = props.columns,
64
64
  dataSource = props.dataSource,
65
65
  columnDrag = props.columnDrag,
@@ -107,19 +107,32 @@ function Table(props) {
107
107
  columns: columns,
108
108
  dataSource: dataSource
109
109
  });
110
+ var pipelineRef = (0, _react.useRef)(pipeline);
111
+ pipelineRef.current = pipeline;
110
112
 
111
113
  if (footerDataSource) {
112
114
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
113
115
  // @ts-ignore
114
116
  pipeline.footerDataSource(footerDataSource);
115
117
  }
118
+
119
+ (0, _react.useImperativeHandle)(ref, function () {
120
+ var _a, _b, _c;
121
+
122
+ return {
123
+ api: {
124
+ getColumns: (_a = pipelineRef.current.getColumns) === null || _a === void 0 ? void 0 : _a.bind(pipelineRef.current),
125
+ getDataSource: (_b = pipelineRef.current.getDataSource) === null || _b === void 0 ? void 0 : _b.bind(pipelineRef.current),
126
+ getFooterDataSource: (_c = pipelineRef.current.getFooterDataSource) === null || _c === void 0 ? void 0 : _c.bind(pipelineRef.current)
127
+ }
128
+ };
129
+ });
116
130
  /* -------------------------------------------------------------------------- */
117
131
 
118
132
  /* features */
119
133
 
120
134
  /* -------------------------------------------------------------------------- */
121
135
 
122
-
123
136
  (0, _rowSelection.default)(pipeline, rowSelection);
124
137
  (0, _rowDetail.default)(pipeline, rowDetail);
125
138
  (0, _filter2.default)(pipeline, filter);
@@ -174,7 +187,7 @@ function Table(props) {
174
187
  scrollbarWidth: scrollbarWidth,
175
188
  scrollLoad: scrollLoad
176
189
  }));
177
- }
178
-
190
+ });
191
+ Table.displayName = 'Table';
179
192
  var _default = Table;
180
193
  exports.default = _default;
@@ -114,7 +114,7 @@
114
114
  -webkit-font-feature-settings: 'tnum';
115
115
  font-feature-settings: 'tnum';
116
116
  max-width: var(--kd-c-tooltip-sizing-max-width, 360px);
117
- padding: var(--kd-c-tooltip-spacing-padding-vertical, 8px) var(--kd-c-tooltip-spacing-padding-vertical, 12px);
117
+ padding: var(--kd-c-tooltip-spacing-padding-vertical, 8px) var(--kd-c-tooltip-spacing-padding-horizontal, 12px);
118
118
  color: var(--kd-c-tooltip-color-text, var(--kd-g-color-text-primary, #212121));
119
119
  border-radius: var(--kd-c-tooltip-radius-border, var(--kd-g-radius-border, 2px));
120
120
  font-size: var(--kd-c-tooltip-color-text, var(--kd-g-font-size-small, 12px));
@@ -11,7 +11,7 @@
11
11
 
12
12
  // spacing
13
13
  @tooltip-vertical-gap: var(~'@{tooltip-custom-prefix}-spacing-padding-vertical', 8px);
14
- @tooltip-horizontal-gap: var(~'@{tooltip-custom-prefix}-spacing-padding-vertical', 12px);
14
+ @tooltip-horizontal-gap: var(~'@{tooltip-custom-prefix}-spacing-padding-horizontal', 12px);
15
15
 
16
16
  // sizing
17
17
  @tooltip-max-width: var(~'@{tooltip-custom-prefix}-sizing-max-width', 360px);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kdcloudjs/kdesign",
3
- "version": "1.6.5",
3
+ "version": "1.6.6",
4
4
  "description": "KDesign 金蝶前端react 组件库",
5
5
  "title": "kdesign",
6
6
  "keywords": [