@jetlinks-web/components 2.7.1 → 2.7.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 (169) hide show
  1. package/es/AMap/Map.js +2 -1
  2. package/es/AutoComplete/AutoComplete.js +1 -0
  3. package/es/BadgeStatus/Badge.js +2 -1
  4. package/es/CardSelect/CardSelect.js +2 -1
  5. package/es/CardSelect/style/index.css +24 -0
  6. package/es/CardSelect/style/index.less +26 -0
  7. package/es/CheckButton/CheckButton.js +2 -1
  8. package/es/CheckButton/style/index.css +37 -0
  9. package/es/CheckButton/style/index.less +40 -0
  10. package/es/DragModal/DragModal.js +1 -0
  11. package/es/DragModal/style/index.css +82 -0
  12. package/es/DragModal/style/index.less +97 -0
  13. package/es/Echarts/Echarts.js +2 -1
  14. package/es/EditTable/EditTable.js +6 -4
  15. package/es/EditTable/FormItem.js +1 -0
  16. package/es/EditTable/Header.js +3 -5
  17. package/es/EditTable/components/ContextMenu/Menu.js +2 -1
  18. package/es/EditTable/components/Search/search.js +2 -1
  19. package/es/EditTable/components/Search/sort.js +3 -1
  20. package/es/EditTable/group.js +10 -7
  21. package/es/EditTable/hooks/useValidate.js +1 -1
  22. package/es/EditTable/style/body.less +66 -0
  23. package/es/EditTable/style/form.less +33 -0
  24. package/es/EditTable/style/group.less +32 -0
  25. package/es/EditTable/style/header.less +77 -0
  26. package/es/EditTable/style/index.css +267 -0
  27. package/es/EditTable/style/index.less +41 -0
  28. package/es/EditTable/style/menu.less +25 -0
  29. package/es/EditTable/style/table.less +47 -0
  30. package/es/EditTable/utils.js +1 -1
  31. package/es/Ellipsis/style/index.css +17 -0
  32. package/es/Ellipsis/style/index.less +20 -0
  33. package/es/FullPage/FullPage.js +2 -1
  34. package/es/LocaleProvider/index.js +2 -1
  35. package/es/MonacoEditor/style/index.css +4 -0
  36. package/es/MonacoEditor/style/index.less +4 -0
  37. package/es/PermissionButton/index.js +7 -6
  38. package/es/ProLayout/Basic/BasicLayout.js +39 -34
  39. package/es/ProLayout/Basic/BasicLayout.less +66 -0
  40. package/es/ProLayout/Basic/Header.js +7 -3
  41. package/es/ProLayout/Basic/Header.less +8 -0
  42. package/es/ProLayout/PageContainer/index.js +12 -8
  43. package/es/ProLayout/PageContainer/index.less +103 -0
  44. package/es/ProLayout/SiderMenu/BaseMenu.js +39 -16
  45. package/es/ProLayout/SiderMenu/SiderMenu.js +34 -14
  46. package/es/ProLayout/SiderMenu/index.less +231 -0
  47. package/es/ProLayout/TopHeader/index.js +9 -1
  48. package/es/ProLayout/TopHeader/index.less +174 -0
  49. package/es/ProLayout/style/default.less +4 -0
  50. package/es/ProLayout/style/style.less +7 -0
  51. package/es/ProLayout/util.js +5 -5
  52. package/es/ProTable/Content.js +2 -2
  53. package/es/ProTable/style/ProTable.less +141 -0
  54. package/es/RadioButton/RadioButton.js +1 -0
  55. package/es/RadioButton/style/index.css +20 -0
  56. package/es/RadioButton/style/index.less +19 -0
  57. package/es/Scrollbar/style/index.css +65 -0
  58. package/es/Scrollbar/style/index.less +83 -0
  59. package/es/Search/Advanced/SaveHistory.js +2 -1
  60. package/es/Search/Item.js +2 -1
  61. package/es/Search/style/Item.less +33 -0
  62. package/es/Search/style/Search.less +179 -0
  63. package/es/Title/style/index.css +23 -0
  64. package/es/Title/style/index.less +25 -0
  65. package/es/Title/title.js +1 -0
  66. package/es/style/index.css +5197 -0
  67. package/es/style/index.less +13 -13
  68. package/es/style/variable.css +4 -0
  69. package/es/style/variable.less +4 -0
  70. package/lib/AMap/Map.js +2 -1
  71. package/lib/AutoComplete/AutoComplete.js +1 -0
  72. package/lib/BadgeStatus/Badge.js +2 -1
  73. package/lib/CardSelect/CardSelect.js +2 -1
  74. package/lib/CardSelect/style/index.css +24 -0
  75. package/lib/CardSelect/style/index.less +26 -0
  76. package/lib/CheckButton/CheckButton.js +2 -1
  77. package/lib/CheckButton/style/index.css +37 -0
  78. package/lib/CheckButton/style/index.less +40 -0
  79. package/lib/DragModal/DragModal.js +1 -0
  80. package/lib/DragModal/style/index.css +82 -0
  81. package/lib/DragModal/style/index.less +97 -0
  82. package/lib/Echarts/Echarts.js +2 -1
  83. package/lib/EditTable/EditTable.js +6 -4
  84. package/lib/EditTable/FormItem.js +1 -0
  85. package/lib/EditTable/Header.js +3 -5
  86. package/lib/EditTable/components/ContextMenu/Menu.js +2 -1
  87. package/lib/EditTable/components/Search/search.js +2 -1
  88. package/lib/EditTable/components/Search/sort.js +3 -1
  89. package/lib/EditTable/group.js +10 -7
  90. package/lib/EditTable/hooks/useValidate.js +1 -1
  91. package/lib/EditTable/style/body.less +66 -0
  92. package/lib/EditTable/style/form.less +33 -0
  93. package/lib/EditTable/style/group.less +32 -0
  94. package/lib/EditTable/style/header.less +77 -0
  95. package/lib/EditTable/style/index.css +267 -0
  96. package/lib/EditTable/style/index.less +41 -0
  97. package/lib/EditTable/style/menu.less +25 -0
  98. package/lib/EditTable/style/table.less +47 -0
  99. package/lib/EditTable/utils.js +1 -1
  100. package/lib/Ellipsis/style/index.css +17 -0
  101. package/lib/Ellipsis/style/index.less +20 -0
  102. package/lib/FullPage/FullPage.js +2 -1
  103. package/lib/Icon/icon.js +2 -1
  104. package/lib/LocaleProvider/index.js +2 -1
  105. package/lib/MonacoEditor/style/index.css +4 -0
  106. package/lib/MonacoEditor/style/index.less +4 -0
  107. package/lib/PermissionButton/index.js +7 -6
  108. package/lib/ProLayout/Basic/BasicLayout.js +40 -34
  109. package/lib/ProLayout/Basic/BasicLayout.less +66 -0
  110. package/lib/ProLayout/Basic/Header.js +6 -2
  111. package/lib/ProLayout/Basic/Header.less +8 -0
  112. package/lib/ProLayout/PageContainer/index.js +11 -7
  113. package/lib/ProLayout/PageContainer/index.less +103 -0
  114. package/lib/ProLayout/SiderMenu/BaseMenu.js +39 -17
  115. package/lib/ProLayout/SiderMenu/SiderMenu.js +35 -14
  116. package/lib/ProLayout/SiderMenu/index.less +231 -0
  117. package/lib/ProLayout/TopHeader/index.js +9 -2
  118. package/lib/ProLayout/TopHeader/index.less +174 -0
  119. package/lib/ProLayout/style/default.less +4 -0
  120. package/lib/ProLayout/style/style.less +7 -0
  121. package/lib/ProLayout/util.js +5 -5
  122. package/lib/ProTable/Content.js +2 -2
  123. package/lib/ProTable/style/ProTable.less +141 -0
  124. package/lib/RadioButton/RadioButton.js +1 -0
  125. package/lib/RadioButton/style/index.css +20 -0
  126. package/lib/RadioButton/style/index.less +19 -0
  127. package/lib/Scrollbar/style/index.css +65 -0
  128. package/lib/Scrollbar/style/index.less +83 -0
  129. package/lib/Search/Advanced/SaveHistory.js +2 -1
  130. package/lib/Search/Item.js +2 -1
  131. package/lib/Search/style/Item.less +33 -0
  132. package/lib/Search/style/Search.less +179 -0
  133. package/lib/Title/style/index.css +23 -0
  134. package/lib/Title/style/index.less +25 -0
  135. package/lib/Title/title.js +1 -0
  136. package/lib/components.js +2 -1
  137. package/lib/index.js +2 -1
  138. package/lib/style/components.less +9 -0
  139. package/lib/style/index.css +5197 -0
  140. package/lib/style/index.less +13 -13
  141. package/lib/style/variable.css +4 -0
  142. package/lib/style/variable.less +4 -0
  143. package/package.json +172 -171
  144. package/es/CardSelect/style/css.js +0 -1
  145. package/es/CheckButton/style/css.js +0 -1
  146. package/es/DragModal/style/css.js +0 -1
  147. package/es/EditTable/style/css.js +0 -1
  148. package/es/Ellipsis/style/css.js +0 -1
  149. package/es/MonacoEditor/style/css.js +0 -1
  150. package/es/ProLayout/style/css.js +0 -1
  151. package/es/ProTable/style/css.js +0 -1
  152. package/es/RadioButton/style/css.js +0 -1
  153. package/es/Scrollbar/style/css.js +0 -1
  154. package/es/Search/style/css.js +0 -2
  155. package/es/Title/style/css.js +0 -1
  156. package/es/style/css.js +0 -3
  157. package/lib/CardSelect/style/css.js +0 -3
  158. package/lib/CheckButton/style/css.js +0 -3
  159. package/lib/DragModal/style/css.js +0 -3
  160. package/lib/EditTable/style/css.js +0 -3
  161. package/lib/Ellipsis/style/css.js +0 -3
  162. package/lib/MonacoEditor/style/css.js +0 -3
  163. package/lib/ProLayout/style/css.js +0 -3
  164. package/lib/ProTable/style/css.js +0 -3
  165. package/lib/RadioButton/style/css.js +0 -3
  166. package/lib/Scrollbar/style/css.js +0 -3
  167. package/lib/Search/style/css.js +0 -4
  168. package/lib/Title/style/css.js +0 -3
  169. package/lib/style/css.js +0 -4
@@ -17,7 +17,11 @@ var _vueTypes = _interopRequireDefault(require("ant-design-vue/lib/_util/vue-typ
17
17
  var _Icon = _interopRequireDefault(require("../../Icon"));
18
18
  var _RouteContext = require("../RouteContext");
19
19
  require("../typings");
20
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
20
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
21
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
22
+ function _isSlot(s) {
23
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0, _vue.isVNode)(s);
24
+ }
21
25
  var siderMenuProps = exports.siderMenuProps = (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, _defaultSettings.defaultSettingProps), _BaseMenu.baseMenuProps), {}, {
22
26
  logo: {
23
27
  type: [Object, String, Function],
@@ -150,7 +154,11 @@ var defaultRenderLogoAndTitle = exports.defaultRenderLogoAndTitle = function def
150
154
  if (layout === 'mix' && renderFunction === false) {
151
155
  return null;
152
156
  }
153
- var titleDom = (0, _vue.createVNode)("h1", null, [title]);
157
+ var titleDom = (0, _vue.createVNode)("h1", null, _isSlot(title) ? title : {
158
+ default: function _default() {
159
+ return [title];
160
+ }
161
+ });
154
162
  if (renderKey === 'menuHeaderRender') {
155
163
  return null;
156
164
  }
@@ -160,7 +168,11 @@ var defaultRenderLogoAndTitle = exports.defaultRenderLogoAndTitle = function def
160
168
  return renderFunction(logoDom, props.collapsed ? null : titleDom, props);
161
169
  }
162
170
  if (Array.isArray(renderFunction)) {
163
- return (0, _vue.createVNode)(_vue.Fragment, null, [renderFunction]);
171
+ return (0, _vue.createVNode)(_vue.Fragment, null, _isSlot(renderFunction) ? renderFunction : {
172
+ default: function _default() {
173
+ return [renderFunction];
174
+ }
175
+ });
164
176
  }
165
177
  return (0, _vue.createVNode)("a", null, [logoDom, props.collapsed ? null : titleDom]);
166
178
  };
@@ -172,6 +184,7 @@ var defaultRenderCollapsedButton = exports.defaultRenderCollapsedButton = functi
172
184
  }, null);
173
185
  };
174
186
  var SiderMenu = function SiderMenu(props) {
187
+ var _slot;
175
188
  var collapsed = props.collapsed,
176
189
  siderWidth = props.siderWidth,
177
190
  breakpoint = props.breakpoint,
@@ -272,9 +285,17 @@ var SiderMenu = function SiderMenu(props) {
272
285
  "onClick": props.layout !== 'mix' ? props.onMenuHeaderClick : undefined,
273
286
  "id": "logo",
274
287
  "style": props === null || props === void 0 ? void 0 : props.logoStyle
275
- }, [headerDom]), extraDom && (0, _vue.createVNode)("div", {
288
+ }, _isSlot(headerDom) ? headerDom : {
289
+ default: function _default() {
290
+ return [headerDom];
291
+ }
292
+ }), extraDom && (0, _vue.createVNode)("div", {
276
293
  "class": (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(baseClassName, "-extra"), true), "".concat(baseClassName, "-extra-no-logo"), !headerDom)
277
- }, [extraDom]), (0, _vue.createVNode)("div", {
294
+ }, _isSlot(extraDom) ? extraDom : {
295
+ default: function _default() {
296
+ return [extraDom];
297
+ }
298
+ }), (0, _vue.createVNode)("div", {
278
299
  "class": "".concat(baseClassName, "-body"),
279
300
  "style": "flex: 1; overflow: hidden auto;"
280
301
  }, [props.layoutType !== _defaultSettings.LayoutType.CARD ? menuContentRender && menuContentRender(props, defaultMenuDom) || defaultMenuDom : null]), (0, _vue.createVNode)("div", {
@@ -291,17 +312,17 @@ var SiderMenu = function SiderMenu(props) {
291
312
  props.onCollapse(!props.collapsed);
292
313
  }
293
314
  }
315
+ }, _isSlot(_slot = (0, _vue.createVNode)(_lib.Menu.Item, {
316
+ "key": 'collapsed-button',
317
+ "class": "".concat(baseClassName, "-collapsed-button"),
318
+ "title": false
294
319
  }, {
295
320
  default: function _default() {
296
- return [(0, _vue.createVNode)(_lib.Menu.Item, {
297
- "key": 'collapsed-button',
298
- "class": "".concat(baseClassName, "-collapsed-button"),
299
- "title": false
300
- }, {
301
- default: function _default() {
302
- return [collapsedButtonRender && typeof collapsedButtonRender === 'function' ? collapsedButtonRender(collapsed) : collapsedButtonRender];
303
- }
304
- })];
321
+ return [collapsedButtonRender && typeof collapsedButtonRender === 'function' ? collapsedButtonRender(collapsed) : collapsedButtonRender];
322
+ }
323
+ })) ? _slot : {
324
+ default: function _default() {
325
+ return [_slot];
305
326
  }
306
327
  }) : null])];
307
328
  }
@@ -0,0 +1,231 @@
1
+ @import '../style/default.less';
2
+
3
+ @pro-layout-sider-menu-prefix-cls: ~'@{ant-prefix}-pro-sider';
4
+
5
+ @nav-header-height: @pro-layout-header-height;
6
+
7
+ .@{pro-layout-sider-menu-prefix-cls} {
8
+ position: relative;
9
+ background-color: @layout-sider-background;
10
+ border-right: 0;
11
+ // FIXME: 临时修正(可能不会做兼容)
12
+ z-index: 20;
13
+
14
+ // 这里关掉了动画,不然使用无法兼容
15
+ .@{ant-prefix}-menu {
16
+ background: transparent;
17
+ }
18
+
19
+ &.@{ant-prefix}-layout-sider-light {
20
+ .@{ant-prefix}-menu-item a {
21
+ color: @heading-color;
22
+ }
23
+ .@{ant-prefix}-menu-item-selected a,
24
+ .@{ant-prefix}-menu-item a:hover {
25
+ color: @primary-color;
26
+ }
27
+ }
28
+
29
+ &-logo {
30
+ position: relative;
31
+ display: flex;
32
+ align-items: center;
33
+ padding: 16px 16px;
34
+ cursor: pointer;
35
+ transition: padding 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
36
+
37
+ > a {
38
+ display: flex;
39
+ align-items: center;
40
+ justify-content: center;
41
+ min-height: 32px;
42
+ }
43
+
44
+ img {
45
+ display: inline-block;
46
+ height: 32px;
47
+ vertical-align: middle;
48
+ }
49
+
50
+ h1 {
51
+ display: inline-block;
52
+ height: 32px;
53
+ margin: 0 0 0 12px;
54
+ color: white;
55
+ font-weight: 600;
56
+ font-size: 18px;
57
+ line-height: 32px;
58
+ vertical-align: middle;
59
+ animation: pro-layout-title-hide 0.3s;
60
+ }
61
+ }
62
+
63
+ &-logo-card {
64
+ padding: 16px 0;
65
+ justify-content: center;
66
+ }
67
+
68
+ &-extra {
69
+ margin-bottom: 16px;
70
+ padding: 0 16px;
71
+ &-no-logo {
72
+ margin-top: 16px;
73
+ }
74
+ }
75
+
76
+ &-menu {
77
+ position: relative;
78
+ z-index: 10;
79
+ min-height: 100%;
80
+ box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
81
+ }
82
+
83
+ .@{ant-prefix}-layout-sider-children {
84
+ display: flex;
85
+ flex-direction: column;
86
+ height: 100%;
87
+
88
+ ::-webkit-scrollbar {
89
+ width: 6px;
90
+ height: 6px;
91
+ }
92
+
93
+ ::-webkit-scrollbar-track {
94
+ background: rgba(255, 255, 255, 0.15);
95
+ border-radius: 3px;
96
+ box-shadow: inset 0 0 5px rgba(37, 37, 37, 0.05);
97
+ }
98
+
99
+ /* 滚动条滑块 */
100
+ ::-webkit-scrollbar-thumb {
101
+ background: rgba(255, 255, 255, 0.2);
102
+ border-radius: 3px;
103
+ box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.05);
104
+ }
105
+ }
106
+
107
+ &.@{ant-prefix}-layout-sider-collapsed {
108
+ .@{ant-prefix}-menu-inline-collapsed {
109
+ width: 48px;
110
+ }
111
+ .@{pro-layout-sider-menu-prefix-cls} {
112
+ &-logo {
113
+ padding: 16px 8px;
114
+ }
115
+ }
116
+ }
117
+
118
+ &.@{ant-prefix}-layout-sider.@{pro-layout-sider-menu-prefix-cls}-fixed {
119
+ position: fixed;
120
+ top: 0;
121
+ left: 0;
122
+ z-index: 99; // react pro-components: z-index: 100;
123
+ height: 100%;
124
+ overflow: auto;
125
+ overflow-x: hidden;
126
+ box-shadow: 2px 0 8px 0 rgba(29, 35, 41, 0.05);
127
+ > .@{ant-prefix}-menu-root {
128
+ :not(.@{pro-layout-sider-menu-prefix-cls}-link-menu) {
129
+ height: ~'calc(100vh - @{nav-header-height})';
130
+ overflow-y: auto;
131
+ }
132
+ }
133
+ }
134
+
135
+ &-light {
136
+ background-color: @component-background;
137
+ box-shadow: 2px 0 8px 0 rgba(29, 35, 41, 0.05);
138
+
139
+ .@{ant-prefix}-layout-sider-children {
140
+ ::-webkit-scrollbar-track {
141
+ background: rgba(0, 0, 0, 0.06);
142
+ border-radius: 3px;
143
+ box-shadow: inset 0 0 5px rgba(0, 21, 41, 0.05);
144
+ }
145
+
146
+ /* 滚动条滑块 */
147
+ ::-webkit-scrollbar-thumb {
148
+ background: rgba(0, 0, 0, 0.12);
149
+ border-radius: 3px;
150
+ box-shadow: inset 0 0 5px rgba(0, 21, 41, 0.05);
151
+ }
152
+ }
153
+
154
+ .@{pro-layout-sider-menu-prefix-cls}-logo {
155
+ h1 {
156
+ color: @primary-color;
157
+ }
158
+ }
159
+ .@{ant-prefix}-menu-light {
160
+ border-right-color: transparent;
161
+ }
162
+
163
+ .@{pro-layout-sider-menu-prefix-cls}-collapsed-button {
164
+ border-top: @border-width-base @border-style-base
165
+ @border-color-split;
166
+ }
167
+ }
168
+
169
+ &-icon {
170
+ width: 14px;
171
+ vertical-align: baseline;
172
+ }
173
+
174
+ &-links {
175
+ width: 100%;
176
+ ul.@{ant-prefix}-menu-root {
177
+ height: auto;
178
+ }
179
+ }
180
+
181
+ &-collapsed-button {
182
+ border-top: @border-width-base @border-style-base rgba(0, 0, 0, 0.25);
183
+ .anticon {
184
+ font-size: 16px;
185
+ }
186
+ }
187
+
188
+ .top-nav-menu li.@{ant-prefix}-menu-item {
189
+ height: 100%;
190
+ line-height: 1;
191
+ }
192
+ .drawer .drawer-content {
193
+ background: @layout-sider-background;
194
+ }
195
+ }
196
+
197
+ // 修正菜单 collapsed 时,icon 与 title 的间距
198
+ .@{ant-prefix}-pro-menu-item {
199
+ .anticon + .@{ant-prefix}-pro-menu-item-title {
200
+ margin-left: 10px;
201
+ }
202
+ }
203
+
204
+ .sider-app-menus {
205
+ width: 100px;
206
+ background-color: #fff;
207
+ cursor: pointer;
208
+ padding: 6px;
209
+ transition: all .3s;
210
+ border-radius: 4px;
211
+ color: #333;
212
+
213
+ &:hover {
214
+ background-color: #efefef;
215
+ }
216
+ }
217
+
218
+ @keyframes pro-layout-title-hide {
219
+ 0% {
220
+ display: none;
221
+ opacity: 0;
222
+ }
223
+ 80% {
224
+ display: none;
225
+ opacity: 0;
226
+ }
227
+ 100% {
228
+ display: unset;
229
+ opacity: 1;
230
+ }
231
+ }
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.topNavHeaderProps = exports.baseHeaderProps = exports.TopNavHeader = void 0;
8
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
8
  var _vue = require("vue");
9
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
11
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
12
12
  var _vcResizeObserver = _interopRequireDefault(require("ant-design-vue/lib/vc-resize-observer"));
@@ -17,6 +17,9 @@ var _RouteContext = require("../RouteContext");
17
17
  var _BaseMenu = _interopRequireDefault(require("../SiderMenu/BaseMenu"));
18
18
  var _util = require("../util");
19
19
  var _excluded = ["rightContentRender"];
20
+ function _isSlot(s) {
21
+ return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0, _vue.isVNode)(s);
22
+ }
20
23
  var baseHeaderProps = exports.baseHeaderProps = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _defaultSettings.defaultSettingProps), {}, {
21
24
  prefixCls: _vueTypes.default.string.def('ant-pro'),
22
25
  collapsed: _vueTypes.default.looseBool,
@@ -143,7 +146,11 @@ var TopNavHeader = exports.TopNavHeader = function TopNavHeader(props) {
143
146
  "class": "".concat(prefixCls, "-logo"),
144
147
  "key": "logo",
145
148
  "id": "logo"
146
- }, [headerDom])]), (0, _vue.createVNode)("div", {
149
+ }, _isSlot(headerDom) ? headerDom : {
150
+ default: function _default() {
151
+ return [headerDom];
152
+ }
153
+ })]), (0, _vue.createVNode)("div", {
147
154
  "style": {
148
155
  flex: 1
149
156
  },
@@ -0,0 +1,174 @@
1
+ @import '../style/default.less';
2
+
3
+ @top-nav-header-prefix-cls: ~'@{ant-prefix}-pro-top-nav-header';
4
+ @pro-layout-global-header-prefix-cls: ~'@{ant-prefix}-pro-global-header';
5
+
6
+ @pro-layout-header-bg: @component-background;
7
+ @pro-layout-header-hover-bg: @component-background;
8
+ @pro-layout-header-box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
9
+
10
+ .@{pro-layout-global-header-prefix-cls} {
11
+ position: relative;
12
+ display: flex;
13
+ align-items: center;
14
+ height: 100%;
15
+ padding: 0 16px;
16
+ background: @pro-layout-header-bg;
17
+ box-shadow: @pro-layout-header-box-shadow;
18
+ > * {
19
+ height: 100%;
20
+ }
21
+
22
+ &-collapsed-button {
23
+ display: flex;
24
+ align-items: center;
25
+ margin-left: 16px;
26
+ font-size: 20px;
27
+ }
28
+
29
+ &-layout {
30
+ &-mix {
31
+ background-color: @layout-sider-background;
32
+ .@{pro-layout-global-header-prefix-cls}-logo {
33
+ h1 {
34
+ color: @btn-primary-color;
35
+ }
36
+ }
37
+ .anticon {
38
+ color: @btn-primary-color;
39
+ }
40
+ }
41
+ }
42
+
43
+ &-logo {
44
+ position: relative;
45
+ overflow: hidden;
46
+ a {
47
+ display: flex;
48
+ align-items: center;
49
+ height: 100%;
50
+ img {
51
+ height: 28px;
52
+ }
53
+ h1 {
54
+ height: 32px;
55
+ margin: 0 0 0 8px;
56
+ margin: 0 0 0 12px;
57
+ color: @primary-color;
58
+ font-weight: 600;
59
+ font-size: 18px;
60
+ line-height: 32px;
61
+ }
62
+ }
63
+ }
64
+
65
+ &-menu {
66
+ .anticon {
67
+ margin-right: 8px;
68
+ }
69
+ .@{ant-prefix}-dropdown-menu-item {
70
+ min-width: 160px;
71
+ }
72
+ }
73
+
74
+ .dark {
75
+ height: @pro-layout-header-height;
76
+ .action {
77
+ color: rgba(255, 255, 255, 0.85);
78
+ > i {
79
+ color: rgba(255, 255, 255, 0.85);
80
+ }
81
+ &:hover,
82
+ &.opened {
83
+ background: @primary-color;
84
+ }
85
+ .@{ant-prefix}-badge {
86
+ color: rgba(255, 255, 255, 0.85);
87
+ }
88
+ }
89
+ }
90
+ }
91
+
92
+ .@{top-nav-header-prefix-cls} {
93
+ position: relative;
94
+ width: 100%;
95
+ height: 100%;
96
+ box-shadow: 0 1px 4px 0 rgba(0, 21, 41, 0.12);
97
+ transition: background 0.3s, width 0.2s;
98
+
99
+ .@{ant-prefix}-menu {
100
+ background: transparent;
101
+ }
102
+
103
+ &.light {
104
+ background-color: @component-background;
105
+ .@{top-nav-header-prefix-cls}-logo {
106
+ h1 {
107
+ color: @heading-color;
108
+ }
109
+ }
110
+ .anticon {
111
+ color: inherit;
112
+ }
113
+ }
114
+
115
+ &-main {
116
+ display: flex;
117
+ height: 100%;
118
+ padding-left: 16px;
119
+ &-left {
120
+ display: flex;
121
+ min-width: 192px;
122
+ }
123
+ }
124
+
125
+ .anticon {
126
+ color: @btn-primary-color;
127
+ }
128
+
129
+ &-logo {
130
+ position: relative;
131
+ min-width: 165px;
132
+ height: 100%;
133
+ overflow: hidden;
134
+
135
+ img {
136
+ display: inline-block;
137
+ height: 32px;
138
+ vertical-align: middle;
139
+ }
140
+
141
+ h1 {
142
+ display: inline-block;
143
+ margin: 0 0 0 12px;
144
+ color: @btn-primary-color;
145
+ font-weight: 600;
146
+ font-size: 16px;
147
+ vertical-align: top;
148
+ }
149
+ }
150
+
151
+ &-menu {
152
+ min-width: 0;
153
+
154
+ .@{ant-prefix}-menu.@{ant-prefix}-menu-horizontal {
155
+ height: 100%;
156
+ border: none;
157
+
158
+ .@{ant-prefix}-menu-item {
159
+ height: 100%;
160
+
161
+ .@{ant-prefix}-badge {
162
+ color: unset;
163
+ }
164
+ }
165
+ }
166
+ }
167
+ }
168
+
169
+ // replace sub.item
170
+ .@{ant-prefix}-pro-menu-popup {
171
+ .@{ant-prefix}-badge {
172
+ color: unset;
173
+ }
174
+ }
@@ -0,0 +1,4 @@
1
+ @import 'ant-design-vue/lib/style/themes/index.less';
2
+
3
+ @basicLayout-prefix-cls: ~'@{ant-prefix}-pro-basicLayout';
4
+ @pro-layout-header-height: 48px;
@@ -0,0 +1,7 @@
1
+ @import './default.less';
2
+
3
+ @import '../Basic/BasicLayout.less';
4
+ @import '../Basic/Header.less';
5
+ @import '../PageContainer/index.less';
6
+ @import '../SiderMenu/index.less';
7
+ @import '../TopHeader/index.less';
@@ -14,14 +14,14 @@ function clearMenuItem(menusData) {
14
14
  return menusData.map(function (item) {
15
15
  var _finalItem$meta;
16
16
  var finalItem = (0, _objectSpread2.default)({}, item);
17
- if ((_finalItem$meta = finalItem.meta) !== null && _finalItem$meta !== void 0 && _finalItem$meta.hideInMenu) {
17
+ if ((_finalItem$meta = finalItem.meta) === null || _finalItem$meta === void 0 ? void 0 : _finalItem$meta.hideInMenu) {
18
18
  return null;
19
19
  }
20
- if (finalItem && finalItem !== null && finalItem !== void 0 && finalItem.children) {
20
+ if (finalItem && (finalItem === null || finalItem === void 0 ? void 0 : finalItem.children)) {
21
21
  var _finalItem$meta2;
22
- if (!((_finalItem$meta2 = finalItem.meta) !== null && _finalItem$meta2 !== void 0 && _finalItem$meta2.hideChildInMenu) && finalItem.children.some(function (child) {
22
+ if (!((_finalItem$meta2 = finalItem.meta) === null || _finalItem$meta2 === void 0 ? void 0 : _finalItem$meta2.hideChildInMenu) && finalItem.children.some(function (child) {
23
23
  var _child$meta;
24
- return child && child.name && !((_child$meta = child.meta) !== null && _child$meta !== void 0 && _child$meta.hideInMenu);
24
+ return child && child.name && !((_child$meta = child.meta) === null || _child$meta === void 0 ? void 0 : _child$meta.hideInMenu);
25
25
  })) {
26
26
  return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
27
27
  children: clearMenuItem(finalItem.children)
@@ -38,7 +38,7 @@ function flatMap(menusData) {
38
38
  return menusData.map(function (item) {
39
39
  var _finalItem$meta3;
40
40
  var finalItem = (0, _objectSpread2.default)({}, item);
41
- if (!finalItem.name || (_finalItem$meta3 = finalItem.meta) !== null && _finalItem$meta3 !== void 0 && _finalItem$meta3.hideInMenu) {
41
+ if (!finalItem.name || ((_finalItem$meta3 = finalItem.meta) === null || _finalItem$meta3 === void 0 ? void 0 : _finalItem$meta3.hideInMenu)) {
42
42
  return null;
43
43
  }
44
44
  if (finalItem.children) {
@@ -41,7 +41,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
41
41
  "handleCheckedAllChange": "setup-const"
42
42
  } */
43
43
  import { defineComponent as _defineComponent } from 'vue';
44
- import { unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, mergeProps as _mergeProps, renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, normalizeProps as _normalizeProps, createSlots as _createSlots, createBlock as _createBlock } from "vue";
44
+ import { unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, mergeProps as _mergeProps, createSlots as _createSlots, createBlock as _createBlock } from "vue";
45
45
  const _hoisted_1 = { class: "jtable-box" };
46
46
  const _hoisted_2 = {
47
47
  key: 0,
@@ -147,7 +147,7 @@ const __sfc_main__ = _defineComponent({
147
147
  key: item[props.rowKey],
148
148
  onClick: ($event) => (onClick(item))
149
149
  }, [
150
- _renderSlot(_ctx.$slots, "card", _mergeProps({ ref_for: true }, item))
150
+ _renderSlot(_ctx.$slots, "card", _normalizeProps(_guardReactiveProps(item)))
151
151
  ], 10 /* CLASS, PROPS */, _hoisted_4));
152
152
  }), 128 /* KEYED_FRAGMENT */))
153
153
  ], 4 /* STYLE */))