@teamix/pro 1.4.16 → 1.4.17

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 (55) hide show
  1. package/dist/pro.css +1 -1
  2. package/dist/pro.js +192 -94
  3. package/dist/pro.min.css +1 -1
  4. package/dist/pro.min.js +1 -1
  5. package/es/actions/base.d.ts +1 -2
  6. package/es/actions/base.js +1 -11
  7. package/es/actions/dialog.d.ts +0 -2
  8. package/es/actions/dialog.js +1 -26
  9. package/es/actions/drawer.js +0 -7
  10. package/es/card/index.js +49 -6
  11. package/es/card/index.scss +8 -0
  12. package/es/form/ProForm/index.js +0 -2
  13. package/es/index.d.ts +1 -1
  14. package/es/index.js +1 -1
  15. package/es/info/components/baseInfo/index.js +9 -3
  16. package/es/info/components/headerInfo/index.js +11 -3
  17. package/es/info/components/tableInfo/index.js +6 -3
  18. package/es/info/typing.d.ts +2 -0
  19. package/es/info/utils/index.d.ts +8 -0
  20. package/es/info/utils/index.js +28 -1
  21. package/es/sidebar/components/tree-node/index.js +15 -6
  22. package/es/sidebar/components/tree-node/index.scss +9 -5
  23. package/es/sidebar/index.js +2 -2
  24. package/es/sidebar/index.scss +13 -1
  25. package/es/sidebar/typing.d.ts +4 -2
  26. package/es/sidebar/utils/index.d.ts +278 -0
  27. package/es/sidebar/utils/index.js +55 -14
  28. package/es/table/index.js +6 -3
  29. package/es/table/index.scss +8 -0
  30. package/lib/actions/base.d.ts +1 -2
  31. package/lib/actions/base.js +1 -11
  32. package/lib/actions/dialog.d.ts +0 -2
  33. package/lib/actions/dialog.js +1 -27
  34. package/lib/actions/drawer.js +0 -8
  35. package/lib/card/index.js +58 -6
  36. package/lib/card/index.scss +8 -0
  37. package/lib/form/ProForm/index.js +0 -2
  38. package/lib/index.d.ts +1 -1
  39. package/lib/index.js +1 -1
  40. package/lib/info/components/baseInfo/index.js +8 -2
  41. package/lib/info/components/headerInfo/index.js +10 -2
  42. package/lib/info/components/tableInfo/index.js +5 -2
  43. package/lib/info/typing.d.ts +2 -0
  44. package/lib/info/utils/index.d.ts +8 -0
  45. package/lib/info/utils/index.js +29 -0
  46. package/lib/sidebar/components/tree-node/index.js +16 -6
  47. package/lib/sidebar/components/tree-node/index.scss +9 -5
  48. package/lib/sidebar/index.js +2 -2
  49. package/lib/sidebar/index.scss +13 -1
  50. package/lib/sidebar/typing.d.ts +4 -2
  51. package/lib/sidebar/utils/index.d.ts +278 -0
  52. package/lib/sidebar/utils/index.js +56 -14
  53. package/lib/table/index.js +6 -3
  54. package/lib/table/index.scss +8 -0
  55. package/package.json +1 -1
package/lib/card/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
 
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
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -38,7 +40,9 @@ var _tab = _interopRequireDefault(require("./tab"));
38
40
 
39
41
  require("./index.scss");
40
42
 
41
- var _proField = _interopRequireDefault(require("@teamix/pro-field"));
43
+ var _proField = _interopRequireWildcard(require("@teamix/pro-field"));
44
+
45
+ var _reactDom = _interopRequireDefault(require("react-dom"));
42
46
 
43
47
  var _cardContainer = require("./card-container");
44
48
 
@@ -56,6 +60,10 @@ Object.keys(_cardContainer).forEach(function (key) {
56
60
  var _excluded = ["context"],
57
61
  _excluded2 = ["children", "title", "subTitle", "tooltip", "tooltipIcon", "tags", "description", "extra", "actions", "message", "style", "className", "image", "hoveredShadow", "divider", "bordered", "compacted", "centered", "loading", "contentLoading", "empty", "borderColor", "backgroundColor", "contentClassName", "contentStyle", "direction", "wrap", "spacing", "split", "collapsible", "defaultCollapsed", "collapsed", "onCollapse", "context"];
58
62
 
63
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
64
+
65
+ 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; }
66
+
59
67
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
60
68
 
61
69
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
@@ -155,9 +163,20 @@ var ProCard = function ProCard(props) {
155
163
  innerCollapseState = _React$useState2[0],
156
164
  setInnerCollapseState = _React$useState2[1];
157
165
 
166
+ var cardRef = _react.default.useRef(); // 表头 tooltip tags description 宽度
167
+
168
+
169
+ var _React$useState3 = _react.default.useState(0),
170
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
171
+ headerWithoutTitleWidth = _React$useState4[0],
172
+ setHeaderWithoutTitleWidth = _React$useState4[1];
173
+
158
174
  var _formatSpacing = (0, _utils2.formatSpacing)(spacing),
159
175
  horizonal = _formatSpacing.horizonal,
160
- vertical = _formatSpacing.vertical;
176
+ vertical = _formatSpacing.vertical; // useEffect(() => {
177
+ // calculateHeaderWidth();
178
+ // }, []);
179
+
161
180
 
162
181
  var hasDivider = (divider || !!split) && (title || extra);
163
182
  var hasCollapse = collapsible === true || defaultCollapsed !== undefined || collapsed !== undefined;
@@ -234,7 +253,29 @@ var ProCard = function ProCard(props) {
234
253
  marginBottom: -vertical
235
254
  } : {};
236
255
 
237
- var cardContentStyle = _objectSpread(_objectSpread({}, cardContentMargin), contentStyle);
256
+ var cardContentStyle = _objectSpread(_objectSpread({}, cardContentMargin), contentStyle); // 计算宽度
257
+
258
+
259
+ var calculateHeaderWidth = function calculateHeaderWidth() {
260
+ if (cardRef === null || cardRef === void 0 ? void 0 : cardRef.current) {
261
+ var _tooltipDom$clientWid, _tagsDom$clientWidth, _descriptionDom$clien;
262
+
263
+ var cardDom = _reactDom.default.findDOMNode(cardRef.current);
264
+
265
+ var headerDom = cardDom === null || cardDom === void 0 ? void 0 : cardDom.querySelector('.teamix-pro-card-title');
266
+ var tooltipDom = headerDom === null || headerDom === void 0 ? void 0 : headerDom.querySelector('.teamix-pro-card-title-tooltip');
267
+ var tagsDom = headerDom === null || headerDom === void 0 ? void 0 : headerDom.querySelector('.teamix-pro-tags');
268
+ var descriptionDom = headerDom === null || headerDom === void 0 ? void 0 : headerDom.querySelector('.teamix-pro-card-title-description');
269
+ var widthList = [(_tooltipDom$clientWid = tooltipDom === null || tooltipDom === void 0 ? void 0 : tooltipDom.clientWidth) !== null && _tooltipDom$clientWid !== void 0 ? _tooltipDom$clientWid : 0, (_tagsDom$clientWidth = tagsDom === null || tagsDom === void 0 ? void 0 : tagsDom.clientWidth) !== null && _tagsDom$clientWidth !== void 0 ? _tagsDom$clientWidth : 0, (_descriptionDom$clien = descriptionDom === null || descriptionDom === void 0 ? void 0 : descriptionDom.clientWidth) !== null && _descriptionDom$clien !== void 0 ? _descriptionDom$clien : 0].filter(function (item) {
270
+ return item;
271
+ });
272
+ var width = widthList.reduce(function (acc, cur) {
273
+ return acc + cur;
274
+ }, 0) + widthList.length * 8; // 无法取出精准宽度,减去1作为阈值
275
+
276
+ setHeaderWithoutTitleWidth(width - 1);
277
+ }
278
+ };
238
279
 
239
280
  var renderTitle = function renderTitle() {
240
281
  var icon = tooltipIcon || 'info-circle-line';
@@ -254,9 +295,20 @@ var ProCard = function ProCard(props) {
254
295
  type: "down-fill"
255
296
  }), /*#__PURE__*/_react.default.createElement("div", {
256
297
  className: cls('title-name')
257
- }, title)), !hasCollapse && /*#__PURE__*/_react.default.createElement("div", {
258
- className: cls('title-name')
259
- }, title), tooltip && /*#__PURE__*/_react.default.createElement("div", {
298
+ }, /*#__PURE__*/_react.default.createElement(_proField.default, {
299
+ value: title,
300
+ type: "text",
301
+ render: {
302
+ ellipsis: true
303
+ }
304
+ }))), !hasCollapse && /*#__PURE__*/_react.default.createElement("div", {
305
+ className: cls('title-name'),
306
+ style: {
307
+ maxWidth: "calc(100% - ".concat(headerWithoutTitleWidth, "px)")
308
+ }
309
+ }, /*#__PURE__*/_react.default.createElement(_proField.Ellipsis, {
310
+ tooltip: title
311
+ }, title)), tooltip && /*#__PURE__*/_react.default.createElement("div", {
260
312
  className: cls('title-tooltip')
261
313
  }, /*#__PURE__*/_react.default.createElement(_components.Balloon.Tooltip, {
262
314
  align: "t",
@@ -40,6 +40,13 @@
40
40
  }
41
41
  }
42
42
 
43
+ .next-card-header-titles {
44
+ padding-right: 8px;
45
+ }
46
+ .next-card-header-extra {
47
+ margin-top: 2px;
48
+ }
49
+
43
50
  &-title {
44
51
  display: flex;
45
52
  align-items: center;
@@ -80,6 +87,7 @@
80
87
 
81
88
  &-description {
82
89
  font-size: 12px;
90
+ min-width: 40px;
83
91
  }
84
92
  }
85
93
 
@@ -126,11 +126,9 @@ var ProForm = /*#__PURE__*/(0, _react.memo)(function (_ref) {
126
126
  var mergedComponents = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, globalComponents), components), formilyComponents), _ProField.default);
127
127
 
128
128
  var onAutoSubmit = (0, _useAutoSubmit.default)(onSubmit, context);
129
- console.log(otherProps);
130
129
  var autoTeamixLayout = (0, _useAutoLayout.default)(_objectSpread(_objectSpread({}, otherProps), {}, {
131
130
  schema: schema
132
131
  }), formRef);
133
- console.log(autoTeamixLayout);
134
132
  (0, _react.useMemo)(function () {
135
133
  // 配置表单默认值
136
134
  if (initialValues) {
package/lib/index.d.ts CHANGED
@@ -28,5 +28,5 @@ export * from './table';
28
28
  export * from './sidebar';
29
29
  export * from './utils';
30
30
  export * from './timeline';
31
- declare const version = "1.4.16";
31
+ declare const version = "1.4.17";
32
32
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, hooks, nocode, templates, utils, };
package/lib/index.js CHANGED
@@ -317,5 +317,5 @@ if (!((_window = window) === null || _window === void 0 ? void 0 : _window.TEAMI
317
317
  _icon.default.setConfig(_utils.default.getTeamixIconConfig());
318
318
  }
319
319
 
320
- var version = '1.4.16';
320
+ var version = '1.4.17';
321
321
  exports.version = version;
@@ -74,7 +74,13 @@ var ProBaseInfo = function ProBaseInfo(props) {
74
74
 
75
75
  var renderContent = function renderContent() {
76
76
  return columns.map(function (item, index) {
77
- var _layout$span, _layout$span2, _item$title, _item$valueType, _ref, _item$colSpan;
77
+ var _ref, _ref2, _layout$span, _layout$span2, _item$title, _item$valueType, _ref3, _item$colSpan;
78
+
79
+ var hidden = (0, _utils2.isHidden)(item === null || item === void 0 ? void 0 : item.hidden, (0, _utils2.getDataIndexValue)(item.dataIndex, (_ref = dataSource !== null && dataSource !== void 0 ? dataSource : result) !== null && _ref !== void 0 ? _ref : {}), (_ref2 = dataSource !== null && dataSource !== void 0 ? dataSource : result) !== null && _ref2 !== void 0 ? _ref2 : {}, context);
80
+
81
+ if (hidden) {
82
+ return;
83
+ }
78
84
 
79
85
  var span = item.colSpan ? defaultLayout.span * item.colSpan : defaultLayout.span;
80
86
  var layoutSpan = item.colSpan ? ((_layout$span = layout === null || layout === void 0 ? void 0 : layout.span) !== null && _layout$span !== void 0 ? _layout$span : span) * item.colSpan : (_layout$span2 = layout === null || layout === void 0 ? void 0 : layout.span) !== null && _layout$span2 !== void 0 ? _layout$span2 : span;
@@ -86,7 +92,7 @@ var ProBaseInfo = function ProBaseInfo(props) {
86
92
  loading: loading,
87
93
  value: /*#__PURE__*/_react.default.createElement(_InfoValueItem.default, {
88
94
  type: (_item$valueType = item === null || item === void 0 ? void 0 : item.valueType) !== null && _item$valueType !== void 0 ? _item$valueType : 'text',
89
- value: (0, _utils2.getDataIndexValue)(item.dataIndex, (_ref = dataSource !== null && dataSource !== void 0 ? dataSource : result) !== null && _ref !== void 0 ? _ref : {}),
95
+ value: (0, _utils2.getDataIndexValue)(item.dataIndex, (_ref3 = dataSource !== null && dataSource !== void 0 ? dataSource : result) !== null && _ref3 !== void 0 ? _ref3 : {}),
90
96
  render: item.render,
91
97
  dataSource: item.dataSource,
92
98
  infoItem: item,
@@ -35,13 +35,20 @@ var ProHeaderInfo = function ProHeaderInfo(props) {
35
35
  loading = props.loading,
36
36
  result = props.result,
37
37
  actionRef = props.actionRef,
38
- size = props.size;
38
+ size = props.size,
39
+ context = props.context;
39
40
 
40
41
  var defaultLayout = _layout.default[(0, _utils.getLayout)((_size$width = size === null || size === void 0 ? void 0 : size.width) !== null && _size$width !== void 0 ? _size$width : 0)];
41
42
 
42
43
  var renderContent = function renderContent() {
43
44
  return columns.map(function (item, index) {
44
- var _item$title, _item$valueType;
45
+ var _ref, _ref2, _item$title, _item$valueType;
46
+
47
+ var hidden = (0, _utils2.isHidden)(item === null || item === void 0 ? void 0 : item.hidden, (0, _utils2.getDataIndexValue)(item.dataIndex, (_ref = dataSource !== null && dataSource !== void 0 ? dataSource : result) !== null && _ref !== void 0 ? _ref : {}), (_ref2 = dataSource !== null && dataSource !== void 0 ? dataSource : result) !== null && _ref2 !== void 0 ? _ref2 : {}, context);
48
+
49
+ if (hidden) {
50
+ return;
51
+ }
45
52
 
46
53
  var span = 24;
47
54
 
@@ -69,6 +76,7 @@ var ProHeaderInfo = function ProHeaderInfo(props) {
69
76
  infoItem: item,
70
77
  record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
71
78
  actionRef: actionRef,
79
+ context: context,
72
80
  props: item.props
73
81
  }),
74
82
  headerInfoLayout: layout !== null && layout !== void 0 ? layout : defaultLayout,
@@ -54,7 +54,8 @@ var ProTableInfo = function ProTableInfo(props) {
54
54
  layout = _props$layout === void 0 ? {} : _props$layout,
55
55
  loading = props.loading,
56
56
  result = props.result,
57
- actionRef = props.actionRef;
57
+ actionRef = props.actionRef,
58
+ context = props.context;
58
59
  var _layout$colNum = layout.colNum,
59
60
  colNum = _layout$colNum === void 0 ? 2 : _layout$colNum,
60
61
  _layout$labelGutter = layout.labelGutter,
@@ -94,7 +95,9 @@ var ProTableInfo = function ProTableInfo(props) {
94
95
 
95
96
  var newDataSource = (0, _react.useMemo)(function () {
96
97
  var nResult = [];
97
- var columnsCopy = (0, _lodash.default)(columns); // 取当前行的数据。直到取完
98
+ var columnsCopy = (0, _lodash.default)(columns).filter(function (item) {
99
+ return !(0, _utils.isHidden)(item.hidden, (0, _utils.getDataIndexValue)(item.dataIndex, dataSource !== null && dataSource !== void 0 ? dataSource : result), dataSource !== null && dataSource !== void 0 ? dataSource : result, context);
100
+ }); // 取当前行的数据。直到取完
98
101
 
99
102
  while (columnsCopy.length > 0) {
100
103
  var filterColumns = [];
@@ -98,6 +98,8 @@ export interface ProInfoColumnsProps {
98
98
  props?: any;
99
99
  /** 对齐方式 **/
100
100
  alignItems?: 'center' | 'flex-start' | 'flex-end' | string;
101
+ /** 是否隐藏 **/
102
+ hidden?: boolean | ProInfoCellFunProp | string;
101
103
  }
102
104
  export declare type ProInfoActionType = {
103
105
  /** 刷新Info */
@@ -10,3 +10,11 @@ export declare const ProInfoGroupContext: React.Context<ProInfoGroupContextProps
10
10
  * @returns
11
11
  */
12
12
  export declare function getDataIndexValue(dataIndex: ProInfoColumnsProps['dataIndex'], dataSource: object): any;
13
+ /**
14
+ * 判断是否隐藏
15
+ * @param hidden
16
+ * @param value
17
+ * @param record
18
+ * @param context
19
+ */
20
+ export declare function isHidden(hidden: ProInfoColumnsProps['hidden'], value: any, record: any, context: any): any;
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.ProInfoGroupContext = void 0;
7
7
  exports.getDataIndexValue = getDataIndexValue;
8
+ exports.isHidden = isHidden;
8
9
  exports.useActionType = useActionType;
9
10
 
10
11
  var _utils = require("@teamix/utils");
@@ -47,4 +48,32 @@ function getDataIndexValue(dataIndex, dataSource) {
47
48
  }
48
49
 
49
50
  return (0, _utils.getDeepValue)(dataIndex !== null && dataIndex !== void 0 ? dataIndex : '', dataSource);
51
+ }
52
+ /**
53
+ * 判断是否隐藏
54
+ * @param hidden
55
+ * @param value
56
+ * @param record
57
+ * @param context
58
+ */
59
+
60
+
61
+ function isHidden(hidden, value, record, context) {
62
+ if (typeof hidden === 'string') {
63
+ return (0, _utils.getTargetValue)(hidden, _objectSpread(_objectSpread({}, record), {}, {
64
+ record: record,
65
+ value: value,
66
+ context: context
67
+ }));
68
+ }
69
+
70
+ if (typeof hidden === 'boolean') {
71
+ return hidden;
72
+ }
73
+
74
+ if (typeof hidden === 'function') {
75
+ return hidden === null || hidden === void 0 ? void 0 : hidden(value, record);
76
+ }
77
+
78
+ return false;
50
79
  }
@@ -17,6 +17,8 @@ var _react = _interopRequireWildcard(require("react"));
17
17
 
18
18
  var _proField = _interopRequireWildcard(require("@teamix/pro-field"));
19
19
 
20
+ var _ = require("../..");
21
+
20
22
  var _IconAction = _interopRequireDefault(require("./components/IconAction"));
21
23
 
22
24
  var _IconSwitch = _interopRequireDefault(require("./components/IconSwitch"));
@@ -225,10 +227,14 @@ var ProSideBarTreeNode = function ProSideBarTreeNode(props) {
225
227
 
226
228
  function renderTreeNode(data) {
227
229
  return data.map(function (item) {
228
- return /*#__PURE__*/_react.default.createElement(_components.Tree.Node, {
230
+ var _getTreeNodeProps = (0, _.getTreeNodeProps)(item),
231
+ nodeProps = _getTreeNodeProps.nodeProps,
232
+ labelProps = _getTreeNodeProps.labelProps;
233
+
234
+ return /*#__PURE__*/_react.default.createElement(_components.Tree.Node, _objectSpread({
229
235
  key: item.value,
230
- label: /*#__PURE__*/_react.default.createElement(ProSideBarTreeNode, _objectSpread({}, item))
231
- }, item.children && item.children.length > 0 && renderTreeNode(item.children));
236
+ label: /*#__PURE__*/_react.default.createElement(ProSideBarTreeNode, _objectSpread({}, labelProps))
237
+ }, nodeProps), item.children && item.children.length > 0 && renderTreeNode(item.children));
232
238
  });
233
239
  } // 渲染树节点 依赖 value
234
240
 
@@ -241,10 +247,14 @@ function renderTreeNodeDependenceValue(data, onBeforeRenderNodeEvent, checkedKey
241
247
  newProps = onBeforeRenderNodeEvent(item, checkedKeys, selectedKeys, allData !== null && allData !== void 0 ? allData : data);
242
248
  }
243
249
 
244
- return /*#__PURE__*/_react.default.createElement(_components.Tree.Node, {
250
+ var _getTreeNodeProps2 = (0, _.getTreeNodeProps)(item),
251
+ nodeProps = _getTreeNodeProps2.nodeProps,
252
+ labelProps = _getTreeNodeProps2.labelProps;
253
+
254
+ return /*#__PURE__*/_react.default.createElement(_components.Tree.Node, _objectSpread({
245
255
  key: item.value,
246
- label: /*#__PURE__*/_react.default.createElement(ProSideBarTreeNode, _objectSpread({}, newProps))
247
- }, item.children && item.children.length > 0 && renderTreeNodeDependenceValue(item.children, onBeforeRenderNodeEvent, checkedKeys, selectedKeys, allData !== null && allData !== void 0 ? allData : data));
256
+ label: /*#__PURE__*/_react.default.createElement(ProSideBarTreeNode, _objectSpread({}, labelProps))
257
+ }, nodeProps), item.children && item.children.length > 0 && renderTreeNodeDependenceValue(item.children, onBeforeRenderNodeEvent, checkedKeys, selectedKeys, allData !== null && allData !== void 0 ? allData : data));
248
258
  });
249
259
  }
250
260
 
@@ -50,9 +50,13 @@
50
50
  font-weight: unset;
51
51
  }
52
52
  }
53
- .next-tree.next-node-block .next-tree-node-inner{
54
- padding: 6px 0px 6px 4px !important;
55
- margin: 0 0 4px 0px;
56
- border-radius: 2px;
53
+ }
54
+ .teamix-pro-sidebar-deep-1 {
55
+ .teamix-pro-sidebar-tree {
56
+ .next-tree.next-node-block .next-tree-node-inner{
57
+ padding: 6px 0px 6px 4px !important;
58
+ margin: 0 0 4px 0px;
59
+ border-radius: 2px;
60
+ }
57
61
  }
58
- }
62
+ }
@@ -218,10 +218,10 @@ var ProSidebar = function ProSidebar(props) {
218
218
  };
219
219
 
220
220
  return /*#__PURE__*/_react.default.createElement("div", {
221
- className: "".concat(cls({
221
+ className: "".concat(cls(_defineProperty({
222
222
  '': true,
223
223
  'scroll-tree': scrollArea === 'tree'
224
- }), " ").concat(className),
224
+ }, "deep-".concat(expandLevel), true)), " ").concat(className),
225
225
  style: style
226
226
  }, /*#__PURE__*/_react.default.createElement(_sidebarContainer.default, _objectSpread(_objectSpread({
227
227
  searchOnChange: (0, _lodash.default)(function (value) {
@@ -11,7 +11,8 @@
11
11
  .teamix-pro-sidebar-container,
12
12
  .teamix-pro-card,
13
13
  .next-card-content-container,
14
- .teamix-pro-card-content {
14
+ .teamix-pro-card-content,
15
+ .teamix-pro-card-box{
15
16
  height: 100%;
16
17
  }
17
18
  .teamix-pro-sidebar-container-context {
@@ -24,3 +25,14 @@
24
25
  color: unset;
25
26
  }
26
27
  }
28
+ .teamix-pro-page-container-sidebar {
29
+ .teamix-pro-sidebar {
30
+ .teamix-pro-sidebar-container {
31
+ .next-card-header.next-card-header {
32
+ padding-top: 0;
33
+ }
34
+ }
35
+ }
36
+ }
37
+
38
+
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { MessageProps } from '@alifd/next/types/message';
3
- import { TreeProps } from '@alifd/next/types/tree';
3
+ import { NodeProps, TreeProps } from '@alifd/next/types/tree';
4
4
  import { CommonRequestConfig } from '@teamix/utils';
5
5
  import { ProTagItem } from '../field';
6
6
  import { ProActionConfig, ProCardProps, ProFieldProps, ProFieldRenderProps, ProFieldType } from '..';
@@ -48,7 +48,9 @@ export declare type ProSidebarDataSourceItem = {
48
48
  render?: ProFieldRenderProps;
49
49
  /** ProField 的其他配置项 */
50
50
  fieldProps?: ProFieldProps;
51
- };
51
+ /** TreeNode 的其他配置项 */
52
+ treeNodeProps?: ProFieldProps;
53
+ } & NodeProps;
52
54
  /** 单项 extra 配置项 */
53
55
  export declare type ProSidebarExtraProps = React.ReactNode | (ProSidebarExtraPropsItem | React.ReactNode)[];
54
56
  export declare type ProSidebarExtraPropsItem = {