@zat-design/sisyphus-react 3.4.2-beta.1 → 3.4.2-beta.3

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 (66) hide show
  1. package/dist/index.esm.css +172 -108
  2. package/es/ProEditLabel/style/index.less +1 -1
  3. package/es/ProEditTable/components/RenderField/index.js +9 -11
  4. package/es/ProEditTable/style/index.less +1 -1
  5. package/es/ProEditTable/utils/tools.js +3 -1
  6. package/es/ProForm/components/base/DatePicker/index.js +2 -2
  7. package/es/ProForm/components/combination/Group/index.js +6 -9
  8. package/es/ProForm/components/combination/Group/style/index.less +4 -4
  9. package/es/ProForm/components/combination/Group/utils.d.ts +2 -0
  10. package/es/ProForm/components/combination/Group/utils.js +10 -0
  11. package/es/ProForm/components/combination/ProTimeLimit/index.js +8 -2
  12. package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +59 -55
  13. package/es/ProLayout/components/Layout/Menu/style/index.less +52 -56
  14. package/es/ProLayout/components/ProCollapse/PropTypes.d.ts +5 -0
  15. package/es/ProLayout/components/ProCollapse/index.js +3 -0
  16. package/es/ProLayout/components/ProCollapse/style/index.less +26 -5
  17. package/es/ProLayout/components/ProHeader/style/index.less +2 -2
  18. package/es/ProLayout/style/index.less +98 -88
  19. package/es/ProTable/style/index.less +2 -2
  20. package/es/ProThemeTools/component/PrdTools/index.d.ts +1 -1
  21. package/es/ProThemeTools/component/PrdTools/index.js +2 -2
  22. package/es/ProThemeTools/component/PrdTools/style/index.less +1 -1
  23. package/es/ProThemeTools/index.js +21 -28
  24. package/es/ProThemeTools/propsType.d.ts +1 -1
  25. package/es/ProThemeTools/style/index.less +25 -8
  26. package/es/ProTreeModal/style/index.less +2 -2
  27. package/es/ProUpload/style/fileItem.less +2 -2
  28. package/es/ProUpload/style/index.less +2 -2
  29. package/es/assets/setting.svg +14 -0
  30. package/es/style/components.less +0 -1
  31. package/es/style/theme/index.less +2 -2
  32. package/es/style/theme/tokens.less +2 -2
  33. package/es/tokens.js +2 -2
  34. package/lib/ProEditLabel/style/index.less +1 -1
  35. package/lib/ProEditTable/components/RenderField/index.js +8 -10
  36. package/lib/ProEditTable/style/index.less +1 -1
  37. package/lib/ProEditTable/utils/tools.js +3 -1
  38. package/lib/ProForm/components/base/DatePicker/index.js +1 -1
  39. package/lib/ProForm/components/combination/Group/index.js +4 -7
  40. package/lib/ProForm/components/combination/Group/style/index.less +4 -4
  41. package/lib/ProForm/components/combination/Group/utils.d.ts +2 -0
  42. package/lib/ProForm/components/combination/Group/utils.js +11 -1
  43. package/lib/ProForm/components/combination/ProTimeLimit/index.js +7 -1
  44. package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +59 -55
  45. package/lib/ProLayout/components/Layout/Menu/style/index.less +52 -56
  46. package/lib/ProLayout/components/ProCollapse/PropTypes.d.ts +5 -0
  47. package/lib/ProLayout/components/ProCollapse/index.js +3 -0
  48. package/lib/ProLayout/components/ProCollapse/style/index.less +26 -5
  49. package/lib/ProLayout/components/ProHeader/style/index.less +2 -2
  50. package/lib/ProLayout/style/index.less +98 -88
  51. package/lib/ProTable/style/index.less +2 -2
  52. package/lib/ProThemeTools/component/PrdTools/index.d.ts +1 -1
  53. package/lib/ProThemeTools/component/PrdTools/index.js +2 -2
  54. package/lib/ProThemeTools/component/PrdTools/style/index.less +1 -1
  55. package/lib/ProThemeTools/index.js +19 -27
  56. package/lib/ProThemeTools/propsType.d.ts +1 -1
  57. package/lib/ProThemeTools/style/index.less +25 -8
  58. package/lib/ProTreeModal/style/index.less +2 -2
  59. package/lib/ProUpload/style/fileItem.less +2 -2
  60. package/lib/ProUpload/style/index.less +2 -2
  61. package/lib/assets/setting.svg +14 -0
  62. package/lib/style/components.less +0 -1
  63. package/lib/style/theme/index.less +2 -2
  64. package/lib/style/theme/tokens.less +2 -2
  65. package/lib/tokens.js +2 -2
  66. package/package.json +1 -1
@@ -56,8 +56,8 @@
56
56
  @zaui-form-required-after: var(--zaui-form-required-after; inline);
57
57
  @zaui-form-required-before: var(--zaui-form-required-before; none);
58
58
  @zaui-form-label-width: var(--zaui-form-label-width; 130px);
59
- @zaui-border-radius: var(--zaui-border-radius; 4px);
60
- @zaui-border-radius-card: var(--zaui-border-radius-card; 2px);
59
+ @zaui-border-radius: var(--zaui-border-radius; 8px);
60
+ @zaui-border-radius-card: var(--zaui-border-radius-card; 4px);
61
61
  @zaui-font-size-title:
62
62
  calc(var(--zaui-font-size-title; 16px) + var(--zaui-base-font-size; 0px));
63
63
  @zaui-font-size-card-title:
package/es/tokens.js CHANGED
@@ -53,8 +53,8 @@ var tokens = {
53
53
  '@zaui-form-required-after': 'var(--zaui-form-required-after, inline)',
54
54
  '@zaui-form-required-before': 'var(--zaui-form-required-before, none)',
55
55
  '@zaui-form-label-width': 'var(--zaui-form-label-width, 130px)',
56
- '@zaui-border-radius': 'var(--zaui-border-radius, 4px)',
57
- '@zaui-border-radius-card': 'var(--zaui-border-radius-card, 2px)',
56
+ '@zaui-border-radius': 'var(--zaui-border-radius, 8px)',
57
+ '@zaui-border-radius-card': 'var(--zaui-border-radius-card, 4px)',
58
58
  '@zaui-font-size-title': 'calc(var(--zaui-font-size-title, 16px) + var(--zaui-base-font-size, 0px))',
59
59
  '@zaui-font-size-card-title': 'calc(var(--zaui-font-size-card-title, 16px) + var(--zaui-base-font-size, 0px))',
60
60
  '@zaui-font-size': 'calc(var(--zaui-font-size, 14px) + var(--zaui-base-font-size, 0px))',
@@ -39,7 +39,7 @@
39
39
 
40
40
  &:active {
41
41
  background : #E3E8F0;
42
- border-radius: var(--zaui-border-radius-card, 2px);
42
+ border-radius: var(--zaui-border-radius-card, 4px);
43
43
  }
44
44
  }
45
45
 
@@ -28,12 +28,11 @@ var _useFieldProps = require("../../../ProForm/utils/useFieldProps");
28
28
  var _useListChanged3 = require("../../../ProForm/utils/useListChanged");
29
29
  var _useRules = _interopRequireDefault(require("../../../ProForm/utils/useRules"));
30
30
  var _utils = require("../../../ProForm/utils");
31
- var _locale = _interopRequireDefault(require("../../../locale"));
32
31
  var _excluded = ["type", "valueType", "names", "fieldProps", "labelRequired", "editRender", "component", "viewRender", "title", "originTitle", "label", "dataIndex", "formItemProps", "isEditable", "required", "rules", "equalWith", "className"];
33
32
  /* eslint-disable prefer-destructuring */
34
33
  /* eslint-disable prefer-const */
35
34
  var RenderField = function RenderField(_ref) {
36
- var _type, _type$replace, _fieldProps2, _fieldProps3, _fieldProps4, _names, _formItemChildProps$p, _TargetComponent4;
35
+ var _type, _type$replace, _fieldProps2, _fieldProps3, _fieldProps4, _names, _TargetComponent4;
37
36
  var value = _ref.text,
38
37
  record = _ref.record,
39
38
  index = _ref.index,
@@ -144,7 +143,7 @@ var RenderField = function RenderField(_ref) {
144
143
  var formItemChildProps = (0, _objectSpread2.default)({}, _fieldProps);
145
144
  // 允许formItem的属性放在column最外层
146
145
  var _formItemProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, resetProps), internalRule);
147
- if (['Switch', 'Checkbox'].includes(type)) {
146
+ if (['Switch', 'SwitchCheckbox'].includes(type)) {
148
147
  _formItemProps.valuePropName = 'checked';
149
148
  valueType = 'switch';
150
149
  }
@@ -244,8 +243,6 @@ var RenderField = function RenderField(_ref) {
244
243
  TargetComponent = viewRender;
245
244
  }
246
245
  }
247
- var defaultPlaceholder = ['Select', 'EnumSelect', 'DatePicker', 'RangePicker', 'Cascader', 'ProSelect', 'ProEnum', 'ProTimeLimit'].includes(type) ? "".concat(_locale.default.ProEditTable.select).concat((0, _lodash.isString)(label) ? label || title : '') : "".concat(_locale.default.ProEditTable.enter).concat((0, _lodash.isString)(label) ? label || title : '');
248
- var _placeholder = (_formItemChildProps$p = formItemChildProps === null || formItemChildProps === void 0 ? void 0 : formItemChildProps.placeholder) !== null && _formItemChildProps$p !== void 0 ? _formItemChildProps$p : defaultPlaceholder;
249
246
  var onChange = formItemChildProps === null || formItemChildProps === void 0 ? void 0 : formItemChildProps.onChange;
250
247
  var onFieldChange = formItemChildProps === null || formItemChildProps === void 0 ? void 0 : formItemChildProps.onFieldChange;
251
248
  var onBlur = formItemChildProps === null || formItemChildProps === void 0 ? void 0 : formItemChildProps.onBlur;
@@ -306,7 +303,7 @@ var RenderField = function RenderField(_ref) {
306
303
  }
307
304
  _args = [].concat(args);
308
305
  rowPath = [].concat((0, _toConsumableArray2.default)(namePath), [index]);
309
- row = form.getFieldValue(rowPath);
306
+ row = form.getFieldValue(rowPath, true);
310
307
  orgRow = (0, _lodash.cloneDeep)(row);
311
308
  if (!onFieldChange) {
312
309
  _context.next = 18;
@@ -358,7 +355,9 @@ var RenderField = function RenderField(_ref) {
358
355
  return [].concat((0, _toConsumableArray2.default)(rowPath), [key]);
359
356
  });
360
357
  if (validateFieldKeys === null || validateFieldKeys === void 0 ? void 0 : validateFieldKeys.length) {
361
- form.validateFields(validateFieldKeys);
358
+ setTimeout(function () {
359
+ form.validateFields(validateFieldKeys);
360
+ }, 100);
362
361
  }
363
362
  }
364
363
  setState({
@@ -471,8 +470,7 @@ var RenderField = function RenderField(_ref) {
471
470
  originalValue = _useListChanged2[1];
472
471
  var componentProps = (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({
473
472
  form: form,
474
- name: cellName,
475
- placeholder: _placeholder
473
+ name: cellName
476
474
  }, _fieldProps), (_TargetComponent4 = TargetComponent) === null || _TargetComponent4 === void 0 ? void 0 : _TargetComponent4.props), {}, {
477
475
  disabled: _disabled,
478
476
  onChange: _onchange,
@@ -490,7 +488,7 @@ var RenderField = function RenderField(_ref) {
490
488
  if (isCell) {
491
489
  record["".concat(dataIndex, "-Disabled")] = _disabled;
492
490
  }
493
- if (['Switch', 'Checkbox'].includes(type)) {
491
+ if (['Switch', 'SwitchCheckbox'].includes(type)) {
494
492
  _formItemProps.valuePropName = 'checked';
495
493
  }
496
494
  (0, _react.useEffect)(function () {
@@ -55,7 +55,7 @@
55
55
 
56
56
  &:hover {
57
57
  border : 1px solid #DEE0E3;
58
- border-radius: var(--zaui-border-radius, 4px);
58
+ border-radius: var(--zaui-border-radius, 8px);
59
59
  text-indent : 5px;
60
60
  }
61
61
  }
@@ -12,7 +12,9 @@ var getRandom = exports.getRandom = function getRandom() {
12
12
  var difference = exports.difference = function difference(object, base) {
13
13
  var changes = function changes(object, base) {
14
14
  return (0, _lodash.transform)(object, function (result, value, key) {
15
- if (!(0, _lodash.isEqual)(value, base[key])) {
15
+ if (key.indexOf('-') > -1) {
16
+ result[key] = true;
17
+ } else if (!(0, _lodash.isEqual)(value, base[key])) {
16
18
  result[key] = (0, _lodash.isObject)(value) && (0, _lodash.isObject)(base[key]) ? changes(value, base[key]) : value;
17
19
  }
18
20
  });
@@ -36,7 +36,7 @@ var DatePicker = function DatePicker(props) {
36
36
  var viewChildren = null;
37
37
  if (!value) {
38
38
  viewChildren = null;
39
- } else if (typeof format === 'string' && _moment.default.isMoment(value)) {
39
+ } else if (typeof format === 'string' && (0, _lodash.isObject)(value)) {
40
40
  viewChildren = value.format(format);
41
41
  } else if ((0, _lodash.isFunction)(format)) {
42
42
  viewChildren = format(value);
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
10
- var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
10
  var _jsxRuntime = require("react/jsx-runtime");
12
11
  var _antd = require("antd");
13
12
  var _react = require("react");
@@ -28,10 +27,6 @@ var Group = function Group(props) {
28
27
  id = props.id,
29
28
  value = props.value,
30
29
  onFieldChange = props.onFieldChange;
31
- var _useCounter = (0, _ahooks.useCounter)(0),
32
- _useCounter2 = (0, _slicedToArray2.default)(_useCounter, 2),
33
- num = _useCounter2[0],
34
- inc = _useCounter2[1].inc;
35
30
  var _ref = _ProForm.default.useFieldProps() || {},
36
31
  names = _ref.names,
37
32
  name = _ref.name,
@@ -69,13 +64,15 @@ var Group = function Group(props) {
69
64
  })
70
65
  }, "".concat(className), className));
71
66
  (0, _ahooks.useDeepCompareEffect)(function () {
67
+ var _document, _document$activeEleme;
68
+ // 焦点激活的表单
69
+ var touchName = ((_document = document) === null || _document === void 0 ? void 0 : (_document$activeEleme = _document.activeElement) === null || _document$activeEleme === void 0 ? void 0 : _document$activeEleme.id) || '';
72
70
  // 模拟change,初始化不执行onFieldChange
73
- if ((0, _lodash.isFunction)(onFieldChange) && num >= 1) {
71
+ if ((0, _lodash.isFunction)(onFieldChange) && form.isFieldsTouched(names) && (0, _utils.transformNamesString)(names).includes(touchName)) {
74
72
  onFieldChange(value, form.getFieldsValue(), {
75
73
  form: form
76
74
  });
77
75
  }
78
- inc();
79
76
  }, [value]);
80
77
  return (0, _jsxRuntime.jsx)("div", {
81
78
  className: _className,
@@ -9,13 +9,13 @@
9
9
  }
10
10
 
11
11
  .start-radius() {
12
- border-start-start-radius: var(--zaui-border-radius, 4px);
13
- border-end-start-radius: var(--zaui-border-radius, 4px);
12
+ border-start-start-radius: 4px;
13
+ border-end-start-radius: 4px;
14
14
  }
15
15
 
16
16
  .end-radius() {
17
- border-start-end-radius: var(--zaui-border-radius, 4px);
18
- border-end-end-radius: var(--zaui-border-radius, 4px);
17
+ border-start-end-radius: 4px;
18
+ border-end-end-radius: 4px;
19
19
  }
20
20
 
21
21
  .pro-group {
@@ -6,3 +6,5 @@ import { SpaceType } from './propsType';
6
6
  * @returns
7
7
  */
8
8
  export declare const insertSeparator: (columns: any, space?: SpaceType, separatorNode?: ReactNode, otherProps?: any) => any;
9
+ /** 转换names */
10
+ export declare const transformNamesString: (arr: (string | string[])[]) => (string | string[])[];
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.insertSeparator = void 0;
7
+ exports.transformNamesString = exports.insertSeparator = void 0;
8
8
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
9
9
  /**
10
10
  * 插入间隔符
@@ -40,4 +40,14 @@ var insertSeparator = exports.insertSeparator = function insertSeparator(columns
40
40
  }
41
41
  return result;
42
42
  }, []);
43
+ };
44
+ /** 转换names */
45
+ var transformNamesString = exports.transformNamesString = function transformNamesString(arr) {
46
+ var result = arr.map(function (subArr) {
47
+ if (Array.isArray(subArr)) {
48
+ return subArr.join('_');
49
+ }
50
+ return subArr;
51
+ });
52
+ return result;
43
53
  };
@@ -55,7 +55,7 @@ var ProTimeLimit = exports.ProTimeLimit = function ProTimeLimit(props) {
55
55
  onChange = _useControlled2[1];
56
56
  var initialConfig = (0, _ProConfigProvider.useProConfig)('ProTimeLimit');
57
57
  var isForever = (0, _react.useMemo)(function () {
58
- if (_moment.default.isMoment(value)) {
58
+ if ((0, _lodash.isObject)(value)) {
59
59
  return foreverMoment.format(format) === value.format(format);
60
60
  }
61
61
  return false;
@@ -75,6 +75,12 @@ var ProTimeLimit = exports.ProTimeLimit = function ProTimeLimit(props) {
75
75
  children: foreverText
76
76
  });
77
77
  }
78
+ if ((0, _lodash.isObject)(value)) {
79
+ return (0, _jsxRuntime.jsx)(_Container.default, {
80
+ viewEmpty: viewEmpty,
81
+ children: value.format(format)
82
+ });
83
+ }
78
84
  return (0, _jsxRuntime.jsx)(_Container.default, {
79
85
  viewEmpty: viewEmpty,
80
86
  children: props.value
@@ -7,33 +7,36 @@
7
7
  .@{ant-prefix}-menu-root {
8
8
  overflow-y: auto !important;
9
9
 
10
- &>.@{ant-prefix}-menu-submenu>.@{ant-prefix}-menu-submenu-title,
11
- &>.@{ant-prefix}-menu-item.@{ant-prefix}-menu-item-only-child {
10
+ & > .@{ant-prefix}-menu-submenu > .@{ant-prefix}-menu-submenu-title,
11
+ & > .@{ant-prefix}-menu-item.@{ant-prefix}-menu-item-only-child {
12
12
  padding-left: 16px !important;
13
13
  }
14
14
 
15
- &>.@{ant-prefix}-menu-submenu {
15
+ & > .@{ant-prefix}-menu-submenu {
16
16
  .@{ant-prefix}-menu-sub {
17
- background: #1A202D;
17
+ background: #1a202d;
18
18
  }
19
19
 
20
- &>.@{ant-prefix}-menu-sub>.@{ant-prefix}-menu-submenu>.@{ant-prefix}-menu-submenu-title,
21
- &>.@{ant-prefix}-menu-item-only-child,
22
- &>.@{ant-prefix}-menu-sub>.@{ant-prefix}-menu-item-only-child {
20
+ & > .@{ant-prefix}-menu-sub > .@{ant-prefix}-menu-submenu > .@{ant-prefix}-menu-submenu-title,
21
+ & > .@{ant-prefix}-menu-item-only-child,
22
+ & > .@{ant-prefix}-menu-sub > .@{ant-prefix}-menu-item-only-child {
23
23
  padding-left: 16px !important;
24
24
  }
25
25
  }
26
26
 
27
- &>.@{ant-prefix}-menu-item-only-child {
28
- min-height : 48px;
29
- padding-top : 12px;
30
- padding-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1) - var(--zaui-space-size-xs; 4px) * var(--zaui-size; 1));
31
- margin : 0;
32
- height : auto;
27
+ & > .@{ant-prefix}-menu-item-only-child {
28
+ height: auto;
29
+ min-height: 48px;
30
+ margin: 0;
31
+ padding-top: 12px;
32
+ padding-bottom: calc(
33
+ var(--zaui-space-size-md; 16px) * var(--zaui-size; 1) - var(--zaui-space-size-xs; 4px) *
34
+ var(--zaui-size; 1)
35
+ );
33
36
 
34
37
  h2 {
38
+ height: auto !important;
35
39
  line-height: initial !important;
36
- height : auto !important;
37
40
  white-space: pre-wrap;
38
41
  }
39
42
  }
@@ -45,7 +48,6 @@
45
48
  display: none;
46
49
  }
47
50
  }
48
-
49
51
  }
50
52
 
51
53
  .@{ant-prefix}-menu-inline {
@@ -62,14 +64,12 @@
62
64
  h2 {
63
65
  color: #fff;
64
66
  }
65
-
66
67
  }
67
68
  }
68
69
 
69
-
70
70
  .@{ant-prefix}-menu.@{ant-prefix}-menu-dark {
71
- background: #1A202D;
72
71
  overflow-x: hidden;
72
+ background: #1a202d;
73
73
 
74
74
  .@{ant-prefix}-menu-item-only-child {
75
75
  &:hover {
@@ -90,104 +90,108 @@
90
90
  }
91
91
  }
92
92
 
93
- .@{ant-prefix}-menu-sub.@{ant-prefix}-menu-inline>.@{ant-prefix}-menu-item,
93
+ .@{ant-prefix}-menu-sub.@{ant-prefix}-menu-inline > .@{ant-prefix}-menu-item,
94
94
  .@{ant-prefix}-menu-submenu-title {
95
- white-space: pre-wrap;
96
- line-height: initial !important;
97
- height : auto !important;
98
- margin : 0;
95
+ height: auto !important;
96
+ min-height: 48px;
97
+ margin: 0;
99
98
  padding: 12px 0;
100
- min-height : 48px;
99
+ line-height: initial !important;
100
+ white-space: pre-wrap;
101
101
  }
102
102
 
103
103
  .@{ant-prefix}-menu-title-content {
104
-
105
-
106
104
  div {
107
- display : flex;
108
- align-items : center;
105
+ display: flex;
106
+ align-items: center;
109
107
  justify-content: left;
110
108
 
111
109
  .pro-layout-icon {
112
- flex : 0 0 20px;
113
- width : 20px;
110
+ flex: 0 0 20px;
111
+ width: 20px;
114
112
  height: 20px;
115
- color : #CACACA;
113
+ color: #cacaca;
116
114
  }
117
115
 
118
116
  h2 {
119
- flex-grow : 1;
117
+ display: inline-block;
118
+ flex-grow: 1;
120
119
  margin-bottom: 0;
121
- opacity : 1;
122
- transition : opacity .3s cubic-bezier(.645, .045, .355, 1), margin .3s, color .3s;
123
- display : inline-block;
124
- padding-left : 12px;
125
- color : #CACACA;
126
- font-weight : 400;
127
- font-size : var(--zaui-font-size-md, 14px);
120
+ padding-left: 12px;
121
+ color: #cacaca;
122
+ font-weight: 400;
123
+ font-size: var(--zaui-font-size-md, 14px);
124
+ opacity: 1;
125
+ transition: opacity 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), margin 0.3s, color 0.3s;
128
126
  }
129
127
  }
130
-
131
-
132
128
  }
133
129
 
134
130
  .anticon-caret-down {
135
- color : #CACACA;
136
- transform : rotateZ(0deg);
137
- top : auto;
131
+ top: auto;
132
+ color: #cacaca;
133
+ transform: rotateZ(0deg);
138
134
  transition: all 0.1s ease-in;
139
135
  }
140
136
 
141
137
  .@{ant-prefix}-menu-submenu-open {
142
138
  .anticon-caret-down {
139
+ color: #fff;
143
140
  transform: rotateZ(180deg);
144
- color : #fff;
145
141
  }
146
142
 
147
143
  .@{ant-prefix}-menu-submenu-inline {
148
144
  .anticon-caret-down {
145
+ color: #cacaca;
149
146
  transform: rotateZ(0deg);
150
- color : #CACACA;
151
147
  }
152
148
 
153
149
  &.@{ant-prefix}-menu-submenu-open {
154
150
  .anticon-caret-down {
151
+ color: #fff;
155
152
  transform: rotateZ(180deg);
156
- color : #fff;
157
153
  }
158
154
  }
159
155
  }
160
156
  }
161
157
 
162
- .@{ant-prefix}-menu-submenu:hover>.@{ant-prefix}-menu-submenu-title>.@{ant-prefix}-menu-submenu-expand-icon {
158
+ .@{ant-prefix}-menu-submenu:hover
159
+ > .@{ant-prefix}-menu-submenu-title
160
+ > .@{ant-prefix}-menu-submenu-expand-icon {
163
161
  color: #fff;
164
162
  }
165
163
 
164
+ .@{ant-prefix}-menu-item-selected{
165
+ background: #000 !important;
166
+ .@{ant-prefix}-menu-title-content{
167
+ h2{
168
+ font-weight: bold !important;
169
+ }
170
+ }
171
+ }
172
+
166
173
  .@{ant-prefix}-menu-submenu-selected {
167
- &>.@{ant-prefix}-menu-submenu-title {
174
+ & > .@{ant-prefix}-menu-submenu-title {
168
175
  .@{ant-prefix}-menu-title-content div {
169
176
  .pro-layout-icon {
170
177
  color: #fff;
171
178
  }
172
179
 
173
180
  h2 {
174
- font-weight: bold;
175
- color : #fff;
181
+ color: #fff;
176
182
  }
177
183
  }
178
-
179
184
  }
180
185
 
181
186
  .@{ant-prefix}-menu-item-only-child .@{ant-prefix}-menu-title-content div {
182
187
  .pro-layout-icon {
183
- color: #CACACA;
188
+ color: #cacaca;
184
189
  }
185
190
 
186
191
  h2 {
192
+ color: #cacaca;
187
193
  font-weight: 400;
188
- color : #CACACA;
189
194
  }
190
195
  }
191
-
192
196
  }
193
197
  }
@@ -1,36 +1,35 @@
1
1
  @root-entry-name: 'default';
2
2
  @import (reference) '~antd/es/style/themes/index.less';
3
- @import "../FoldMenu/style/index.less";
4
- @import "../OpenMenu/style/index.less";
5
- @import "../SideMenu/style/index.less";
3
+ @import '../FoldMenu/style/index.less';
4
+ @import '../OpenMenu/style/index.less';
5
+ @import '../SideMenu/style/index.less';
6
6
 
7
7
  /** 侧边栏 + 内容区 */
8
8
  .pro-layout-row {
9
9
  flex-direction: column;
10
10
 
11
-
12
11
  .pro-layout-menu-open {
13
- .pro-layout-arrow {
12
+ .pro-layout-arrow {
14
13
  transform: rotate(225deg);
15
14
  }
16
15
  }
17
16
 
18
17
  .pro-layout-arrow {
19
- width : 10px;
20
- height : 10px;
18
+ width: 10px;
19
+ height: 10px;
20
+ margin-left: -5px;
21
21
  background-color: transparent;
22
22
  /* 模块背景为透明 */
23
- border-color : #fff;
24
- border-style : solid;
25
- border-width : 2px 2px 0 0;
26
- margin-left : -5px;
27
- transform : rotate(45deg);
23
+ border-color: #fff;
24
+ border-style: solid;
25
+ border-width: 2px 2px 0 0;
26
+ transform: rotate(45deg);
28
27
  }
29
28
 
30
29
  &.pro-layout-menu-no-collapsed {
31
30
  .pro-layout-menu-fold-li {
32
- display : flex;
33
- align-items : center;
31
+ display: flex;
32
+ align-items: center;
34
33
  justify-content: center;
35
34
 
36
35
  div {
@@ -42,11 +41,10 @@
42
41
  }
43
42
 
44
43
  h2 {
45
- display : inline-block;
44
+ display: inline-block;
46
45
  white-space: nowrap;
47
- opacity : 0;
48
- transition : opacity 0.5s cubic-bezier(0.645, 0.045, 0.355, 1),
49
- color 0.5s;
46
+ opacity: 0;
47
+ transition: opacity 0.5s cubic-bezier(0.645, 0.045, 0.355, 1), color 0.5s;
50
48
  }
51
49
  }
52
50
  }
@@ -81,18 +79,18 @@
81
79
  }
82
80
 
83
81
  .pro-layout-menu {
84
- position : fixed;
85
- top : 48px;
86
- left : 0;
87
- z-index : 1;
88
- width : 48px;
89
- height : 100vh;
90
- min-height : 100%;
91
- padding : 0;
92
- overflow-x : hidden;
93
- overflow-y : auto;
82
+ position: fixed;
83
+ top: 48px;
84
+ left: 0;
85
+ z-index: 99;
86
+ width: 48px;
87
+ height: 100vh;
88
+ min-height: 100%;
89
+ padding: 0;
90
+ overflow-x: hidden;
91
+ overflow-y: auto;
94
92
  background-color: #1a202d;
95
- transition : background .3s, width .3s cubic-bezier(.2, 0, 0, 1) 0s;
93
+ transition: background 0.3s, width 0.3s cubic-bezier(0.2, 0, 0, 1) 0s;
96
94
 
97
95
  &.pro-layout-menu-open {
98
96
  width: 220px;
@@ -101,52 +99,50 @@
101
99
 
102
100
  /** 内容区 */
103
101
  .pro-layout-content {
104
- flex : auto;
102
+ z-index: 1;
103
+ flex: auto;
104
+ flex: auto;
105
+ min-height: calc(100vh - 48px);
106
+ margin-top: 48px;
105
107
  margin-left: 48px;
106
- padding : 0 var(--zaui-space-size-md, 16px);
107
- transition : all 0.3s ease-in-out;
108
- z-index : 1;
109
- flex : auto;
110
- min-height : calc(100vh - 48px);
111
- margin-top : 48px;
108
+ padding: 0 var(--zaui-space-size-md, 16px);
109
+ transition: all 0.3s ease-in-out;
112
110
  }
113
111
 
114
-
115
-
116
112
  .pro-layout-menu.pro-layout-menu-open .pro-layout-menu-collapsed {
117
- left : 0;
118
- width: 220px
113
+ left: 0;
114
+ width: 220px;
119
115
  }
120
116
 
121
117
  .pro-layout-menu.pro-layout-menu-open .pro-layout-menu-collapsed img {
122
- transform: rotate(-180deg)
118
+ transform: rotate(-180deg);
123
119
  }
124
120
 
125
121
  .pro-layout-menu .pro-layout-menu-collapsed {
126
- position : fixed;
127
- bottom : 0;
128
- left : 0;
129
- z-index : 2;
130
- display : flex;
131
- align-items : center;
122
+ position: fixed;
123
+ bottom: 0;
124
+ left: 0;
125
+ z-index: 2;
126
+ display: flex;
127
+ align-items: center;
132
128
  justify-content: center;
133
- width : 48px;
134
- height : 48px;
135
- transition : all .25s ease;
136
- background : #292f3b
129
+ width: 48px;
130
+ height: 48px;
131
+ background: #292f3b;
132
+ transition: all 0.25s ease;
137
133
  }
138
134
 
139
135
  .pro-layout-menu .pro-layout-menu-collapsed:hover {
140
- background-color: rgba(185, 185, 189, .1)
136
+ background-color: rgba(185, 185, 189, 0.1);
141
137
  }
142
138
 
143
139
  .pro-layout-menu .pro-layout-menu-collapsed img {
144
140
  display: inline-block;
145
- width : 20px;
146
- height : 20px
141
+ width: 20px;
142
+ height: 20px;
147
143
  }
148
144
 
149
- .pro-layout-menu-open~.pro-layout-content {
150
- margin-left: 220px !important
145
+ .pro-layout-menu-open ~ .pro-layout-content {
146
+ margin-left: 220px !important;
151
147
  }
152
148
  }
@@ -15,6 +15,11 @@ export interface TitleListProps {
15
15
  }
16
16
  export interface ProCollapseProps {
17
17
  /**
18
+ * @description 折叠头部模式
19
+ * @default default
20
+ */
21
+ mode?: 'default' | 'card';
22
+ /**
18
23
  * @description 折叠头部标题
19
24
  * @default -
20
25
  */
@@ -30,10 +30,13 @@ var ProCollapse = function ProCollapse(props) {
30
30
  _props$folding = props.folding,
31
31
  folding = _props$folding === void 0 ? false : _props$folding,
32
32
  collapseProps = props.collapseProps,
33
+ _props$mode = props.mode,
34
+ mode = _props$mode === void 0 ? 'default' : _props$mode,
33
35
  collapsePanelProps = props.collapsePanelProps,
34
36
  className = props.className;
35
37
  var cls = (0, _classnames.default)((0, _defineProperty2.default)({
36
38
  'pro-collapse': true,
39
+ 'pro-collapse-card': mode === 'card',
37
40
  'pro-collapse-level2': level === '2',
38
41
  'pro-collapse-list': titleList === null || titleList === void 0 ? void 0 : titleList.length,
39
42
  'pro-collapse-no-title': !title