@jetlinks-web/components 3.0.1-rc → 3.1.0

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 (294) hide show
  1. package/es/AutoComplete/AutoComplete.js +13 -9
  2. package/es/BadgeStatus/Badge.js +1 -2
  3. package/es/BadgeStatus/color.js +3 -3
  4. package/es/CardSelect/CardSelect.js +23 -13
  5. package/es/CardSelect/style/index.js +25 -1
  6. package/es/CheckButton/CheckButton.js +12 -4
  7. package/es/CheckButton/style/index.js +41 -1
  8. package/es/DragModal/DragModal.js +14 -8
  9. package/es/DragModal/style/index.js +64 -1
  10. package/es/EditTable/Body.js +10 -3
  11. package/es/EditTable/EditTable.js +13 -7
  12. package/es/EditTable/FormItem.js +18 -19
  13. package/es/EditTable/Header.js +16 -6
  14. package/es/EditTable/components/ContextMenu/Menu.js +11 -5
  15. package/es/EditTable/components/Search/search.js +1 -2
  16. package/es/EditTable/components/Search/sort.js +1 -3
  17. package/es/EditTable/group.js +23 -18
  18. package/es/EditTable/hooks/useValidate.js +1 -1
  19. package/es/EditTable/style/body.js +53 -0
  20. package/es/EditTable/style/form.js +24 -0
  21. package/es/EditTable/style/group.js +25 -0
  22. package/es/EditTable/style/header.js +58 -0
  23. package/es/EditTable/style/index.js +42 -1
  24. package/es/EditTable/style/menu.js +27 -0
  25. package/es/EditTable/style/table.js +46 -0
  26. package/es/EditTable/utils.js +30 -3
  27. package/es/Ellipsis/Ellipsis.js +10 -2
  28. package/es/Ellipsis/style/index.js +24 -1
  29. package/es/FullPage/FullPage.js +1 -2
  30. package/es/LocaleProvider/index.js +1 -2
  31. package/es/PermissionButton/index.js +6 -7
  32. package/es/ProLayout/Basic/BasicLayout.js +45 -41
  33. package/es/ProLayout/Basic/BasicLayoutStyle.js +39 -0
  34. package/es/ProLayout/Basic/Header.js +3 -7
  35. package/es/ProLayout/Basic/HeaderStyle.js +10 -0
  36. package/es/ProLayout/PageContainer/index.js +21 -17
  37. package/es/ProLayout/PageContainer/style.js +46 -0
  38. package/es/ProLayout/SiderMenu/BaseMenu.js +18 -42
  39. package/es/ProLayout/SiderMenu/SiderMenu.js +24 -36
  40. package/es/ProLayout/SiderMenu/style.js +166 -0
  41. package/es/ProLayout/TopHeader/index.js +13 -12
  42. package/es/ProLayout/TopHeader/style.js +126 -0
  43. package/es/ProLayout/style/index.js +7 -1
  44. package/es/ProLayout/util.js +5 -5
  45. package/es/ProTable/Alert.js +12 -4
  46. package/es/ProTable/Content.js +166 -45
  47. package/es/ProTable/Header.js +21 -11
  48. package/es/ProTable/Pagination.js +28 -11
  49. package/es/ProTable/ProTable.js +104 -46
  50. package/es/ProTable/hooks/index.js +2 -0
  51. package/es/ProTable/hooks/useTableInject.js +5 -0
  52. package/es/ProTable/hooks/useTableSelection.js +95 -0
  53. package/es/ProTable/setting.js +24 -1
  54. package/es/ProTable/style/index.js +109 -1
  55. package/es/RadioButton/RadioButton.js +10 -4
  56. package/es/RadioButton/style/index.js +23 -1
  57. package/es/Scrollbar/Scrollbar.js +10 -3
  58. package/es/Scrollbar/Thumb.js +36 -25
  59. package/es/Scrollbar/style/index.js +63 -1
  60. package/es/Search/Advanced/History.js +23 -16
  61. package/es/Search/Advanced/SaveHistory.js +1 -2
  62. package/es/Search/Advanced/index.js +212 -292
  63. package/es/Search/Item.js +175 -415
  64. package/es/Search/Search.js +78 -172
  65. package/es/Search/hooks/index.js +108 -1
  66. package/es/Search/hooks/useRouteQuery.js +57 -0
  67. package/es/Search/setting.js +132 -14
  68. package/es/Search/style/index.js +4 -2
  69. package/es/Search/style/item.js +28 -0
  70. package/es/Search/style/search.js +133 -0
  71. package/es/Search/util.js +116 -124
  72. package/es/Skeleton/components/DashBoardCard.js +19 -12
  73. package/es/Skeleton/components/DashBoardChart.js +48 -45
  74. package/es/Skeleton/components/Detail.js +27 -21
  75. package/es/Skeleton/components/Drawer.js +23 -14
  76. package/es/Skeleton/components/Item.js +9 -1
  77. package/es/Skeleton/components/List.js +0 -1
  78. package/es/Skeleton/components/ListCard.js +20 -13
  79. package/es/Skeleton/components/ListCardItem.js +12 -13
  80. package/es/Skeleton/components/ListTable.js +19 -10
  81. package/es/Skeleton/components/Page.js +0 -1
  82. package/es/Skeleton/components/Tree.js +21 -14
  83. package/es/Skeleton/skeleton.js +17 -8
  84. package/es/Skeleton/style/index.js +132 -1
  85. package/es/Title/style/index.js +29 -1
  86. package/es/Title/title.js +13 -5
  87. package/es/ValueItem/ValueItem.js +44 -39
  88. package/es/VirtualTable/VirtualTable.js +398 -0
  89. package/es/VirtualTable/data.js +36 -0
  90. package/es/VirtualTable/index.js +5 -0
  91. package/es/VirtualTable/style/index.js +32 -0
  92. package/es/components.js +1 -4
  93. package/es/locale/en-US.js +6 -8
  94. package/es/locale/zh-CN.js +6 -8
  95. package/es/style/index.js +0 -3
  96. package/es/style/styleRegister.js +21 -0
  97. package/es/style/variable.js +4 -0
  98. package/es/style.js +0 -13
  99. package/lib/AutoComplete/AutoComplete.js +13 -9
  100. package/lib/BadgeStatus/Badge.js +1 -2
  101. package/lib/BadgeStatus/color.js +3 -3
  102. package/lib/CardSelect/CardSelect.js +23 -13
  103. package/lib/CardSelect/style/index.js +30 -1
  104. package/lib/CheckButton/CheckButton.js +12 -4
  105. package/lib/CheckButton/style/index.js +46 -1
  106. package/lib/DragModal/DragModal.js +14 -8
  107. package/lib/DragModal/style/index.js +69 -1
  108. package/lib/EditTable/Body.js +10 -3
  109. package/lib/EditTable/EditTable.js +13 -7
  110. package/lib/EditTable/FormItem.js +18 -19
  111. package/lib/EditTable/Header.js +16 -6
  112. package/lib/EditTable/components/ContextMenu/Menu.js +11 -5
  113. package/lib/EditTable/components/Search/search.js +1 -2
  114. package/lib/EditTable/components/Search/sort.js +1 -3
  115. package/lib/EditTable/group.js +23 -18
  116. package/lib/EditTable/hooks/useValidate.js +1 -1
  117. package/lib/EditTable/style/body.js +60 -0
  118. package/lib/EditTable/style/form.js +31 -0
  119. package/lib/EditTable/style/group.js +32 -0
  120. package/lib/EditTable/style/header.js +65 -0
  121. package/lib/EditTable/style/index.js +47 -1
  122. package/lib/EditTable/style/menu.js +33 -0
  123. package/lib/EditTable/style/table.js +52 -0
  124. package/lib/EditTable/utils.js +31 -3
  125. package/lib/Ellipsis/Ellipsis.js +10 -2
  126. package/lib/Ellipsis/style/index.js +29 -1
  127. package/lib/FullPage/FullPage.js +1 -2
  128. package/lib/Icon/icon.js +1 -2
  129. package/lib/LocaleProvider/index.js +1 -2
  130. package/lib/PermissionButton/index.js +6 -7
  131. package/lib/ProLayout/Basic/BasicLayout.js +45 -42
  132. package/lib/ProLayout/Basic/BasicLayoutStyle.js +46 -0
  133. package/lib/ProLayout/Basic/Header.js +2 -6
  134. package/lib/ProLayout/Basic/HeaderStyle.js +17 -0
  135. package/lib/ProLayout/PageContainer/index.js +19 -15
  136. package/lib/ProLayout/PageContainer/style.js +53 -0
  137. package/lib/ProLayout/SiderMenu/BaseMenu.js +19 -42
  138. package/lib/ProLayout/SiderMenu/SiderMenu.js +24 -37
  139. package/lib/ProLayout/SiderMenu/style.js +173 -0
  140. package/lib/ProLayout/TopHeader/index.js +14 -12
  141. package/lib/ProLayout/TopHeader/style.js +133 -0
  142. package/lib/ProLayout/style/index.js +12 -1
  143. package/lib/ProLayout/util.js +5 -5
  144. package/lib/ProTable/Alert.js +12 -4
  145. package/lib/ProTable/Content.js +166 -45
  146. package/lib/ProTable/Header.js +21 -11
  147. package/lib/ProTable/Pagination.js +28 -11
  148. package/lib/ProTable/ProTable.js +104 -46
  149. package/lib/ProTable/hooks/index.js +27 -0
  150. package/lib/ProTable/hooks/useTableInject.js +11 -0
  151. package/lib/ProTable/hooks/useTableSelection.js +102 -0
  152. package/lib/ProTable/setting.js +24 -1
  153. package/lib/ProTable/style/index.js +114 -1
  154. package/lib/RadioButton/RadioButton.js +10 -4
  155. package/lib/RadioButton/style/index.js +28 -1
  156. package/lib/Scrollbar/Scrollbar.js +10 -3
  157. package/lib/Scrollbar/Thumb.js +36 -25
  158. package/lib/Scrollbar/style/index.js +68 -1
  159. package/lib/Search/Advanced/History.js +23 -16
  160. package/lib/Search/Advanced/SaveHistory.js +1 -2
  161. package/lib/Search/Advanced/index.js +212 -292
  162. package/lib/Search/Item.js +175 -415
  163. package/lib/Search/Search.js +78 -172
  164. package/lib/Search/hooks/index.js +130 -1
  165. package/lib/Search/hooks/useRouteQuery.js +64 -0
  166. package/lib/Search/setting.js +133 -15
  167. package/lib/Search/style/index.js +9 -2
  168. package/lib/Search/style/item.js +35 -0
  169. package/lib/Search/style/search.js +140 -0
  170. package/lib/Search/util.js +116 -124
  171. package/lib/Skeleton/components/DashBoardCard.js +19 -12
  172. package/lib/Skeleton/components/DashBoardChart.js +48 -45
  173. package/lib/Skeleton/components/Detail.js +27 -21
  174. package/lib/Skeleton/components/Drawer.js +23 -14
  175. package/lib/Skeleton/components/Item.js +9 -1
  176. package/lib/Skeleton/components/List.js +0 -1
  177. package/lib/Skeleton/components/ListCard.js +20 -13
  178. package/lib/Skeleton/components/ListCardItem.js +12 -13
  179. package/lib/Skeleton/components/ListTable.js +19 -10
  180. package/lib/Skeleton/components/Page.js +0 -1
  181. package/lib/Skeleton/components/Tree.js +21 -14
  182. package/lib/Skeleton/skeleton.js +17 -8
  183. package/lib/Skeleton/style/index.js +137 -1
  184. package/lib/Title/style/index.js +34 -1
  185. package/lib/Title/title.js +13 -5
  186. package/lib/ValueItem/ValueItem.js +44 -39
  187. package/lib/VirtualTable/VirtualTable.js +398 -0
  188. package/lib/VirtualTable/data.js +43 -0
  189. package/lib/VirtualTable/index.js +12 -0
  190. package/lib/VirtualTable/style/index.js +39 -0
  191. package/lib/components.js +8 -30
  192. package/lib/index.js +1 -2
  193. package/lib/locale/en-US.js +6 -8
  194. package/lib/locale/zh-CN.js +6 -8
  195. package/lib/style/components.less +0 -1
  196. package/lib/style/index.js +1 -4
  197. package/lib/style/styleRegister.js +28 -0
  198. package/lib/style/variable.js +10 -0
  199. package/lib/style.js +1 -15
  200. package/package.json +170 -173
  201. package/es/AMap/Map.js +0 -133
  202. package/es/AMap/index.js +0 -5
  203. package/es/AMap/util.js +0 -56
  204. package/es/CardSelect/style/index.css +0 -24
  205. package/es/CardSelect/style/index.less +0 -26
  206. package/es/CheckButton/style/index.css +0 -37
  207. package/es/CheckButton/style/index.less +0 -40
  208. package/es/DragModal/style/index.css +0 -82
  209. package/es/DragModal/style/index.less +0 -97
  210. package/es/Echarts/Echarts.js +0 -48
  211. package/es/Echarts/index.js +0 -5
  212. package/es/EditTable/style/body.less +0 -66
  213. package/es/EditTable/style/form.less +0 -33
  214. package/es/EditTable/style/group.less +0 -32
  215. package/es/EditTable/style/header.less +0 -77
  216. package/es/EditTable/style/index.css +0 -267
  217. package/es/EditTable/style/index.less +0 -41
  218. package/es/EditTable/style/menu.less +0 -25
  219. package/es/EditTable/style/table.less +0 -47
  220. package/es/Ellipsis/style/index.css +0 -17
  221. package/es/Ellipsis/style/index.less +0 -20
  222. package/es/FlameGraph/FlameGraph.js +0 -136
  223. package/es/FlameGraph/index.js +0 -5
  224. package/es/FlameGraph/style/index.css +0 -43
  225. package/es/FlameGraph/style/index.js +0 -1
  226. package/es/FlameGraph/style/index.less +0 -52
  227. package/es/ProLayout/Basic/BasicLayout.less +0 -66
  228. package/es/ProLayout/Basic/Header.less +0 -8
  229. package/es/ProLayout/PageContainer/index.less +0 -103
  230. package/es/ProLayout/SiderMenu/index.less +0 -231
  231. package/es/ProLayout/TopHeader/index.less +0 -174
  232. package/es/ProLayout/style/default.less +0 -4
  233. package/es/ProLayout/style/style.less +0 -7
  234. package/es/ProTable/style/ProTable.less +0 -139
  235. package/es/RadioButton/style/index.css +0 -20
  236. package/es/RadioButton/style/index.less +0 -19
  237. package/es/Scrollbar/style/index.css +0 -65
  238. package/es/Scrollbar/style/index.less +0 -83
  239. package/es/Search/style/Item.less +0 -33
  240. package/es/Search/style/Search.less +0 -179
  241. package/es/Skeleton/style/Skeleton.less +0 -166
  242. package/es/Title/style/index.css +0 -27
  243. package/es/Title/style/index.less +0 -27
  244. package/es/style/index.css +0 -5375
  245. package/es/style/index.less +0 -14
  246. package/es/style/variable.css +0 -4
  247. package/es/style/variable.less +0 -4
  248. package/lib/AMap/Map.js +0 -133
  249. package/lib/AMap/index.js +0 -12
  250. package/lib/AMap/util.js +0 -62
  251. package/lib/CardSelect/style/index.css +0 -24
  252. package/lib/CardSelect/style/index.less +0 -26
  253. package/lib/CheckButton/style/index.css +0 -37
  254. package/lib/CheckButton/style/index.less +0 -40
  255. package/lib/DragModal/style/index.css +0 -82
  256. package/lib/DragModal/style/index.less +0 -97
  257. package/lib/Echarts/Echarts.js +0 -48
  258. package/lib/Echarts/index.js +0 -12
  259. package/lib/EditTable/style/body.less +0 -66
  260. package/lib/EditTable/style/form.less +0 -33
  261. package/lib/EditTable/style/group.less +0 -32
  262. package/lib/EditTable/style/header.less +0 -77
  263. package/lib/EditTable/style/index.css +0 -267
  264. package/lib/EditTable/style/index.less +0 -41
  265. package/lib/EditTable/style/menu.less +0 -25
  266. package/lib/EditTable/style/table.less +0 -47
  267. package/lib/Ellipsis/style/index.css +0 -17
  268. package/lib/Ellipsis/style/index.less +0 -20
  269. package/lib/FlameGraph/FlameGraph.js +0 -136
  270. package/lib/FlameGraph/index.js +0 -12
  271. package/lib/FlameGraph/style/index.css +0 -43
  272. package/lib/FlameGraph/style/index.js +0 -3
  273. package/lib/FlameGraph/style/index.less +0 -52
  274. package/lib/ProLayout/Basic/BasicLayout.less +0 -66
  275. package/lib/ProLayout/Basic/Header.less +0 -8
  276. package/lib/ProLayout/PageContainer/index.less +0 -103
  277. package/lib/ProLayout/SiderMenu/index.less +0 -231
  278. package/lib/ProLayout/TopHeader/index.less +0 -174
  279. package/lib/ProLayout/style/default.less +0 -4
  280. package/lib/ProLayout/style/style.less +0 -7
  281. package/lib/ProTable/style/ProTable.less +0 -139
  282. package/lib/RadioButton/style/index.css +0 -20
  283. package/lib/RadioButton/style/index.less +0 -19
  284. package/lib/Scrollbar/style/index.css +0 -65
  285. package/lib/Scrollbar/style/index.less +0 -83
  286. package/lib/Search/style/Item.less +0 -33
  287. package/lib/Search/style/Search.less +0 -179
  288. package/lib/Skeleton/style/Skeleton.less +0 -166
  289. package/lib/Title/style/index.css +0 -27
  290. package/lib/Title/style/index.less +0 -27
  291. package/lib/style/index.css +0 -5375
  292. package/lib/style/index.less +0 -14
  293. package/lib/style/variable.css +0 -4
  294. package/lib/style/variable.less +0 -4
@@ -1,5 +1,4 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
- import { isVNode as _isVNode } from "vue";
3
2
  import _createClass from "@babel/runtime/helpers/esm/createClass";
4
3
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
5
4
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
@@ -12,10 +11,6 @@ import IconFont from '../../Icon';
12
11
  import { regular } from '@jetlinks-web/utils';
13
12
  import { Menu } from 'ant-design-vue';
14
13
  import { createFromIconfontCN } from '@ant-design/icons-vue';
15
- import 'ant-design-vue/es/_util/vue-types';
16
- function _isSlot(s) {
17
- return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
18
- }
19
14
  export var baseMenuProps = _objectSpread(_objectSpread({}, defaultSettingProps), {}, {
20
15
  prefixCls: {
21
16
  type: String,
@@ -119,8 +114,7 @@ var MenuUtil = /*#__PURE__*/_createClass(function MenuUtil(_props, ctx) {
119
114
  });
120
115
  _defineProperty(this, "getSubMenuOrItem", function (item) {
121
116
  var _item$meta, _item$meta2, _item$meta7, _item$meta8;
122
- if (Array.isArray(item.children) && item.children.length > 0 && !(item === null || item === void 0 ? void 0 : (_item$meta = item.meta) === null || _item$meta === void 0 ? void 0 : _item$meta.hideInMenu) && !(item === null || item === void 0 ? void 0 : (_item$meta2 = item.meta) === null || _item$meta2 === void 0 ? void 0 : _item$meta2.hideChildrenInMenu)) {
123
- var _slot;
117
+ if (Array.isArray(item.children) && item.children.length > 0 && !(item !== null && item !== void 0 && (_item$meta = item.meta) !== null && _item$meta !== void 0 && _item$meta.hideInMenu) && !(item !== null && item !== void 0 && (_item$meta2 = item.meta) !== null && _item$meta2 !== void 0 && _item$meta2.hideChildrenInMenu)) {
124
118
  var _item$meta3, _item$meta4, _item$meta5, _item$meta6;
125
119
  if (_this.props.subMenuItemRender) {
126
120
  var subMenuItemRender = withCtx(_this.props.subMenuItemRender, _this.ctx);
@@ -133,32 +127,24 @@ var MenuUtil = /*#__PURE__*/_createClass(function MenuUtil(_props, ctx) {
133
127
  prefixCls = _this$props.prefixCls,
134
128
  locale = _this$props.locale;
135
129
  var menuTitle = locale && locale((_item$meta3 = item.meta) === null || _item$meta3 === void 0 ? void 0 : _item$meta3.title) || ((_item$meta4 = item.meta) === null || _item$meta4 === void 0 ? void 0 : _item$meta4.title);
136
- var defaultTitle = ((_item$meta5 = item.meta) === null || _item$meta5 === void 0 ? void 0 : _item$meta5.icon) ? _createVNode("span", {
130
+ var defaultTitle = (_item$meta5 = item.meta) !== null && _item$meta5 !== void 0 && _item$meta5.icon ? _createVNode("span", {
137
131
  "class": "".concat(prefixCls, "-menu-item")
138
132
  }, [_createVNode("span", {
139
133
  "class": "".concat(prefixCls, "-menu-item-title")
140
- }, _isSlot(menuTitle) ? menuTitle : {
141
- default: function _default() {
142
- return [menuTitle];
143
- }
144
- })]) : _createVNode("span", {
134
+ }, [menuTitle])]) : _createVNode("span", {
145
135
  "class": "".concat(prefixCls, "-menu-item")
146
- }, _isSlot(menuTitle) ? menuTitle : {
147
- default: function _default() {
148
- return [menuTitle];
149
- }
150
- });
136
+ }, [menuTitle]);
151
137
  return _createVNode(Menu.SubMenu, {
152
138
  "title": defaultTitle,
153
- "key": item.path,
139
+ "key": item.key || item.path,
154
140
  "popupClassName": "".concat(prefixCls, "-menu-popup"),
155
141
  "icon": _createVNode(LazyIcon, {
156
142
  "iconUrl": _this.props.iconfontUrl,
157
143
  "icon": (_item$meta6 = item.meta) === null || _item$meta6 === void 0 ? void 0 : _item$meta6.icon
158
144
  }, null)
159
- }, _isSlot(_slot = _this.getNavMenuItems(item.children)) ? _slot : {
145
+ }, {
160
146
  default: function _default() {
161
- return [_slot];
147
+ return [_this.getNavMenuItems(item.children)];
162
148
  }
163
149
  });
164
150
  }
@@ -174,16 +160,15 @@ var MenuUtil = /*#__PURE__*/_createClass(function MenuUtil(_props, ctx) {
174
160
  }) || _createVNode(Menu.Item, {
175
161
  "disabled": (_item$meta7 = item.meta) === null || _item$meta7 === void 0 ? void 0 : _item$meta7.disabled,
176
162
  "danger": (_item$meta8 = item.meta) === null || _item$meta8 === void 0 ? void 0 : _item$meta8.danger,
177
- "key": item.path
178
- }, _isSlot(title) ? title : {
163
+ "key": item.key || item.path
164
+ }, {
179
165
  default: function _default() {
180
166
  return [title];
181
167
  }
182
168
  });
183
169
  });
184
170
  _defineProperty(this, "getMenuItem", function (item) {
185
- var _slot2;
186
- var _item$meta9, _item$meta10, _item$meta11, _item$meta12, _item$meta13;
171
+ var _item$meta9, _item$meta0, _item$meta1, _item$meta10, _item$meta11;
187
172
  var meta = _objectSpread({}, item.meta);
188
173
  var target = meta.target || null;
189
174
  var hasUrl = regular.isUrl(item.path);
@@ -202,30 +187,22 @@ var MenuUtil = /*#__PURE__*/_createClass(function MenuUtil(_props, ctx) {
202
187
  locale = _this$props2.locale;
203
188
  var icon = ((_item$meta9 = item.meta) === null || _item$meta9 === void 0 ? void 0 : _item$meta9.icon) && _createVNode(LazyIcon, {
204
189
  "iconUrl": _this.props.iconfontUrl,
205
- "icon": (_item$meta10 = item.meta) === null || _item$meta10 === void 0 ? void 0 : _item$meta10.icon
190
+ "icon": (_item$meta0 = item.meta) === null || _item$meta0 === void 0 ? void 0 : _item$meta0.icon
206
191
  }, null) || undefined;
207
- var menuTitle = locale && locale((_item$meta11 = item.meta) === null || _item$meta11 === void 0 ? void 0 : _item$meta11.title) || ((_item$meta12 = item.meta) === null || _item$meta12 === void 0 ? void 0 : _item$meta12.title);
208
- var defaultTitle = ((_item$meta13 = item.meta) === null || _item$meta13 === void 0 ? void 0 : _item$meta13.icon) ? _createVNode(CustomTag, _objectSpread(_objectSpread(_objectSpread({}, attrs), props), {}, {
192
+ var menuTitle = locale && locale((_item$meta1 = item.meta) === null || _item$meta1 === void 0 ? void 0 : _item$meta1.title) || ((_item$meta10 = item.meta) === null || _item$meta10 === void 0 ? void 0 : _item$meta10.title);
193
+ var defaultTitle = (_item$meta11 = item.meta) !== null && _item$meta11 !== void 0 && _item$meta11.icon ? _createVNode(CustomTag, _objectSpread(_objectSpread(_objectSpread({}, attrs), props), {}, {
209
194
  "class": "".concat(prefixCls, "-menu-item")
210
195
  }), {
211
196
  default: function _default() {
212
197
  return [icon, _createVNode("span", {
213
198
  "class": "".concat(prefixCls, "-menu-item-title")
214
- }, _isSlot(menuTitle) ? menuTitle : {
215
- default: function _default() {
216
- return [menuTitle];
217
- }
218
- })];
199
+ }, [menuTitle])];
219
200
  }
220
201
  }) : _createVNode(CustomTag, _objectSpread(_objectSpread(_objectSpread({}, attrs), props), {}, {
221
202
  "class": "".concat(prefixCls, "-menu-item")
222
- }), _isSlot(_slot2 = _createVNode("span", null, _isSlot(menuTitle) ? menuTitle : {
223
- default: function _default() {
224
- return [menuTitle];
225
- }
226
- })) ? _slot2 : {
203
+ }), {
227
204
  default: function _default() {
228
- return [_slot2];
205
+ return [_createVNode("span", null, [menuTitle])];
229
206
  }
230
207
  });
231
208
  return [defaultTitle, icon];
@@ -263,7 +240,6 @@ export default defineComponent({
263
240
  emit('click', args);
264
241
  };
265
242
  return function () {
266
- var _slot3;
267
243
  return _createVNode(Menu, _objectSpread({
268
244
  "key": "Menu",
269
245
  "inlineIndent": 16,
@@ -274,9 +250,9 @@ export default defineComponent({
274
250
  "onOpenChange": handleOpenChange,
275
251
  "onSelect": handleSelect,
276
252
  "onClick": handleClick
277
- }, props.menuProps), _isSlot(_slot3 = menuUtil.getNavMenuItems(props.menuData)) ? _slot3 : {
253
+ }, props.menuProps), {
278
254
  default: function _default() {
279
- return [_slot3];
255
+ return [menuUtil.getNavMenuItems(props.menuData)];
280
256
  }
281
257
  });
282
258
  };
@@ -1,6 +1,7 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
2
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
- import { createVNode as _createVNode, resolveDirective as _resolveDirective, createTextVNode as _createTextVNode, isVNode as _isVNode, Fragment as _Fragment } from "vue";
3
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
+ import { createVNode as _createVNode, createTextVNode as _createTextVNode, Fragment as _Fragment } from "vue";
4
5
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
5
6
  import { LayoutSider as Sider, Menu, Tooltip } from 'ant-design-vue';
6
7
  import BaseMenu, { baseMenuProps } from './BaseMenu';
@@ -10,9 +11,7 @@ import IconFont from '../../Icon';
10
11
  import { useRouteContext } from '../RouteContext';
11
12
  import { computed, unref } from 'vue';
12
13
  import "../typings";
13
- function _isSlot(s) {
14
- return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
15
- }
14
+ import useProLayoutStyle from '../style';
16
15
  export var siderMenuProps = _objectSpread(_objectSpread(_objectSpread({}, defaultSettingProps), baseMenuProps), {}, {
17
16
  logo: {
18
17
  type: [Object, String, Function],
@@ -145,11 +144,7 @@ export var defaultRenderLogoAndTitle = function defaultRenderLogoAndTitle(props)
145
144
  if (layout === 'mix' && renderFunction === false) {
146
145
  return null;
147
146
  }
148
- var titleDom = _createVNode("h1", null, _isSlot(title) ? title : {
149
- default: function _default() {
150
- return [title];
151
- }
152
- });
147
+ var titleDom = _createVNode("h1", null, [title]);
153
148
  if (renderKey === 'menuHeaderRender') {
154
149
  return null;
155
150
  }
@@ -159,11 +154,7 @@ export var defaultRenderLogoAndTitle = function defaultRenderLogoAndTitle(props)
159
154
  return renderFunction(logoDom, props.collapsed ? null : titleDom, props);
160
155
  }
161
156
  if (Array.isArray(renderFunction)) {
162
- return _createVNode(_Fragment, null, _isSlot(renderFunction) ? renderFunction : {
163
- default: function _default() {
164
- return [renderFunction];
165
- }
166
- });
157
+ return _createVNode(_Fragment, null, [renderFunction]);
167
158
  }
168
159
  return _createVNode("a", null, [logoDom, props.collapsed ? null : titleDom]);
169
160
  };
@@ -175,7 +166,6 @@ export var defaultRenderCollapsedButton = function defaultRenderCollapsedButton(
175
166
  }, null);
176
167
  };
177
168
  var SiderMenu = function SiderMenu(props) {
178
- var _slot;
179
169
  var collapsed = props.collapsed,
180
170
  siderWidth = props.siderWidth,
181
171
  breakpoint = props.breakpoint,
@@ -189,6 +179,13 @@ var SiderMenu = function SiderMenu(props) {
189
179
  collapsedButtonRender = _props$collapsedButto === void 0 ? defaultRenderCollapsedButton : _props$collapsedButto,
190
180
  linksRender = props.linksRender,
191
181
  theme = props.theme;
182
+ var prefixCls = computed(function () {
183
+ return 'pro-layout';
184
+ });
185
+ var _useProLayoutStyle = useProLayoutStyle(prefixCls),
186
+ _useProLayoutStyle2 = _slicedToArray(_useProLayoutStyle, 2),
187
+ wrapSSR = _useProLayoutStyle2[0],
188
+ hashId = _useProLayoutStyle2[1];
192
189
  var context = useRouteContext();
193
190
  var getPrefixCls = context.getPrefixCls;
194
191
  var baseClassName = getPrefixCls('sider');
@@ -199,7 +196,7 @@ var SiderMenu = function SiderMenu(props) {
199
196
  return props.collapsed ? props.collapsedWidth : props.siderWidth;
200
197
  });
201
198
  var classNames = computed(function () {
202
- return _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, baseClassName, true), "".concat(baseClassName, "-fixed"), context.fixSiderbar), "".concat(baseClassName, "-").concat(theme), true), "".concat(baseClassName, "-layout-").concat(props.layout), props.layout);
199
+ return _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, baseClassName, true), "".concat(baseClassName, "-fixed"), context.fixSiderbar), "".concat(baseClassName, "-").concat(theme), true), "".concat(baseClassName, "-layout-").concat(props.layout), props.layout), hashId.value, true);
203
200
  });
204
201
  var logCls = computed(function () {
205
202
  return _defineProperty(_defineProperty({}, "".concat(baseClassName, "-logo"), true), "".concat(baseClassName, "-logo-card"), props.layoutType === LayoutType.CARD);
@@ -242,7 +239,6 @@ var SiderMenu = function SiderMenu(props) {
242
239
  },
243
240
  'onUpdate:selectedKeys': handleSelect
244
241
  }, null);
245
- console.log('context', context.fixSiderbar);
246
242
  return _createVNode(_Fragment, null, [context.fixSiderbar && _createVNode("div", {
247
243
  "style": {
248
244
  width: "".concat(sSideWidth.value, "px"),
@@ -277,17 +273,9 @@ var SiderMenu = function SiderMenu(props) {
277
273
  "onClick": props.layout !== 'mix' ? props.onMenuHeaderClick : undefined,
278
274
  "id": "logo",
279
275
  "style": props === null || props === void 0 ? void 0 : props.logoStyle
280
- }, _isSlot(headerDom) ? headerDom : {
281
- default: function _default() {
282
- return [headerDom];
283
- }
284
- }), extraDom && _createVNode("div", {
276
+ }, [headerDom]), extraDom && _createVNode("div", {
285
277
  "class": _defineProperty(_defineProperty({}, "".concat(baseClassName, "-extra"), true), "".concat(baseClassName, "-extra-no-logo"), !headerDom)
286
- }, _isSlot(extraDom) ? extraDom : {
287
- default: function _default() {
288
- return [extraDom];
289
- }
290
- }), _createVNode("div", {
278
+ }, [extraDom]), _createVNode("div", {
291
279
  "class": "".concat(baseClassName, "-body"),
292
280
  "style": "flex: 1; overflow: hidden auto;"
293
281
  }, [props.layoutType !== LayoutType.CARD ? menuContentRender && menuContentRender(props, defaultMenuDom) || defaultMenuDom : null]), _createVNode("div", {
@@ -304,17 +292,17 @@ var SiderMenu = function SiderMenu(props) {
304
292
  props.onCollapse(!props.collapsed);
305
293
  }
306
294
  }
307
- }, _isSlot(_slot = _createVNode(Menu.Item, {
308
- "key": 'collapsed-button',
309
- "class": "".concat(baseClassName, "-collapsed-button"),
310
- "title": false
311
295
  }, {
312
296
  default: function _default() {
313
- return [collapsedButtonRender && typeof collapsedButtonRender === 'function' ? collapsedButtonRender(collapsed) : collapsedButtonRender];
314
- }
315
- })) ? _slot : {
316
- default: function _default() {
317
- return [_slot];
297
+ return [_createVNode(Menu.Item, {
298
+ "key": 'collapsed-button',
299
+ "class": "".concat(baseClassName, "-collapsed-button"),
300
+ "title": false
301
+ }, {
302
+ default: function _default() {
303
+ return [collapsedButtonRender && typeof collapsedButtonRender === 'function' ? collapsedButtonRender(collapsed) : collapsedButtonRender];
304
+ }
305
+ })];
318
306
  }
319
307
  }) : null])];
320
308
  }
@@ -0,0 +1,166 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import { Keyframes } from "ant-design-vue";
3
+ export var genSiderMenuStyle = function genSiderMenuStyle(config) {
4
+ var _$concat8;
5
+ var token = config.token;
6
+ var proLayoutSiderMenuCls = "".concat(token.antCls, "-pro-sider");
7
+ var proLayoutHeaderHeight = '48px';
8
+ var proLayoutTitleHideKeyframes = new Keyframes('pro-layout-title-hide', {
9
+ '0%': {
10
+ display: 'none',
11
+ opacity: 0
12
+ },
13
+ '80%': {
14
+ display: 'none',
15
+ opacity: 0
16
+ },
17
+ '100%': {
18
+ display: 'unset',
19
+ opacity: 1
20
+ }
21
+ });
22
+ return _defineProperty(_defineProperty(_defineProperty({}, "".concat(proLayoutSiderMenuCls), (_$concat8 = {
23
+ position: 'relative',
24
+ backgroundColor: '#001529',
25
+ borderRight: 0,
26
+ // FIXME: 临时修正(可能不会做兼容)
27
+ zIndex: 20
28
+ }, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_$concat8, "".concat(token.antCls, "-menu"), {
29
+ background: 'transparent'
30
+ }), "&".concat(token.antCls, "-layout-sider-light"), _defineProperty(_defineProperty({}, "".concat(token.antCls, "-menu-item a"), {
31
+ color: token.colorTextHeading
32
+ }), "".concat(token.antCls, "-menu-item-selected a, ").concat(token.antCls, "-menu-item a:hover"), {
33
+ color: token.colorPrimary
34
+ })), "".concat(proLayoutSiderMenuCls, "-logo"), {
35
+ position: 'relative',
36
+ display: 'flex',
37
+ alignItems: 'center',
38
+ padding: '16px 16px',
39
+ cursor: 'pointer',
40
+ transition: 'padding 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)',
41
+ '> a': {
42
+ display: 'flex',
43
+ alignItems: 'center',
44
+ justifyContent: 'center',
45
+ minHeight: 32
46
+ },
47
+ 'img': {
48
+ display: 'inline-block',
49
+ height: 32,
50
+ verticalAlign: 'middle'
51
+ },
52
+ 'h1': {
53
+ display: 'inline-block',
54
+ height: '32px',
55
+ margin: '0 0 0 12px',
56
+ color: 'white',
57
+ fontWeight: 600,
58
+ fontSize: '18px',
59
+ lineHeight: '32px',
60
+ verticalAlign: 'middle',
61
+ animationName: proLayoutTitleHideKeyframes,
62
+ animationDuration: '0.3s'
63
+ }
64
+ }), "".concat(proLayoutSiderMenuCls, "-logo-card"), {
65
+ padding: '16px 0',
66
+ justifyContent: 'center'
67
+ }), "".concat(proLayoutSiderMenuCls, "-extra"), _defineProperty({
68
+ marginBottom: '16px',
69
+ padding: '0 16px'
70
+ }, "".concat(proLayoutSiderMenuCls, "-extra-no-logo"), {
71
+ marginTop: '16px'
72
+ })), "".concat(proLayoutSiderMenuCls, "-menu"), {
73
+ position: 'relative',
74
+ zIndex: 10,
75
+ minHeight: '100%',
76
+ boxShadow: '2px 0 6px rgba(0, 21, 41, 0.35)'
77
+ }), "".concat(token.antCls, "-layout-sider-children"), {
78
+ display: 'flex',
79
+ flexDirection: 'column',
80
+ height: '100%',
81
+ '::-webkit-scrollbar': {
82
+ width: '6px',
83
+ height: '6px'
84
+ },
85
+ '::webkit-scrollbar-track': {
86
+ background: 'rgba(255, 255, 255, 0.15)',
87
+ borderRadius: '3px',
88
+ boxShadow: 'inset 0 0 5px rgba(37, 37, 37, 0.05)'
89
+ },
90
+ /* 滚动条滑块 */
91
+ '::-webkit-scrollbar-thumb': {
92
+ background: 'rgba(255, 255, 255, 0.2)',
93
+ borderRadius: '3px',
94
+ boxShadow: 'inset 0 0 5px rgba(255, 255, 255, 0.05)'
95
+ }
96
+ }), "&".concat(token.antCls, "-layout-sider-collapsed"), _defineProperty(_defineProperty({}, "".concat(token.antCls, "-menu-inline-collapsed"), {
97
+ width: '48px'
98
+ }), "".concat(proLayoutSiderMenuCls), _defineProperty({}, "".concat(proLayoutSiderMenuCls, "-logo"), {
99
+ padding: '16px 24px'
100
+ }))), "&".concat(token.antCls, "-layout-sider").concat(proLayoutSiderMenuCls, "-fixed"), _defineProperty({
101
+ position: 'fixed',
102
+ top: 0,
103
+ left: 0,
104
+ zIndex: 99,
105
+ height: '100%',
106
+ overflow: 'auto',
107
+ overflowX: 'hidden',
108
+ boxShadow: '2px 0 8px 0 rgba(29, 35, 41, 0.05)'
109
+ }, "> ".concat(token.antCls, "-menu-root"), _defineProperty({}, ":not".concat(proLayoutSiderMenuCls, "-link-menu"), {
110
+ height: "calc(100vh - ".concat(proLayoutHeaderHeight, ")"),
111
+ overflowY: 'auto'
112
+ }))), "".concat(proLayoutSiderMenuCls, "-light"), _defineProperty(_defineProperty(_defineProperty(_defineProperty({
113
+ backgroundColor: token.colorBgContainer,
114
+ boxShadow: '2px 0 8px 0 rgba(29, 35, 41, 0.05)'
115
+ }, "".concat(token.antCls, "-layout-sider-children"), {
116
+ '::webkit-scrollbar-track': {
117
+ background: 'rgba(0, 0, 0, 0.06)',
118
+ borderRadius: '3px',
119
+ boxShadow: 'inset 0 0 5px rgba(0, 21, 41, 0.05)',
120
+ /* 滚动条滑块 */
121
+ '::-webkit-scrollbar-thumb': {
122
+ background: 'rgba(0, 0, 0, 0.12)',
123
+ borderRadius: '3px',
124
+ boxShadow: 'inset 0 0 5px rgba(0, 21, 41, 0.05)'
125
+ }
126
+ }
127
+ }), "".concat(proLayoutSiderMenuCls, "-logo"), {
128
+ 'h1': {
129
+ color: token.colorPrimary
130
+ }
131
+ }), "".concat(token.antCls, "-menu-light"), {
132
+ borderRightColor: 'transparent'
133
+ }), "".concat(proLayoutSiderMenuCls, "-collapsed-button"), {
134
+ borderTop: "".concat(token.lineWidth, " solid ").concat(token.colorSplit)
135
+ })), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_$concat8, "".concat(proLayoutSiderMenuCls, "-icon"), {
136
+ width: '14px',
137
+ verticalAlign: 'baseline'
138
+ }), "".concat(proLayoutSiderMenuCls, "-link"), _defineProperty({
139
+ width: '100%'
140
+ }, "ul".concat(token.antCls, "-menu-root"), {
141
+ height: 'auto'
142
+ })), "".concat(proLayoutSiderMenuCls, "-collapsed-button"), {
143
+ borderTop: "".concat(token.lineWidth, " solid rgba(0, 0, 0, 0.25)"),
144
+ '.anticon': {
145
+ fontSize: '16px'
146
+ }
147
+ }), ".top-nav-menu li".concat(token.antCls, "-menu-item"), {
148
+ height: '100%',
149
+ lineHeight: 1
150
+ }), '.drawer .drawer-content', {
151
+ background: "#001529"
152
+ }))), "".concat(token.antCls, "-pro-menu-item"), _defineProperty({}, ".anticon".concat(token.antCls, "-pro-menu-item-title"), {
153
+ marginLeft: '10px'
154
+ })), '.sider-app-menus', {
155
+ width: '100px',
156
+ backgroundColor: '#fff',
157
+ cursor: 'pointer',
158
+ padding: '6px',
159
+ transition: 'all .3s',
160
+ borderRadius: '4px',
161
+ color: '#333',
162
+ '&:hover': {
163
+ backgroundColor: '#efefef'
164
+ }
165
+ });
166
+ };
@@ -1,20 +1,18 @@
1
- import { isVNode as _isVNode } from "vue";
2
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import { createVNode as _createVNode } from "vue";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
5
5
  import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
6
6
  var _excluded = ["rightContentRender"];
7
7
  import { computed, ref } from 'vue';
8
- import { default as ResizeObserver } from 'ant-design-vue/es/vc-resize-observer';
8
+ import { default as ResizeObserver } from "ant-design-vue/es/vc-resize-observer";
9
9
  import { defaultRenderLogoAndTitle, siderMenuProps } from '../SiderMenu/SiderMenu';
10
- import PropTypes from 'ant-design-vue/es/_util/vue-types';
10
+ import PropTypes from "ant-design-vue/es/_util/vue-types";
11
11
  import { defaultSettingProps, LayoutType } from '../defaultSettings';
12
12
  import { defaultPrefixCls, useRouteContext } from '../RouteContext';
13
13
  import BaseMenu from '../SiderMenu/BaseMenu';
14
14
  import { clearMenuItem } from '../util';
15
- function _isSlot(s) {
16
- return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
17
- }
15
+ import useProLayoutStyle from '../style';
18
16
  export var baseHeaderProps = _objectSpread(_objectSpread({}, defaultSettingProps), {}, {
19
17
  prefixCls: PropTypes.string.def('ant-pro'),
20
18
  collapsed: PropTypes.looseBool,
@@ -99,6 +97,13 @@ export var TopNavHeader = function TopNavHeader(props) {
99
97
  mode = props.mode;
100
98
  var context = useRouteContext();
101
99
  var prefixCls = "".concat(propPrefixCls || defaultPrefixCls, "-top-nav-header");
100
+ var stylePrefixCls = computed(function () {
101
+ return 'pro-layout';
102
+ });
103
+ var _useProLayoutStyle = useProLayoutStyle(stylePrefixCls),
104
+ _useProLayoutStyle2 = _slicedToArray(_useProLayoutStyle, 2),
105
+ wrapSSR = _useProLayoutStyle2[0],
106
+ hashId = _useProLayoutStyle2[1];
102
107
  var headerDom = defaultRenderLogoAndTitle(_objectSpread(_objectSpread({}, props), {}, {
103
108
  collapsed: false
104
109
  }),
@@ -121,7 +126,7 @@ export var TopNavHeader = function TopNavHeader(props) {
121
126
  return props.layout === 'mix' && props.splitMenus ? 'horizontal' : mode;
122
127
  });
123
128
  var className = computed(function () {
124
- return _defineProperty(_defineProperty(_defineProperty({}, prefixCls, true), "light", props.theme === 'light'), "dark", props.theme === 'dark');
129
+ return _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, prefixCls, true), hashId.value, true), "light", props.theme === 'light'), "dark", props.theme === 'dark');
125
130
  });
126
131
  var paddingLeft = computed(function () {
127
132
  return context.layoutType === LayoutType.PAD && props.collapsed ? context.headerLeftWidth + 'px' : 0;
@@ -141,11 +146,7 @@ export var TopNavHeader = function TopNavHeader(props) {
141
146
  "class": "".concat(prefixCls, "-logo"),
142
147
  "key": "logo",
143
148
  "id": "logo"
144
- }, _isSlot(headerDom) ? headerDom : {
145
- default: function _default() {
146
- return [headerDom];
147
- }
148
- })]), _createVNode("div", {
149
+ }, [headerDom])]), _createVNode("div", {
149
150
  "style": {
150
151
  flex: 1
151
152
  },
@@ -0,0 +1,126 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ export var genTopHeaderStyle = function genTopHeaderStyle(config) {
3
+ var token = config.token;
4
+ var topNavHeaderCls = "".concat(token.antCls, "-pro-top-nav-header");
5
+ var proLayoutGlobalHeaderCls = "".concat(token.antCls, "-pro-global-header");
6
+ var proLayoutHeaderBg = token.colorBgContainer;
7
+ var proLayoutHeaderHoverBg = token.colorBgContainer;
8
+ var proLayoutHeaderBoxShadow = '0 1px 4px rgba(0, 21, 41, 0.08)';
9
+ return _defineProperty(_defineProperty(_defineProperty({}, proLayoutGlobalHeaderCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
10
+ position: 'relative',
11
+ display: 'flex',
12
+ alignItems: 'center',
13
+ height: '100%',
14
+ padding: '0 16px',
15
+ backgroundColor: proLayoutHeaderBg,
16
+ boxShadow: proLayoutHeaderBoxShadow,
17
+ '> *': {
18
+ height: '100%'
19
+ }
20
+ }, "".concat(proLayoutGlobalHeaderCls, "-coppapsed-button"), {
21
+ display: 'flex',
22
+ alignItems: 'center',
23
+ marginLeft: '16px',
24
+ fontSize: '20px'
25
+ }), "".concat(proLayoutGlobalHeaderCls, "-layout"), _defineProperty({}, "".concat(proLayoutGlobalHeaderCls, "-layout-mix"), _defineProperty(_defineProperty({
26
+ backgroundColor: '#001529'
27
+ }, "".concat(proLayoutGlobalHeaderCls, "-logo"), {
28
+ 'h1': {
29
+ color: '#fff'
30
+ }
31
+ }), '.anticon', {
32
+ color: '#fff'
33
+ }))), "".concat(proLayoutGlobalHeaderCls, "-logo"), {
34
+ position: 'relative',
35
+ overflow: 'hidden',
36
+ a: {
37
+ display: 'flex',
38
+ alignItems: 'center',
39
+ height: '100%',
40
+ img: {
41
+ height: '28px'
42
+ },
43
+ h1: {
44
+ height: '32px',
45
+ margin: '0 0 0 12px',
46
+ color: token.colorPrimary,
47
+ fontWeight: 600,
48
+ fontSize: '18px',
49
+ lineHeight: '32px'
50
+ }
51
+ }
52
+ }), "".concat(proLayoutGlobalHeaderCls, "-menu"), _defineProperty({
53
+ '.anticon': {
54
+ marginRight: '8px'
55
+ }
56
+ }, "".concat(token.antCls, "-dropdown-menu-item"), {
57
+ minWidth: '160px'
58
+ })), '.dark', {
59
+ height: '48px',
60
+ '.action': _defineProperty({
61
+ color: 'rgba(255, 255, 255, 0.85)',
62
+ '> i': {
63
+ color: 'rgba(255, 255, 255, 0.85)'
64
+ },
65
+ '&:hover,&.opend': {
66
+ background: token.colorPrimary
67
+ }
68
+ }, "".concat(token.antCls, "-badge"), {
69
+ color: 'rgba(255, 255, 255, 0.85)'
70
+ })
71
+ })), topNavHeaderCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
72
+ position: 'relative',
73
+ width: '100%',
74
+ height: '100%',
75
+ boxShadow: '0 1px 4px 0 rgba(0, 21, 41, 0.12)',
76
+ transition: 'background 0.3s, width 0.2s'
77
+ }, "".concat(token.antCls, "-menu"), {
78
+ backgroundColor: 'transparent'
79
+ }), '&.light', _defineProperty(_defineProperty({
80
+ backgroundColor: token.colorBgContainer
81
+ }, "".concat(topNavHeaderCls, "-logo"), {
82
+ h1: {
83
+ color: token.colorTextHeading
84
+ }
85
+ }), '.anticon', {
86
+ color: 'inherit'
87
+ })), "".concat(topNavHeaderCls, "-main"), _defineProperty({
88
+ display: 'flex',
89
+ height: '100%',
90
+ paddingLeft: '16px'
91
+ }, "".concat(topNavHeaderCls, "-main-left"), {
92
+ display: 'flex',
93
+ minWidth: '192px'
94
+ })), '.anticon', {
95
+ color: '#fff'
96
+ }), "".concat(topNavHeaderCls, "-logo"), {
97
+ position: 'relative',
98
+ minWidth: '165px',
99
+ height: '100%',
100
+ overflow: 'hidden',
101
+ img: {
102
+ display: 'inline-block',
103
+ height: '32px',
104
+ verticalAlign: 'middle'
105
+ },
106
+ h1: {
107
+ display: 'inline-block',
108
+ margin: '0 0 0 12px',
109
+ color: token.colorPrimary,
110
+ fontWeight: 600,
111
+ fontSize: '16px',
112
+ verticalAlign: 'top'
113
+ }
114
+ }), "".concat(topNavHeaderCls, "-menu"), _defineProperty({
115
+ minWidth: 0
116
+ }, "".concat(token.antCls, "-menu").concat(token.antCls, "-meu-horizontal"), _defineProperty({
117
+ height: '100%',
118
+ border: 'none'
119
+ }, "".concat(token.antCls, "-menu-item"), _defineProperty({
120
+ height: '100%'
121
+ }, "".concat(token.antCls, "-badge"), {
122
+ color: 'unset'
123
+ }))))), "".concat(token.antCls, "-pro-menu-popup"), _defineProperty({}, "".concat(token.antCls, "-badge"), {
124
+ color: 'unset'
125
+ }));
126
+ };
@@ -1 +1,7 @@
1
- import './style.less';
1
+ import genCompoentStyle from '../../style/styleRegister';
2
+ import { genBasicLayoutStyle } from '../Basic/BasicLayoutStyle';
3
+ import { genHeaderStyle } from '../Basic/HeaderStyle';
4
+ import { genPageContainerStyle } from '../PageContainer/style';
5
+ import { genSiderMenuStyle } from '../SiderMenu/style';
6
+ import { genTopHeaderStyle } from '../TopHeader/style';
7
+ export default genCompoentStyle([genBasicLayoutStyle, genHeaderStyle, genPageContainerStyle, genSiderMenuStyle, genTopHeaderStyle]);
@@ -3,14 +3,14 @@ export function clearMenuItem(menusData) {
3
3
  return menusData.map(function (item) {
4
4
  var _finalItem$meta;
5
5
  var finalItem = _objectSpread({}, item);
6
- if ((_finalItem$meta = finalItem.meta) === null || _finalItem$meta === void 0 ? void 0 : _finalItem$meta.hideInMenu) {
6
+ if ((_finalItem$meta = finalItem.meta) !== null && _finalItem$meta !== void 0 && _finalItem$meta.hideInMenu) {
7
7
  return null;
8
8
  }
9
- if (finalItem && (finalItem === null || finalItem === void 0 ? void 0 : finalItem.children)) {
9
+ if (finalItem && finalItem !== null && finalItem !== void 0 && finalItem.children) {
10
10
  var _finalItem$meta2;
11
- if (!((_finalItem$meta2 = finalItem.meta) === null || _finalItem$meta2 === void 0 ? void 0 : _finalItem$meta2.hideChildInMenu) && finalItem.children.some(function (child) {
11
+ if (!((_finalItem$meta2 = finalItem.meta) !== null && _finalItem$meta2 !== void 0 && _finalItem$meta2.hideChildInMenu) && finalItem.children.some(function (child) {
12
12
  var _child$meta;
13
- return child && child.name && !((_child$meta = child.meta) === null || _child$meta === void 0 ? void 0 : _child$meta.hideInMenu);
13
+ return child && child.name && !((_child$meta = child.meta) !== null && _child$meta !== void 0 && _child$meta.hideInMenu);
14
14
  })) {
15
15
  return _objectSpread(_objectSpread({}, item), {}, {
16
16
  children: clearMenuItem(finalItem.children)
@@ -27,7 +27,7 @@ export function flatMap(menusData) {
27
27
  return menusData.map(function (item) {
28
28
  var _finalItem$meta3;
29
29
  var finalItem = _objectSpread({}, item);
30
- if (!finalItem.name || ((_finalItem$meta3 = finalItem.meta) === null || _finalItem$meta3 === void 0 ? void 0 : _finalItem$meta3.hideInMenu)) {
30
+ if (!finalItem.name || (_finalItem$meta3 = finalItem.meta) !== null && _finalItem$meta3 !== void 0 && _finalItem$meta3.hideInMenu) {
31
31
  return null;
32
32
  }
33
33
  if (finalItem.children) {