@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.
- package/es/AMap/Map.js +2 -1
- package/es/AutoComplete/AutoComplete.js +1 -0
- package/es/BadgeStatus/Badge.js +2 -1
- package/es/CardSelect/CardSelect.js +2 -1
- package/es/CardSelect/style/index.css +24 -0
- package/es/CardSelect/style/index.less +26 -0
- package/es/CheckButton/CheckButton.js +2 -1
- package/es/CheckButton/style/index.css +37 -0
- package/es/CheckButton/style/index.less +40 -0
- package/es/DragModal/DragModal.js +1 -0
- package/es/DragModal/style/index.css +82 -0
- package/es/DragModal/style/index.less +97 -0
- package/es/Echarts/Echarts.js +2 -1
- package/es/EditTable/EditTable.js +6 -4
- package/es/EditTable/FormItem.js +1 -0
- package/es/EditTable/Header.js +3 -5
- package/es/EditTable/components/ContextMenu/Menu.js +2 -1
- package/es/EditTable/components/Search/search.js +2 -1
- package/es/EditTable/components/Search/sort.js +3 -1
- package/es/EditTable/group.js +10 -7
- package/es/EditTable/hooks/useValidate.js +1 -1
- package/es/EditTable/style/body.less +66 -0
- package/es/EditTable/style/form.less +33 -0
- package/es/EditTable/style/group.less +32 -0
- package/es/EditTable/style/header.less +77 -0
- package/es/EditTable/style/index.css +267 -0
- package/es/EditTable/style/index.less +41 -0
- package/es/EditTable/style/menu.less +25 -0
- package/es/EditTable/style/table.less +47 -0
- package/es/EditTable/utils.js +1 -1
- package/es/Ellipsis/style/index.css +17 -0
- package/es/Ellipsis/style/index.less +20 -0
- package/es/FullPage/FullPage.js +2 -1
- package/es/LocaleProvider/index.js +2 -1
- package/es/MonacoEditor/style/index.css +4 -0
- package/es/MonacoEditor/style/index.less +4 -0
- package/es/PermissionButton/index.js +7 -6
- package/es/ProLayout/Basic/BasicLayout.js +39 -34
- package/es/ProLayout/Basic/BasicLayout.less +66 -0
- package/es/ProLayout/Basic/Header.js +7 -3
- package/es/ProLayout/Basic/Header.less +8 -0
- package/es/ProLayout/PageContainer/index.js +12 -8
- package/es/ProLayout/PageContainer/index.less +103 -0
- package/es/ProLayout/SiderMenu/BaseMenu.js +39 -16
- package/es/ProLayout/SiderMenu/SiderMenu.js +34 -14
- package/es/ProLayout/SiderMenu/index.less +231 -0
- package/es/ProLayout/TopHeader/index.js +9 -1
- package/es/ProLayout/TopHeader/index.less +174 -0
- package/es/ProLayout/style/default.less +4 -0
- package/es/ProLayout/style/style.less +7 -0
- package/es/ProLayout/util.js +5 -5
- package/es/ProTable/Content.js +2 -2
- package/es/ProTable/style/ProTable.less +141 -0
- package/es/RadioButton/RadioButton.js +1 -0
- package/es/RadioButton/style/index.css +20 -0
- package/es/RadioButton/style/index.less +19 -0
- package/es/Scrollbar/style/index.css +65 -0
- package/es/Scrollbar/style/index.less +83 -0
- package/es/Search/Advanced/SaveHistory.js +2 -1
- package/es/Search/Item.js +2 -1
- package/es/Search/style/Item.less +33 -0
- package/es/Search/style/Search.less +179 -0
- package/es/Title/style/index.css +23 -0
- package/es/Title/style/index.less +25 -0
- package/es/Title/title.js +1 -0
- package/es/style/index.css +5197 -0
- package/es/style/index.less +13 -13
- package/es/style/variable.css +4 -0
- package/es/style/variable.less +4 -0
- package/lib/AMap/Map.js +2 -1
- package/lib/AutoComplete/AutoComplete.js +1 -0
- package/lib/BadgeStatus/Badge.js +2 -1
- package/lib/CardSelect/CardSelect.js +2 -1
- package/lib/CardSelect/style/index.css +24 -0
- package/lib/CardSelect/style/index.less +26 -0
- package/lib/CheckButton/CheckButton.js +2 -1
- package/lib/CheckButton/style/index.css +37 -0
- package/lib/CheckButton/style/index.less +40 -0
- package/lib/DragModal/DragModal.js +1 -0
- package/lib/DragModal/style/index.css +82 -0
- package/lib/DragModal/style/index.less +97 -0
- package/lib/Echarts/Echarts.js +2 -1
- package/lib/EditTable/EditTable.js +6 -4
- package/lib/EditTable/FormItem.js +1 -0
- package/lib/EditTable/Header.js +3 -5
- package/lib/EditTable/components/ContextMenu/Menu.js +2 -1
- package/lib/EditTable/components/Search/search.js +2 -1
- package/lib/EditTable/components/Search/sort.js +3 -1
- package/lib/EditTable/group.js +10 -7
- package/lib/EditTable/hooks/useValidate.js +1 -1
- package/lib/EditTable/style/body.less +66 -0
- package/lib/EditTable/style/form.less +33 -0
- package/lib/EditTable/style/group.less +32 -0
- package/lib/EditTable/style/header.less +77 -0
- package/lib/EditTable/style/index.css +267 -0
- package/lib/EditTable/style/index.less +41 -0
- package/lib/EditTable/style/menu.less +25 -0
- package/lib/EditTable/style/table.less +47 -0
- package/lib/EditTable/utils.js +1 -1
- package/lib/Ellipsis/style/index.css +17 -0
- package/lib/Ellipsis/style/index.less +20 -0
- package/lib/FullPage/FullPage.js +2 -1
- package/lib/Icon/icon.js +2 -1
- package/lib/LocaleProvider/index.js +2 -1
- package/lib/MonacoEditor/style/index.css +4 -0
- package/lib/MonacoEditor/style/index.less +4 -0
- package/lib/PermissionButton/index.js +7 -6
- package/lib/ProLayout/Basic/BasicLayout.js +40 -34
- package/lib/ProLayout/Basic/BasicLayout.less +66 -0
- package/lib/ProLayout/Basic/Header.js +6 -2
- package/lib/ProLayout/Basic/Header.less +8 -0
- package/lib/ProLayout/PageContainer/index.js +11 -7
- package/lib/ProLayout/PageContainer/index.less +103 -0
- package/lib/ProLayout/SiderMenu/BaseMenu.js +39 -17
- package/lib/ProLayout/SiderMenu/SiderMenu.js +35 -14
- package/lib/ProLayout/SiderMenu/index.less +231 -0
- package/lib/ProLayout/TopHeader/index.js +9 -2
- package/lib/ProLayout/TopHeader/index.less +174 -0
- package/lib/ProLayout/style/default.less +4 -0
- package/lib/ProLayout/style/style.less +7 -0
- package/lib/ProLayout/util.js +5 -5
- package/lib/ProTable/Content.js +2 -2
- package/lib/ProTable/style/ProTable.less +141 -0
- package/lib/RadioButton/RadioButton.js +1 -0
- package/lib/RadioButton/style/index.css +20 -0
- package/lib/RadioButton/style/index.less +19 -0
- package/lib/Scrollbar/style/index.css +65 -0
- package/lib/Scrollbar/style/index.less +83 -0
- package/lib/Search/Advanced/SaveHistory.js +2 -1
- package/lib/Search/Item.js +2 -1
- package/lib/Search/style/Item.less +33 -0
- package/lib/Search/style/Search.less +179 -0
- package/lib/Title/style/index.css +23 -0
- package/lib/Title/style/index.less +25 -0
- package/lib/Title/title.js +1 -0
- package/lib/components.js +2 -1
- package/lib/index.js +2 -1
- package/lib/style/components.less +9 -0
- package/lib/style/index.css +5197 -0
- package/lib/style/index.less +13 -13
- package/lib/style/variable.css +4 -0
- package/lib/style/variable.less +4 -0
- package/package.json +172 -171
- package/es/CardSelect/style/css.js +0 -1
- package/es/CheckButton/style/css.js +0 -1
- package/es/DragModal/style/css.js +0 -1
- package/es/EditTable/style/css.js +0 -1
- package/es/Ellipsis/style/css.js +0 -1
- package/es/MonacoEditor/style/css.js +0 -1
- package/es/ProLayout/style/css.js +0 -1
- package/es/ProTable/style/css.js +0 -1
- package/es/RadioButton/style/css.js +0 -1
- package/es/Scrollbar/style/css.js +0 -1
- package/es/Search/style/css.js +0 -2
- package/es/Title/style/css.js +0 -1
- package/es/style/css.js +0 -3
- package/lib/CardSelect/style/css.js +0 -3
- package/lib/CheckButton/style/css.js +0 -3
- package/lib/DragModal/style/css.js +0 -3
- package/lib/EditTable/style/css.js +0 -3
- package/lib/Ellipsis/style/css.js +0 -3
- package/lib/MonacoEditor/style/css.js +0 -3
- package/lib/ProLayout/style/css.js +0 -3
- package/lib/ProTable/style/css.js +0 -3
- package/lib/RadioButton/style/css.js +0 -3
- package/lib/Scrollbar/style/css.js +0 -3
- package/lib/Search/style/css.js +0 -4
- package/lib/Title/style/css.js +0 -3
- package/lib/style/css.js +0 -4
|
@@ -1,6 +1,6 @@
|
|
|
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, createTextVNode as _createTextVNode, Fragment as _Fragment } from "vue";
|
|
3
|
+
import { createVNode as _createVNode, resolveDirective as _resolveDirective, createTextVNode as _createTextVNode, isVNode as _isVNode, Fragment as _Fragment } from "vue";
|
|
4
4
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
5
5
|
import { LayoutSider as Sider, Menu, Tooltip } from 'ant-design-vue/es/';
|
|
6
6
|
import BaseMenu, { baseMenuProps } from './BaseMenu';
|
|
@@ -10,6 +10,9 @@ import IconFont from '../../Icon';
|
|
|
10
10
|
import { useRouteContext } from '../RouteContext';
|
|
11
11
|
import { computed, unref } from 'vue';
|
|
12
12
|
import "../typings";
|
|
13
|
+
function _isSlot(s) {
|
|
14
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
|
|
15
|
+
}
|
|
13
16
|
export var siderMenuProps = _objectSpread(_objectSpread(_objectSpread({}, defaultSettingProps), baseMenuProps), {}, {
|
|
14
17
|
logo: {
|
|
15
18
|
type: [Object, String, Function],
|
|
@@ -142,7 +145,11 @@ export var defaultRenderLogoAndTitle = function defaultRenderLogoAndTitle(props)
|
|
|
142
145
|
if (layout === 'mix' && renderFunction === false) {
|
|
143
146
|
return null;
|
|
144
147
|
}
|
|
145
|
-
var titleDom = _createVNode("h1", null,
|
|
148
|
+
var titleDom = _createVNode("h1", null, _isSlot(title) ? title : {
|
|
149
|
+
default: function _default() {
|
|
150
|
+
return [title];
|
|
151
|
+
}
|
|
152
|
+
});
|
|
146
153
|
if (renderKey === 'menuHeaderRender') {
|
|
147
154
|
return null;
|
|
148
155
|
}
|
|
@@ -152,7 +159,11 @@ export var defaultRenderLogoAndTitle = function defaultRenderLogoAndTitle(props)
|
|
|
152
159
|
return renderFunction(logoDom, props.collapsed ? null : titleDom, props);
|
|
153
160
|
}
|
|
154
161
|
if (Array.isArray(renderFunction)) {
|
|
155
|
-
return _createVNode(_Fragment, null,
|
|
162
|
+
return _createVNode(_Fragment, null, _isSlot(renderFunction) ? renderFunction : {
|
|
163
|
+
default: function _default() {
|
|
164
|
+
return [renderFunction];
|
|
165
|
+
}
|
|
166
|
+
});
|
|
156
167
|
}
|
|
157
168
|
return _createVNode("a", null, [logoDom, props.collapsed ? null : titleDom]);
|
|
158
169
|
};
|
|
@@ -164,6 +175,7 @@ export var defaultRenderCollapsedButton = function defaultRenderCollapsedButton(
|
|
|
164
175
|
}, null);
|
|
165
176
|
};
|
|
166
177
|
var SiderMenu = function SiderMenu(props) {
|
|
178
|
+
var _slot;
|
|
167
179
|
var collapsed = props.collapsed,
|
|
168
180
|
siderWidth = props.siderWidth,
|
|
169
181
|
breakpoint = props.breakpoint,
|
|
@@ -264,9 +276,17 @@ var SiderMenu = function SiderMenu(props) {
|
|
|
264
276
|
"onClick": props.layout !== 'mix' ? props.onMenuHeaderClick : undefined,
|
|
265
277
|
"id": "logo",
|
|
266
278
|
"style": props === null || props === void 0 ? void 0 : props.logoStyle
|
|
267
|
-
},
|
|
279
|
+
}, _isSlot(headerDom) ? headerDom : {
|
|
280
|
+
default: function _default() {
|
|
281
|
+
return [headerDom];
|
|
282
|
+
}
|
|
283
|
+
}), extraDom && _createVNode("div", {
|
|
268
284
|
"class": _defineProperty(_defineProperty({}, "".concat(baseClassName, "-extra"), true), "".concat(baseClassName, "-extra-no-logo"), !headerDom)
|
|
269
|
-
},
|
|
285
|
+
}, _isSlot(extraDom) ? extraDom : {
|
|
286
|
+
default: function _default() {
|
|
287
|
+
return [extraDom];
|
|
288
|
+
}
|
|
289
|
+
}), _createVNode("div", {
|
|
270
290
|
"class": "".concat(baseClassName, "-body"),
|
|
271
291
|
"style": "flex: 1; overflow: hidden auto;"
|
|
272
292
|
}, [props.layoutType !== LayoutType.CARD ? menuContentRender && menuContentRender(props, defaultMenuDom) || defaultMenuDom : null]), _createVNode("div", {
|
|
@@ -283,17 +303,17 @@ var SiderMenu = function SiderMenu(props) {
|
|
|
283
303
|
props.onCollapse(!props.collapsed);
|
|
284
304
|
}
|
|
285
305
|
}
|
|
306
|
+
}, _isSlot(_slot = _createVNode(Menu.Item, {
|
|
307
|
+
"key": 'collapsed-button',
|
|
308
|
+
"class": "".concat(baseClassName, "-collapsed-button"),
|
|
309
|
+
"title": false
|
|
286
310
|
}, {
|
|
287
311
|
default: function _default() {
|
|
288
|
-
return [
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
default: function _default() {
|
|
294
|
-
return [collapsedButtonRender && typeof collapsedButtonRender === 'function' ? collapsedButtonRender(collapsed) : collapsedButtonRender];
|
|
295
|
-
}
|
|
296
|
-
})];
|
|
312
|
+
return [collapsedButtonRender && typeof collapsedButtonRender === 'function' ? collapsedButtonRender(collapsed) : collapsedButtonRender];
|
|
313
|
+
}
|
|
314
|
+
})) ? _slot : {
|
|
315
|
+
default: function _default() {
|
|
316
|
+
return [_slot];
|
|
297
317
|
}
|
|
298
318
|
}) : null])];
|
|
299
319
|
}
|
|
@@ -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
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isVNode as _isVNode } from "vue";
|
|
1
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
3
|
import { createVNode as _createVNode } from "vue";
|
|
3
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
@@ -11,6 +12,9 @@ import { defaultSettingProps, LayoutType } from '../defaultSettings';
|
|
|
11
12
|
import { defaultPrefixCls, useRouteContext } from '../RouteContext';
|
|
12
13
|
import BaseMenu from '../SiderMenu/BaseMenu';
|
|
13
14
|
import { clearMenuItem } from '../util';
|
|
15
|
+
function _isSlot(s) {
|
|
16
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !_isVNode(s);
|
|
17
|
+
}
|
|
14
18
|
export var baseHeaderProps = _objectSpread(_objectSpread({}, defaultSettingProps), {}, {
|
|
15
19
|
prefixCls: PropTypes.string.def('ant-pro'),
|
|
16
20
|
collapsed: PropTypes.looseBool,
|
|
@@ -137,7 +141,11 @@ export var TopNavHeader = function TopNavHeader(props) {
|
|
|
137
141
|
"class": "".concat(prefixCls, "-logo"),
|
|
138
142
|
"key": "logo",
|
|
139
143
|
"id": "logo"
|
|
140
|
-
},
|
|
144
|
+
}, _isSlot(headerDom) ? headerDom : {
|
|
145
|
+
default: function _default() {
|
|
146
|
+
return [headerDom];
|
|
147
|
+
}
|
|
148
|
+
})]), _createVNode("div", {
|
|
141
149
|
"style": {
|
|
142
150
|
flex: 1
|
|
143
151
|
},
|
|
@@ -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
|
+
}
|
package/es/ProLayout/util.js
CHANGED
|
@@ -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)
|
|
6
|
+
if ((_finalItem$meta = finalItem.meta) === null || _finalItem$meta === void 0 ? void 0 : _finalItem$meta.hideInMenu) {
|
|
7
7
|
return null;
|
|
8
8
|
}
|
|
9
|
-
if (finalItem && finalItem
|
|
9
|
+
if (finalItem && (finalItem === null || finalItem === void 0 ? void 0 : finalItem.children)) {
|
|
10
10
|
var _finalItem$meta2;
|
|
11
|
-
if (!((_finalItem$meta2 = finalItem.meta)
|
|
11
|
+
if (!((_finalItem$meta2 = finalItem.meta) === null || _finalItem$meta2 === void 0 ? void 0 : _finalItem$meta2.hideChildInMenu) && finalItem.children.some(function (child) {
|
|
12
12
|
var _child$meta;
|
|
13
|
-
return child && child.name && !((_child$meta = child.meta)
|
|
13
|
+
return child && child.name && !((_child$meta = child.meta) === null || _child$meta === void 0 ? 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)
|
|
30
|
+
if (!finalItem.name || ((_finalItem$meta3 = finalItem.meta) === null || _finalItem$meta3 === void 0 ? void 0 : _finalItem$meta3.hideInMenu)) {
|
|
31
31
|
return null;
|
|
32
32
|
}
|
|
33
33
|
if (finalItem.children) {
|
package/es/ProTable/Content.js
CHANGED
|
@@ -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,
|
|
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",
|
|
150
|
+
_renderSlot(_ctx.$slots, "card", _normalizeProps(_guardReactiveProps(item)))
|
|
151
151
|
], 10 /* CLASS, PROPS */, _hoisted_4));
|
|
152
152
|
}), 128 /* KEYED_FRAGMENT */))
|
|
153
153
|
], 4 /* STYLE */))
|