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

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 (116) hide show
  1. package/dist/index.esm.css +239 -122
  2. package/es/ProEditLabel/style/index.less +1 -1
  3. package/es/ProEditTable/components/RenderField/index.js +13 -15
  4. package/es/ProEditTable/index.js +3 -3
  5. package/es/ProEditTable/propsType.d.ts +1 -1
  6. package/es/ProEditTable/style/index.less +1 -1
  7. package/es/ProEditTable/utils/index.js +36 -22
  8. package/es/ProEditTable/utils/tools.js +3 -1
  9. package/es/ProEnum/style/index.less +2 -2
  10. package/es/ProForm/components/base/DatePicker/index.js +2 -2
  11. package/es/ProForm/components/combination/Group/index.js +6 -9
  12. package/es/ProForm/components/combination/Group/style/index.less +4 -4
  13. package/es/ProForm/components/combination/Group/utils.d.ts +2 -0
  14. package/es/ProForm/components/combination/Group/utils.js +10 -0
  15. package/es/ProForm/components/combination/ProTimeLimit/index.js +8 -2
  16. package/es/ProForm/components/render/Render.js +2 -2
  17. package/es/ProForm/components/render/RenderFields.d.ts +1 -1
  18. package/es/ProForm/components/render/RenderFields.js +2 -2
  19. package/es/ProForm/index.js +4 -4
  20. package/es/ProForm/propsType.d.ts +1 -1
  21. package/es/ProForm/utils/{contrastOriginal.d.ts → diffOriginal.d.ts} +2 -1
  22. package/es/ProForm/utils/diffOriginal.js +61 -0
  23. package/es/ProForm/utils/index.d.ts +1 -1
  24. package/es/ProForm/utils/index.js +1 -1
  25. package/es/ProForm/utils/transformValue.js +2 -2
  26. package/es/ProForm/utils/useChanged.js +4 -3
  27. package/es/ProForm/utils/useListChanged.d.ts +1 -1
  28. package/es/ProForm/utils/useListChanged.js +4 -3
  29. package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +58 -55
  30. package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +25 -20
  31. package/es/ProLayout/components/Layout/Menu/style/index.less +52 -56
  32. package/es/ProLayout/components/ProCollapse/style/index.less +17 -9
  33. package/es/ProLayout/components/ProFooter/index.js +1 -1
  34. package/es/ProLayout/components/ProFooter/style/index.less +1 -1
  35. package/es/ProLayout/components/ProHeader/style/index.less +4 -3
  36. package/es/ProLayout/style/index.less +173 -87
  37. package/es/ProTable/components/RenderColumn/index.d.ts +1 -1
  38. package/es/ProTable/components/RenderColumn/index.js +3 -3
  39. package/es/ProTable/propsType.d.ts +1 -1
  40. package/es/ProTable/style/index.less +2 -2
  41. package/es/ProTable/utils.js +9 -9
  42. package/es/ProTabs/style/index.less +3 -1
  43. package/es/ProThemeTools/component/PrdTools/index.d.ts +1 -1
  44. package/es/ProThemeTools/component/PrdTools/index.js +2 -2
  45. package/es/ProThemeTools/component/PrdTools/style/index.less +1 -1
  46. package/es/ProThemeTools/index.js +21 -28
  47. package/es/ProThemeTools/propsType.d.ts +1 -1
  48. package/es/ProThemeTools/style/index.less +25 -8
  49. package/es/ProTreeModal/style/index.less +2 -2
  50. package/es/ProUpload/style/fileItem.less +2 -2
  51. package/es/ProUpload/style/index.less +2 -2
  52. package/es/assets/setting.svg +14 -0
  53. package/es/style/components.less +0 -1
  54. package/es/style/theme/antd.less +0 -1
  55. package/es/style/theme/index.less +2 -2
  56. package/es/style/theme/tokens.less +2 -2
  57. package/es/tokens.js +2 -2
  58. package/lib/ProEditLabel/style/index.less +1 -1
  59. package/lib/ProEditTable/components/RenderField/index.js +12 -14
  60. package/lib/ProEditTable/index.js +3 -3
  61. package/lib/ProEditTable/propsType.d.ts +1 -1
  62. package/lib/ProEditTable/style/index.less +1 -1
  63. package/lib/ProEditTable/utils/index.js +36 -22
  64. package/lib/ProEditTable/utils/tools.js +3 -1
  65. package/lib/ProEnum/style/index.less +2 -2
  66. package/lib/ProForm/components/base/DatePicker/index.js +1 -1
  67. package/lib/ProForm/components/combination/Group/index.js +4 -7
  68. package/lib/ProForm/components/combination/Group/style/index.less +4 -4
  69. package/lib/ProForm/components/combination/Group/utils.d.ts +2 -0
  70. package/lib/ProForm/components/combination/Group/utils.js +11 -1
  71. package/lib/ProForm/components/combination/ProTimeLimit/index.js +7 -1
  72. package/lib/ProForm/components/render/Render.js +2 -2
  73. package/lib/ProForm/components/render/RenderFields.d.ts +1 -1
  74. package/lib/ProForm/components/render/RenderFields.js +2 -2
  75. package/lib/ProForm/index.js +4 -4
  76. package/lib/ProForm/propsType.d.ts +1 -1
  77. package/lib/ProForm/utils/{contrastOriginal.d.ts → diffOriginal.d.ts} +2 -1
  78. package/lib/ProForm/utils/diffOriginal.js +68 -0
  79. package/lib/ProForm/utils/index.d.ts +1 -1
  80. package/lib/ProForm/utils/index.js +2 -2
  81. package/lib/ProForm/utils/transformValue.js +1 -1
  82. package/lib/ProForm/utils/useChanged.js +4 -3
  83. package/lib/ProForm/utils/useListChanged.d.ts +1 -1
  84. package/lib/ProForm/utils/useListChanged.js +4 -3
  85. package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +58 -55
  86. package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +25 -20
  87. package/lib/ProLayout/components/Layout/Menu/style/index.less +52 -56
  88. package/lib/ProLayout/components/ProCollapse/style/index.less +17 -9
  89. package/lib/ProLayout/components/ProFooter/index.js +1 -1
  90. package/lib/ProLayout/components/ProFooter/style/index.less +1 -1
  91. package/lib/ProLayout/components/ProHeader/style/index.less +4 -3
  92. package/lib/ProLayout/style/index.less +173 -87
  93. package/lib/ProTable/components/RenderColumn/index.d.ts +1 -1
  94. package/lib/ProTable/components/RenderColumn/index.js +3 -3
  95. package/lib/ProTable/propsType.d.ts +1 -1
  96. package/lib/ProTable/style/index.less +2 -2
  97. package/lib/ProTable/utils.js +9 -9
  98. package/lib/ProTabs/style/index.less +3 -1
  99. package/lib/ProThemeTools/component/PrdTools/index.d.ts +1 -1
  100. package/lib/ProThemeTools/component/PrdTools/index.js +2 -2
  101. package/lib/ProThemeTools/component/PrdTools/style/index.less +1 -1
  102. package/lib/ProThemeTools/index.js +19 -27
  103. package/lib/ProThemeTools/propsType.d.ts +1 -1
  104. package/lib/ProThemeTools/style/index.less +25 -8
  105. package/lib/ProTreeModal/style/index.less +2 -2
  106. package/lib/ProUpload/style/fileItem.less +2 -2
  107. package/lib/ProUpload/style/index.less +2 -2
  108. package/lib/assets/setting.svg +14 -0
  109. package/lib/style/components.less +0 -1
  110. package/lib/style/theme/antd.less +0 -1
  111. package/lib/style/theme/index.less +2 -2
  112. package/lib/style/theme/tokens.less +2 -2
  113. package/lib/tokens.js +2 -2
  114. package/package.json +1 -1
  115. package/es/ProForm/utils/contrastOriginal.js +0 -24
  116. package/lib/ProForm/utils/contrastOriginal.js +0 -30
@@ -33,7 +33,7 @@ var RenderFields = function RenderFields(props) {
33
33
  outerClearNotShow = props.clearNotShow,
34
34
  requiredOnView = props.requiredOnView,
35
35
  required = props.required,
36
- originalTip = props.originalTip,
36
+ originalDiffTip = props.originalDiffTip,
37
37
  globalControl = props.globalControl;
38
38
  // 是否包含隐藏字段
39
39
  var hiddenData = columns.filter(function (item) {
@@ -213,7 +213,7 @@ var RenderFields = function RenderFields(props) {
213
213
  originalValues: originalValues,
214
214
  equalWith: equalWith,
215
215
  requiredOnView: requiredOnView,
216
- originalTip: originalTip,
216
+ originalDiffTip: originalDiffTip,
217
217
  globalControl: globalControl
218
218
  })
219
219
  }, "".concat(_formItemProps.name || _formItemProps.label).concat(index));
@@ -25,7 +25,7 @@ var _index = require("./utils/index");
25
25
  var _useForm3 = require("./utils/useForm");
26
26
  var _useFieldProps = require("./utils/useFieldProps");
27
27
  var _locale = _interopRequireDefault(require("../locale"));
28
- var _excluded = ["mode", "span", "disabled", "isView", "columns", "footer", "onOk", "okText", "onCancel", "confirmLoading", "cancelText", "form", "children", "rowProps", "className", "expand", "expandOpen", "expandOpenChange", "viewEmpty", "labelAlign", "labelWidth", "onValuesChange", "onFinish", "originalValues", "submitOnEnter", "clearNotShow", "initialValues", "requiredOnView", "formId", "required", "originalTip", "formKey", "globalControl"];
28
+ var _excluded = ["mode", "span", "disabled", "isView", "columns", "footer", "onOk", "okText", "onCancel", "confirmLoading", "cancelText", "form", "children", "rowProps", "className", "expand", "expandOpen", "expandOpenChange", "viewEmpty", "labelAlign", "labelWidth", "onValuesChange", "onFinish", "originalValues", "submitOnEnter", "clearNotShow", "initialValues", "requiredOnView", "formId", "required", "originalDiffTip", "formKey", "globalControl"];
29
29
  var ProForm = function ProForm(props, ref) {
30
30
  var _forms$formKey, _localStorage;
31
31
  var _props$mode = props.mode,
@@ -64,8 +64,8 @@ var ProForm = function ProForm(props, ref) {
64
64
  requiredOnView = _props$requiredOnView === void 0 ? true : _props$requiredOnView,
65
65
  formId = props.formId,
66
66
  required = props.required,
67
- _props$originalTip = props.originalTip,
68
- originalTip = _props$originalTip === void 0 ? true : _props$originalTip,
67
+ _props$originalDiffTi = props.originalDiffTip,
68
+ originalDiffTip = _props$originalDiffTi === void 0 ? true : _props$originalDiffTi,
69
69
  formKey = props.formKey,
70
70
  globalControl = props.globalControl,
71
71
  otherProps = (0, _objectWithoutProperties2.default)(props, _excluded);
@@ -255,7 +255,7 @@ var ProForm = function ProForm(props, ref) {
255
255
  clearNotShow: clearNotShow,
256
256
  requiredOnView: requiredOnView,
257
257
  required: required,
258
- originalTip: originalTip,
258
+ originalDiffTip: originalDiffTip,
259
259
  globalControl: globalControl
260
260
  }), children, footerRender()]
261
261
  }))
@@ -69,7 +69,7 @@ export interface ProFormProps<Values = any> extends FormProps<Values> {
69
69
  requiredOnView?: boolean;
70
70
  formId?: string;
71
71
  required?: boolean;
72
- originalTip?: boolean;
72
+ originalDiffTip?: boolean;
73
73
  }
74
74
  export interface Transform<T = any> {
75
75
  normalize?: (value: StoreValue, prevValue: StoreValue, allValues: Store) => StoreValue;
@@ -3,7 +3,8 @@ interface Params {
3
3
  originalValue: any;
4
4
  value: any;
5
5
  form: FormInstance;
6
+ name?: string | any[];
6
7
  equalWith?: (originalValue: any, currentValue: any) => boolean;
7
8
  }
8
- export declare const contrastOriginal: (params: Params) => boolean;
9
+ export declare const diffOriginal: (params: Params) => boolean;
9
10
  export {};
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.diffOriginal = void 0;
8
+ var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
9
+ var _lodash = require("lodash");
10
+ var nullValue = [null, undefined, '']; // 输入框空值时可能存在的三种值 视为相等
11
+ var extractValue = function extractValue(obj, path) {
12
+ var value = obj || {};
13
+ if (!Object.keys(obj)) {
14
+ return [];
15
+ }
16
+ var _iterator = (0, _createForOfIteratorHelper2.default)(path),
17
+ _step;
18
+ try {
19
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
20
+ var key = _step.value;
21
+ if (value && value.hasOwnProperty(key)) {
22
+ value = value[key];
23
+ } else {
24
+ return undefined;
25
+ }
26
+ }
27
+ } catch (err) {
28
+ _iterator.e(err);
29
+ } finally {
30
+ _iterator.f();
31
+ }
32
+ return Object.values(value);
33
+ };
34
+ /** 将解构后的name值,反向转回names,例如 formData {a:1, b:2} names ['a', 'b'] 返回 [1,2] */
35
+ var extractValues = function extractValues(data, pathString) {
36
+ if (pathString.includes('_')) {
37
+ var namePrefixes = pathString.split('-')[0].split('_').slice(0, -1);
38
+ return extractValue(data, namePrefixes);
39
+ }
40
+ return pathString.split('-').map(function (item) {
41
+ return data[item];
42
+ });
43
+ };
44
+ var diffOriginal = exports.diffOriginal = function diffOriginal(params) {
45
+ var originalValue = params.originalValue,
46
+ _value = params.value,
47
+ equalWith = params.equalWith,
48
+ form = params.form,
49
+ name = params.name;
50
+ var value = !(name === null || name === void 0 ? void 0 : name.includes('-')) ? _value : extractValues(form.getFieldsValue(), name);
51
+ // 支持传入自定义比较事件
52
+ if ((0, _lodash.isFunction)(equalWith)) {
53
+ return !equalWith(originalValue, value);
54
+ }
55
+ if (Array.isArray(originalValue)) {
56
+ return originalValue.some(function (valueItem, index) {
57
+ // 如果两个值有一个不是空值, 则进行深比较
58
+ if (!nullValue.includes(value === null || value === void 0 ? void 0 : value[index]) || !nullValue.includes(valueItem)) {
59
+ return !(0, _lodash.isEqual)(value === null || value === void 0 ? void 0 : value[index], valueItem);
60
+ }
61
+ return false;
62
+ });
63
+ }
64
+ if (!nullValue.includes(value) || !nullValue.includes(originalValue)) {
65
+ return !(0, _lodash.isEqual)(value, originalValue);
66
+ }
67
+ return false;
68
+ };
@@ -26,7 +26,7 @@ export declare const isTrim: (type: string, trim: boolean, configData: any) => a
26
26
  */
27
27
  export declare const isUpperCase: (type: string, upperCase: boolean) => any;
28
28
  export declare const weedOutProps: (data: Record<string, any>, keys: string[]) => {}[];
29
- export declare const contrast: (prevValues: any, curValues: any, names: NamePath[]) => boolean;
29
+ export declare const diffField: (prevValues: any, curValues: any, names: NamePath[]) => boolean;
30
30
  export declare const splitNameStr: (name: string) => NamePath[];
31
31
  export declare const filterInternalFields: (values: any) => any;
32
32
  export declare const getAllNamePath: (object: Record<string, any>, currentPath?: InternalNamePath) => InternalNamePath[];
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.getAllNamePath = exports.findOptionByValue = exports.filterInternalFields = exports.equalDependencies = exports.deleteForPath = exports.customEqualForFun = exports.contrast = void 0;
8
+ exports.getAllNamePath = exports.findOptionByValue = exports.filterInternalFields = exports.equalDependencies = exports.diffField = exports.deleteForPath = exports.customEqualForFun = void 0;
9
9
  exports.getArrayBeforeNumber = getArrayBeforeNumber;
10
10
  exports.hasRowKey = exports.getLayout = exports.getDecimalDigits = void 0;
11
11
  exports.initialValuesToNames = initialValuesToNames;
@@ -124,7 +124,7 @@ var weedOutProps = exports.weedOutProps = function weedOutProps(data, keys) {
124
124
  return [obj, weedOut];
125
125
  };
126
126
  // 对比字段变化
127
- var contrast = exports.contrast = function contrast(prevValues, curValues, names) {
127
+ var diffField = exports.diffField = function diffField(prevValues, curValues, names) {
128
128
  return names.some(function (name) {
129
129
  return _lodash.default.get(prevValues, name) !== _lodash.default.get(curValues, name);
130
130
  });
@@ -48,7 +48,7 @@ var transformValue = exports.transformValue = function transformValue(names, for
48
48
  }, cusRest);
49
49
  },
50
50
  shouldUpdate: function shouldUpdate(prevValues, curValues) {
51
- return (0, _utils.contrast)(prevValues, curValues, names);
51
+ return (0, _utils.diffField)(prevValues, curValues, names);
52
52
  }
53
53
  };
54
54
  };
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.useChanged = void 0;
7
7
  var _antd = require("antd");
8
8
  var _lodash = require("lodash");
9
- var _contrastOriginal = require("./contrastOriginal");
9
+ var _diffOriginal = require("./diffOriginal");
10
10
  var useChanged = exports.useChanged = function useChanged(_ref) {
11
11
  var name = _ref.name,
12
12
  names = _ref.names,
@@ -21,11 +21,12 @@ var useChanged = exports.useChanged = function useChanged(_ref) {
21
21
  if (notWatch) form = [];
22
22
  var value = _antd.Form.useWatch(namesStr || name, form);
23
23
  if (notWatch) return [false];
24
- var changed = (0, _contrastOriginal.contrastOriginal)({
24
+ var changed = (0, _diffOriginal.diffOriginal)({
25
25
  originalValue: originalValue,
26
26
  value: value,
27
27
  form: form,
28
- equalWith: equalWith
28
+ equalWith: equalWith,
29
+ name: namesStr || name
29
30
  });
30
31
  return [changed, originalValue];
31
32
  };
@@ -1,7 +1,7 @@
1
1
  import { FormInstance } from 'antd';
2
2
  import { InternalNamePath, NamePath } from 'antd/lib/form/interface';
3
3
  interface Params {
4
- name?: NamePath;
4
+ name?: any;
5
5
  names?: NamePath[];
6
6
  namesStr?: NamePath;
7
7
  originalName?: NamePath;
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.useListChanged = void 0;
7
7
  var _antd = require("antd");
8
8
  var _lodash = require("lodash");
9
- var _contrastOriginal = require("./contrastOriginal");
9
+ var _diffOriginal = require("./diffOriginal");
10
10
  var toNamePath = function toNamePath(name) {
11
11
  if (Array.isArray(name)) {
12
12
  return name;
@@ -88,11 +88,12 @@ var useListChanged = exports.useListChanged = function useListChanged(params) {
88
88
  if (notWatch) _form = [];
89
89
  var value = _antd.Form.useWatch(namePath, _form);
90
90
  if (notWatch || noChange) return [false];
91
- var changed = (0, _contrastOriginal.contrastOriginal)({
91
+ var changed = (0, _diffOriginal.diffOriginal)({
92
92
  value: value,
93
93
  originalValue: originalValue,
94
94
  form: form,
95
- equalWith: equalWith
95
+ equalWith: equalWith,
96
+ name: namesStr || name
96
97
  });
97
98
  return [changed, originalValue];
98
99
  };
@@ -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,107 @@
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
+ .@{ant-prefix}-menu-title-content{
166
+ h2{
167
+ font-weight: bold !important;
168
+ }
169
+ }
170
+ }
171
+
166
172
  .@{ant-prefix}-menu-submenu-selected {
167
- &>.@{ant-prefix}-menu-submenu-title {
173
+ & > .@{ant-prefix}-menu-submenu-title {
168
174
  .@{ant-prefix}-menu-title-content div {
169
175
  .pro-layout-icon {
170
176
  color: #fff;
171
177
  }
172
178
 
173
179
  h2 {
174
- font-weight: bold;
175
- color : #fff;
180
+ color: #fff;
176
181
  }
177
182
  }
178
-
179
183
  }
180
184
 
181
185
  .@{ant-prefix}-menu-item-only-child .@{ant-prefix}-menu-title-content div {
182
186
  .pro-layout-icon {
183
- color: #CACACA;
187
+ color: #cacaca;
184
188
  }
185
189
 
186
190
  h2 {
191
+ color: #cacaca;
187
192
  font-weight: 400;
188
- color : #CACACA;
189
193
  }
190
194
  }
191
-
192
195
  }
193
196
  }
@@ -2,18 +2,18 @@
2
2
  @import (reference) '~antd/es/style/themes/index.less';
3
3
 
4
4
  .pro-layout-sider-menu {
5
- width : 220px;
5
+ width: 220px;
6
6
  background: #fff;
7
7
 
8
8
  h2 {
9
9
  margin-bottom: 0;
10
- padding : 16px 16px 8px;
11
- color : var(--zaui-text, #343434);
12
- color : var(--zaui-text);
13
- font-weight : 500;
14
- font-size : var(--zaui-font-size-lg, 16px);
15
- line-height : inherit;
16
- text-align : left;
10
+ padding: 16px 16px 8px;
11
+ color: var(--zaui-text, #343434);
12
+ color: var(--zaui-text);
13
+ font-weight: 500;
14
+ font-size: var(--zaui-font-size-lg, 16px);
15
+ line-height: inherit;
16
+ text-align: left;
17
17
  }
18
18
 
19
19
  .pro-layout-open-menu {
@@ -33,15 +33,22 @@
33
33
  }
34
34
 
35
35
  .@{ant-prefix}-menu {
36
+ .@{ant-prefix}-menu-item-only-child{
37
+ .@{ant-prefix}-menu-title-content .pro-layout-open-menu-lv1 h2{
38
+ padding-right: 0;
39
+ }
40
+ }
36
41
  .@{ant-prefix}-menu-title-content {
37
42
  div h2 {
38
- color : var(--zaui-text);
39
43
  padding: 0;
44
+ padding-right: 12px;
45
+ color: var(--zaui-text);
40
46
  }
41
47
 
42
48
  .pro-layout-open-menu-lv1 {
43
49
  h2 {
44
- color : var(--zaui-text);
50
+ padding-right: 26px;
51
+ color: var(--zaui-text);
45
52
  font-weight: 500;
46
53
  }
47
54
  }
@@ -53,19 +60,19 @@
53
60
  &.pro-layout-icon-empty {
54
61
  display: none;
55
62
 
56
- &~h2 {
63
+ & ~ h2 {
57
64
  margin-left: var(--zaui-space-size-md, 16px);
58
65
  }
59
66
  }
60
67
  }
61
68
 
62
69
  .pro-layout-icon {
63
- fill : currentColor;
64
70
  color: var(--zaui-text, #343434) !important;
71
+ fill: currentColor;
65
72
  }
66
73
 
67
74
  &.@{ant-prefix}-menu-sub {
68
- overflow : hidden;
75
+ overflow: hidden;
69
76
  background: #fff;
70
77
  }
71
78
 
@@ -74,8 +81,8 @@
74
81
 
75
82
  .@{ant-prefix}-menu-submenu-title:hover,
76
83
  .@{ant-prefix}-menu-item:hover {
84
+ color: #fff;
77
85
  background-color: #f2f2f2;
78
- color : #fff;
79
86
  }
80
87
 
81
88
  .@{ant-prefix}-menu-item {
@@ -87,15 +94,13 @@
87
94
  }
88
95
 
89
96
  .@{ant-prefix}-menu-submenu-title,
90
- &.@{ant-prefix}-menu-root>.@{ant-prefix}-menu-item-only-child,
91
- &.@{ant-prefix}-menu-sub.@{ant-prefix}-menu-inline>.@{ant-prefix}-menu-item {
92
- padding-top : 10px;
97
+ &.@{ant-prefix}-menu-root > .@{ant-prefix}-menu-item-only-child,
98
+ &.@{ant-prefix}-menu-sub.@{ant-prefix}-menu-inline > .@{ant-prefix}-menu-item {
99
+ min-height: 40px;
100
+ padding-top: 10px;
93
101
  padding-bottom: 10px;
94
- min-height : 40px;
95
102
  }
96
103
  }
97
104
  }
98
105
  }
99
-
100
-
101
106
  }