@jetlinks-web/components 2.7.0 → 3.0.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.
- package/es/AutoComplete/AutoComplete.js +2 -3
- package/es/BadgeStatus/Badge.js +2 -3
- package/es/CardSelect/CardSelect.js +23 -18
- package/es/CardSelect/style/index.js +25 -1
- package/es/CheckButton/CheckButton.js +12 -4
- package/es/CheckButton/style/index.js +41 -1
- package/es/ConfigProvider/index.js +1 -1
- package/es/DragModal/DragModal.js +15 -9
- package/es/DragModal/style/index.js +64 -1
- package/es/EditTable/Body.js +10 -3
- package/es/EditTable/EditTable.js +14 -8
- package/es/EditTable/FormItem.js +15 -10
- package/es/EditTable/Header.js +16 -6
- package/es/EditTable/components/ContextMenu/Menu.js +12 -6
- package/es/EditTable/components/Search/search.js +1 -2
- package/es/EditTable/components/Search/sort.js +1 -3
- package/es/EditTable/group.js +24 -19
- package/es/EditTable/hooks/useValidate.js +1 -1
- package/es/EditTable/style/body.js +53 -0
- package/es/EditTable/style/form.js +24 -0
- package/es/EditTable/style/group.js +25 -0
- package/es/EditTable/style/header.js +58 -0
- package/es/EditTable/style/index.js +42 -1
- package/es/EditTable/style/menu.js +27 -0
- package/es/EditTable/style/table.js +46 -0
- package/es/EditTable/utils.js +1 -1
- package/es/Ellipsis/Ellipsis.js +11 -3
- package/es/Ellipsis/style/index.js +24 -1
- package/es/Empty/Empty.js +1 -1
- package/es/FullPage/FullPage.js +1 -2
- package/es/LocaleProvider/index.js +1 -2
- package/es/PermissionButton/index.js +4 -5
- package/es/ProLayout/Basic/BasicLayout.js +46 -42
- package/es/ProLayout/Basic/BasicLayoutStyle.js +39 -0
- package/es/ProLayout/Basic/Header.js +4 -8
- package/es/ProLayout/Basic/HeaderStyle.js +10 -0
- package/es/ProLayout/PageContainer/index.js +20 -16
- package/es/ProLayout/PageContainer/style.js +46 -0
- package/es/ProLayout/SiderMenu/BaseMenu.js +14 -37
- package/es/ProLayout/SiderMenu/SiderMenu.js +25 -36
- package/es/ProLayout/SiderMenu/style.js +166 -0
- package/es/ProLayout/TopHeader/index.js +12 -11
- package/es/ProLayout/TopHeader/style.js +126 -0
- package/es/ProLayout/style/index.js +7 -1
- package/es/ProLayout/util.js +5 -5
- package/es/ProTable/Alert.js +13 -5
- package/es/ProTable/Content.js +22 -14
- package/es/ProTable/Header.js +22 -12
- package/es/ProTable/Pagination.js +13 -5
- package/es/ProTable/ProTable.js +43 -27
- package/es/ProTable/setting.js +1 -1
- package/es/ProTable/style/index.js +109 -1
- package/es/RadioButton/RadioButton.js +10 -4
- package/es/RadioButton/style/index.js +23 -1
- package/es/Scrollbar/Scrollbar.js +10 -3
- package/es/Scrollbar/Thumb.js +36 -25
- package/es/Scrollbar/style/index.js +63 -1
- package/es/Search/Advanced/History.js +24 -17
- package/es/Search/Advanced/SaveHistory.js +2 -3
- package/es/Search/Advanced/index.js +213 -293
- package/es/Search/Item.js +175 -415
- package/es/Search/Search.js +78 -172
- package/es/Search/hooks/index.js +108 -1
- package/es/Search/hooks/useRouteQuery.js +57 -0
- package/es/Search/setting.js +132 -14
- package/es/Search/style/index.js +4 -2
- package/es/Search/style/item.js +28 -0
- package/es/Search/style/search.js +133 -0
- package/es/Search/util.js +116 -124
- package/es/Skeleton/components/DashBoardCard.js +64 -0
- package/es/Skeleton/components/DashBoardChart.js +96 -0
- package/es/Skeleton/components/Detail.js +110 -0
- package/es/Skeleton/components/Drawer.js +91 -0
- package/es/Skeleton/components/Item.js +68 -0
- package/es/Skeleton/components/List.js +45 -0
- package/es/Skeleton/components/ListCard.js +63 -0
- package/es/Skeleton/components/ListCardItem.js +86 -0
- package/es/Skeleton/components/ListTable.js +76 -0
- package/es/Skeleton/components/Page.js +62 -0
- package/es/Skeleton/components/Search.js +54 -0
- package/es/Skeleton/components/Tree.js +72 -0
- package/es/Skeleton/index.js +15 -0
- package/es/Skeleton/skeleton.js +58 -0
- package/es/Skeleton/style/index.js +132 -0
- package/es/Title/style/index.js +29 -1
- package/es/Title/title.js +13 -5
- package/es/ValueItem/ValueItem.js +29 -72
- package/es/components.js +0 -3
- package/es/locale/en-US.js +0 -7
- package/es/locale/zh-CN.js +0 -7
- package/es/style/index.js +0 -3
- package/es/style/styleRegister.js +21 -0
- package/es/style/variable.js +4 -0
- package/es/style.js +0 -12
- package/lib/AutoComplete/AutoComplete.js +1 -2
- package/lib/BadgeStatus/Badge.js +2 -3
- package/lib/CardSelect/CardSelect.js +23 -18
- package/lib/CardSelect/style/index.js +30 -1
- package/lib/CheckButton/CheckButton.js +12 -4
- package/lib/CheckButton/style/index.js +46 -1
- package/lib/ConfigProvider/context.js +1 -1
- package/lib/ConfigProvider/index.js +3 -3
- package/lib/DragModal/DragModal.js +15 -9
- package/lib/DragModal/style/index.js +69 -1
- package/lib/EditTable/Body.js +10 -3
- package/lib/EditTable/EditTable.js +13 -7
- package/lib/EditTable/FormItem.js +16 -11
- package/lib/EditTable/Header.js +16 -6
- package/lib/EditTable/components/ContextMenu/Menu.js +12 -6
- package/lib/EditTable/components/Search/search.js +1 -2
- package/lib/EditTable/components/Search/sort.js +1 -3
- package/lib/EditTable/group.js +24 -19
- package/lib/EditTable/hooks/useValidate.js +1 -1
- package/lib/EditTable/style/body.js +60 -0
- package/lib/EditTable/style/form.js +31 -0
- package/lib/EditTable/style/group.js +32 -0
- package/lib/EditTable/style/header.js +65 -0
- package/lib/EditTable/style/index.js +47 -1
- package/lib/EditTable/style/menu.js +33 -0
- package/lib/EditTable/style/table.js +52 -0
- package/lib/EditTable/utils.js +1 -1
- package/lib/Ellipsis/Ellipsis.js +11 -3
- package/lib/Ellipsis/style/index.js +29 -1
- package/lib/Empty/Empty.js +1 -1
- package/lib/FullPage/FullPage.js +1 -2
- package/lib/LocaleProvider/index.js +1 -2
- package/lib/PermissionButton/index.js +9 -10
- package/lib/ProLayout/Basic/BasicLayout.js +55 -51
- package/lib/ProLayout/Basic/BasicLayoutStyle.js +46 -0
- package/lib/ProLayout/Basic/Header.js +6 -10
- package/lib/ProLayout/Basic/HeaderStyle.js +17 -0
- package/lib/ProLayout/PageContainer/index.js +24 -20
- package/lib/ProLayout/PageContainer/style.js +53 -0
- package/lib/ProLayout/SiderMenu/BaseMenu.js +18 -40
- package/lib/ProLayout/SiderMenu/SiderMenu.js +28 -39
- package/lib/ProLayout/SiderMenu/style.js +173 -0
- package/lib/ProLayout/TopHeader/index.js +12 -10
- package/lib/ProLayout/TopHeader/style.js +133 -0
- package/lib/ProLayout/defaultSettings.js +1 -1
- package/lib/ProLayout/style/index.js +12 -1
- package/lib/ProLayout/util.js +5 -5
- package/lib/ProTable/Alert.js +13 -5
- package/lib/ProTable/Content.js +22 -14
- package/lib/ProTable/Header.js +22 -12
- package/lib/ProTable/Pagination.js +13 -5
- package/lib/ProTable/ProTable.js +43 -27
- package/lib/ProTable/setting.js +3 -3
- package/lib/ProTable/style/index.js +114 -1
- package/lib/RadioButton/RadioButton.js +10 -4
- package/lib/RadioButton/style/index.js +28 -1
- package/lib/Scrollbar/Scrollbar.js +10 -3
- package/lib/Scrollbar/Thumb.js +36 -25
- package/lib/Scrollbar/style/index.js +68 -1
- package/lib/Search/Advanced/History.js +24 -17
- package/lib/Search/Advanced/SaveHistory.js +2 -3
- package/lib/Search/Advanced/index.js +213 -293
- package/lib/Search/Item.js +175 -415
- package/lib/Search/Search.js +78 -172
- package/lib/Search/hooks/index.js +130 -1
- package/lib/Search/hooks/useRouteQuery.js +64 -0
- package/lib/Search/setting.js +133 -15
- package/lib/Search/style/index.js +9 -2
- package/lib/Search/style/item.js +35 -0
- package/lib/Search/style/search.js +140 -0
- package/lib/Search/util.js +116 -124
- package/lib/Skeleton/components/DashBoardCard.js +64 -0
- package/lib/Skeleton/components/DashBoardChart.js +96 -0
- package/lib/Skeleton/components/Detail.js +110 -0
- package/lib/Skeleton/components/Drawer.js +91 -0
- package/lib/Skeleton/components/Item.js +68 -0
- package/lib/Skeleton/components/List.js +45 -0
- package/lib/Skeleton/components/ListCard.js +63 -0
- package/lib/Skeleton/components/ListCardItem.js +86 -0
- package/lib/Skeleton/components/ListTable.js +76 -0
- package/lib/Skeleton/components/Page.js +62 -0
- package/lib/Skeleton/components/Search.js +54 -0
- package/lib/Skeleton/components/Tree.js +72 -0
- package/lib/Skeleton/index.js +75 -0
- package/lib/Skeleton/skeleton.js +58 -0
- package/lib/Skeleton/style/index.js +139 -0
- package/lib/Title/style/index.js +34 -1
- package/lib/Title/title.js +13 -5
- package/lib/ValueItem/ValueItem.js +29 -72
- package/lib/components.js +0 -21
- package/lib/locale/en-US.js +0 -7
- package/lib/locale/zh-CN.js +0 -7
- package/lib/style/components.less +0 -1
- package/lib/style/index.js +1 -4
- package/lib/style/styleRegister.js +28 -0
- package/lib/style/variable.js +10 -0
- package/lib/style.js +1 -14
- package/package.json +13 -14
- package/es/AMap/Map.js +0 -133
- package/es/AMap/index.js +0 -5
- package/es/AMap/util.js +0 -56
- package/es/CardSelect/style/index.css +0 -24
- package/es/CardSelect/style/index.less +0 -26
- package/es/CheckButton/style/index.css +0 -37
- package/es/CheckButton/style/index.less +0 -40
- package/es/DragModal/style/index.css +0 -82
- package/es/DragModal/style/index.less +0 -97
- package/es/Echarts/Echarts.js +0 -48
- package/es/Echarts/index.js +0 -5
- package/es/EditTable/style/body.less +0 -66
- package/es/EditTable/style/form.less +0 -33
- package/es/EditTable/style/group.less +0 -32
- package/es/EditTable/style/header.less +0 -77
- package/es/EditTable/style/index.css +0 -267
- package/es/EditTable/style/index.less +0 -41
- package/es/EditTable/style/menu.less +0 -25
- package/es/EditTable/style/table.less +0 -47
- package/es/Ellipsis/style/index.css +0 -17
- package/es/Ellipsis/style/index.less +0 -20
- package/es/MonacoEditor/Monaco.js +0 -242
- package/es/MonacoEditor/index.js +0 -5
- package/es/MonacoEditor/style/index.css +0 -4
- package/es/MonacoEditor/style/index.js +0 -1
- package/es/MonacoEditor/style/index.less +0 -4
- package/es/ProLayout/Basic/BasicLayout.less +0 -66
- package/es/ProLayout/Basic/Header.less +0 -8
- package/es/ProLayout/PageContainer/index.less +0 -103
- package/es/ProLayout/SiderMenu/index.less +0 -231
- package/es/ProLayout/TopHeader/index.less +0 -174
- package/es/ProLayout/style/default.less +0 -4
- package/es/ProLayout/style/style.less +0 -7
- package/es/ProTable/style/ProTable.less +0 -141
- package/es/RadioButton/style/index.css +0 -20
- package/es/RadioButton/style/index.less +0 -19
- package/es/Scrollbar/style/index.css +0 -65
- package/es/Scrollbar/style/index.less +0 -83
- package/es/Search/style/Item.less +0 -33
- package/es/Search/style/Search.less +0 -179
- package/es/Title/style/index.css +0 -23
- package/es/Title/style/index.less +0 -25
- package/es/style/index.css +0 -5197
- package/es/style/index.less +0 -13
- package/es/style/variable.css +0 -4
- package/es/style/variable.less +0 -4
- package/lib/AMap/Map.js +0 -133
- package/lib/AMap/index.js +0 -12
- package/lib/AMap/util.js +0 -62
- package/lib/CardSelect/style/index.css +0 -24
- package/lib/CardSelect/style/index.less +0 -26
- package/lib/CheckButton/style/index.css +0 -37
- package/lib/CheckButton/style/index.less +0 -40
- package/lib/DragModal/style/index.css +0 -82
- package/lib/DragModal/style/index.less +0 -97
- package/lib/Echarts/Echarts.js +0 -48
- package/lib/Echarts/index.js +0 -12
- package/lib/EditTable/style/body.less +0 -66
- package/lib/EditTable/style/form.less +0 -33
- package/lib/EditTable/style/group.less +0 -32
- package/lib/EditTable/style/header.less +0 -77
- package/lib/EditTable/style/index.css +0 -267
- package/lib/EditTable/style/index.less +0 -41
- package/lib/EditTable/style/menu.less +0 -25
- package/lib/EditTable/style/table.less +0 -47
- package/lib/Ellipsis/style/index.css +0 -17
- package/lib/Ellipsis/style/index.less +0 -20
- package/lib/MonacoEditor/Monaco.js +0 -242
- package/lib/MonacoEditor/index.js +0 -12
- package/lib/MonacoEditor/style/index.css +0 -4
- package/lib/MonacoEditor/style/index.js +0 -3
- package/lib/MonacoEditor/style/index.less +0 -4
- package/lib/ProLayout/Basic/BasicLayout.less +0 -66
- package/lib/ProLayout/Basic/Header.less +0 -8
- package/lib/ProLayout/PageContainer/index.less +0 -103
- package/lib/ProLayout/SiderMenu/index.less +0 -231
- package/lib/ProLayout/TopHeader/index.less +0 -174
- package/lib/ProLayout/style/default.less +0 -4
- package/lib/ProLayout/style/style.less +0 -7
- package/lib/ProTable/style/ProTable.less +0 -141
- package/lib/RadioButton/style/index.css +0 -20
- package/lib/RadioButton/style/index.less +0 -19
- package/lib/Scrollbar/style/index.css +0 -65
- package/lib/Scrollbar/style/index.less +0 -83
- package/lib/Search/style/Item.less +0 -33
- package/lib/Search/style/Search.less +0 -179
- package/lib/Title/style/index.css +0 -23
- package/lib/Title/style/index.less +0 -25
- package/lib/style/index.css +0 -5197
- package/lib/style/index.less +0 -13
- package/lib/style/variable.css +0 -4
- package/lib/style/variable.less +0 -4
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
-
import
|
|
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
|
-
import { LayoutSider as Sider, Menu, Tooltip } from 'ant-design-vue
|
|
6
|
+
import { LayoutSider as Sider, Menu, Tooltip } from 'ant-design-vue';
|
|
6
7
|
import BaseMenu, { baseMenuProps } from './BaseMenu';
|
|
7
8
|
import { defaultSettingProps, LayoutType } from '../defaultSettings';
|
|
8
9
|
import PropTypes from 'ant-design-vue/es/_util/vue-types';
|
|
@@ -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
|
-
|
|
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,
|
|
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,
|
|
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);
|
|
@@ -276,17 +273,9 @@ var SiderMenu = function SiderMenu(props) {
|
|
|
276
273
|
"onClick": props.layout !== 'mix' ? props.onMenuHeaderClick : undefined,
|
|
277
274
|
"id": "logo",
|
|
278
275
|
"style": props === null || props === void 0 ? void 0 : props.logoStyle
|
|
279
|
-
},
|
|
280
|
-
default: function _default() {
|
|
281
|
-
return [headerDom];
|
|
282
|
-
}
|
|
283
|
-
}), extraDom && _createVNode("div", {
|
|
276
|
+
}, [headerDom]), extraDom && _createVNode("div", {
|
|
284
277
|
"class": _defineProperty(_defineProperty({}, "".concat(baseClassName, "-extra"), true), "".concat(baseClassName, "-extra-no-logo"), !headerDom)
|
|
285
|
-
},
|
|
286
|
-
default: function _default() {
|
|
287
|
-
return [extraDom];
|
|
288
|
-
}
|
|
289
|
-
}), _createVNode("div", {
|
|
278
|
+
}, [extraDom]), _createVNode("div", {
|
|
290
279
|
"class": "".concat(baseClassName, "-body"),
|
|
291
280
|
"style": "flex: 1; overflow: hidden auto;"
|
|
292
281
|
}, [props.layoutType !== LayoutType.CARD ? menuContentRender && menuContentRender(props, defaultMenuDom) || defaultMenuDom : null]), _createVNode("div", {
|
|
@@ -303,17 +292,17 @@ var SiderMenu = function SiderMenu(props) {
|
|
|
303
292
|
props.onCollapse(!props.collapsed);
|
|
304
293
|
}
|
|
305
294
|
}
|
|
306
|
-
}, _isSlot(_slot = _createVNode(Menu.Item, {
|
|
307
|
-
"key": 'collapsed-button',
|
|
308
|
-
"class": "".concat(baseClassName, "-collapsed-button"),
|
|
309
|
-
"title": false
|
|
310
295
|
}, {
|
|
311
296
|
default: function _default() {
|
|
312
|
-
return [
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
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
|
+
})];
|
|
317
306
|
}
|
|
318
307
|
}) : null])];
|
|
319
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
|
|
8
|
+
import { default as ResizeObserver } from "ant-design-vue/es/vc-resize-observer";
|
|
9
9
|
import { defaultRenderLogoAndTitle, siderMenuProps } from '../SiderMenu/SiderMenu';
|
|
10
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
|
-
|
|
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
|
-
},
|
|
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 '
|
|
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]);
|
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 && _finalItem$meta.hideInMenu) {
|
|
7
7
|
return null;
|
|
8
8
|
}
|
|
9
|
-
if (finalItem &&
|
|
9
|
+
if (finalItem && finalItem !== null && finalItem !== 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 && _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 && _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 || (
|
|
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) {
|
package/es/ProTable/Alert.js
CHANGED
|
@@ -20,19 +20,23 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
20
20
|
"computed": "setup-const",
|
|
21
21
|
"_alertProps": "setup-maybe-ref",
|
|
22
22
|
"useLocaleReceiver": "setup-maybe-ref",
|
|
23
|
+
"useProTableStyle": "setup-maybe-ref",
|
|
23
24
|
"contextLocale": "setup-maybe-ref",
|
|
24
25
|
"props": "setup-reactive-const",
|
|
25
26
|
"emits": "setup-const",
|
|
27
|
+
"prefixCls": "setup-ref",
|
|
28
|
+
"wrapSSR": "setup-maybe-ref",
|
|
29
|
+
"hashId": "setup-maybe-ref",
|
|
26
30
|
"_message": "setup-ref",
|
|
27
31
|
"onClose": "setup-const"
|
|
28
32
|
} */
|
|
29
33
|
import { defineComponent as _defineComponent } from 'vue';
|
|
30
|
-
import {
|
|
31
|
-
|
|
32
|
-
import { Alert, Button } from 'ant-design-vue/es/';
|
|
34
|
+
import { unref as _unref, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
35
|
+
import { Alert, Button } from 'ant-design-vue';
|
|
33
36
|
import { computed } from "vue";
|
|
34
37
|
import { _alertProps } from "./setting";
|
|
35
38
|
import { useLocaleReceiver } from "../LocaleReciver/index";
|
|
39
|
+
import useProTableStyle from './style';
|
|
36
40
|
const __sfc_main__ = _defineComponent({
|
|
37
41
|
...{
|
|
38
42
|
name: 'Alert'
|
|
@@ -43,6 +47,8 @@ const __sfc_main__ = _defineComponent({
|
|
|
43
47
|
const [contextLocale] = useLocaleReceiver('ProTable');
|
|
44
48
|
const props = __props;
|
|
45
49
|
const emits = __emit;
|
|
50
|
+
const prefixCls = computed(() => 'pro-table');
|
|
51
|
+
const [wrapSSR, hashId] = useProTableStyle(prefixCls);
|
|
46
52
|
const _message = computed(() => {
|
|
47
53
|
let locale = _optionalChain([contextLocale, 'access', _2 => _2.value, 'optionalAccess', _3 => _3.alert, 'optionalAccess', _4 => _4.selectItem]) || '';
|
|
48
54
|
[_optionalChain([props, 'access', _5 => _5.rowSelection, 'optionalAccess', _6 => _6.selectedRowKeys, 'optionalAccess', _7 => _7.length]) || 0].forEach((item, index) => {
|
|
@@ -54,7 +60,9 @@ const __sfc_main__ = _defineComponent({
|
|
|
54
60
|
emits('close');
|
|
55
61
|
};
|
|
56
62
|
return (_ctx, _cache) => {
|
|
57
|
-
return (_openBlock(), _createElementBlock("div",
|
|
63
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
64
|
+
class: _normalizeClass(['jtable-alert', _unref(hashId)])
|
|
65
|
+
}, [
|
|
58
66
|
_renderSlot(_ctx.$slots, "default", {}, () => [
|
|
59
67
|
_createVNode(_unref(Alert), {
|
|
60
68
|
type: "info",
|
|
@@ -74,7 +82,7 @@ const __sfc_main__ = _defineComponent({
|
|
|
74
82
|
_: 1 /* STABLE */
|
|
75
83
|
}, 8 /* PROPS */, ["message"])
|
|
76
84
|
])
|
|
77
|
-
]));
|
|
85
|
+
], 2 /* CLASS */));
|
|
78
86
|
};
|
|
79
87
|
}
|
|
80
88
|
});
|