@zat-design/sisyphus-react 4.0.19 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.css +1 -1
- package/dist/less.esm.css +1 -1
- package/es/ProForm/components/combination/Group/utils/index.d.ts +28 -28
- package/es/ProLayout/components/Layout/Header/index.js +143 -2
- package/es/ProLayout/components/Layout/Header/style/index.less +161 -12
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +3 -2
- package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +7 -5
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +1 -6
- package/es/ProLayout/components/Layout/Menu/OpenMenu/propsType.d.ts +0 -1
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +14 -37
- package/es/ProLayout/components/Layout/Menu/SideMenu/index.js +1 -2
- package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +2 -3
- package/es/ProLayout/components/Layout/Menu/index.js +1 -3
- package/es/ProLayout/components/Layout/Menu/style/index.less +12 -22
- package/es/ProLayout/components/Layout/Notice/style/index.less +31 -33
- package/es/ProLayout/components/ProCollapse/style/index.less +2 -0
- package/es/ProLayout/components/ProFooter/index.js +1 -1
- package/es/ProLayout/components/ProHeader/style/index.less +2 -1
- package/es/ProLayout/components/TabsManager/components/TabsHeader.d.ts +12 -0
- package/es/ProLayout/components/TabsManager/components/TabsHeader.js +53 -0
- package/es/ProLayout/components/TabsManager/index.js +7 -24
- package/es/ProLayout/components/TabsManager/style/index.less +24 -8
- package/es/ProLayout/index.js +12 -8
- package/es/ProLayout/propTypes.d.ts +69 -10
- package/es/ProLayout/propTypes.js +5 -1
- package/es/ProLayout/style/index.less +70 -35
- package/es/ProStep/components/Step/index.js +2 -1
- package/es/ProStep/utils/index.js +2 -1
- package/es/assets/apps.svg +23 -0
- package/es/assets/header_bg.png +0 -0
- package/es/style/theme/antd.less +5 -0
- package/lib/ProForm/components/combination/Group/utils/index.d.ts +28 -28
- package/lib/ProLayout/components/Layout/Header/index.js +143 -2
- package/lib/ProLayout/components/Layout/Header/style/index.less +161 -12
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +3 -2
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +7 -5
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +1 -6
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/propsType.d.ts +0 -1
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +14 -37
- package/lib/ProLayout/components/Layout/Menu/SideMenu/index.js +1 -2
- package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +2 -3
- package/lib/ProLayout/components/Layout/Menu/index.js +1 -3
- package/lib/ProLayout/components/Layout/Menu/style/index.less +12 -22
- package/lib/ProLayout/components/Layout/Notice/style/index.less +31 -33
- package/lib/ProLayout/components/ProCollapse/style/index.less +2 -0
- package/lib/ProLayout/components/ProFooter/index.js +1 -1
- package/lib/ProLayout/components/ProHeader/style/index.less +2 -1
- package/lib/ProLayout/components/TabsManager/components/TabsHeader.d.ts +12 -0
- package/lib/ProLayout/components/TabsManager/components/TabsHeader.js +58 -0
- package/lib/ProLayout/components/TabsManager/index.js +7 -24
- package/lib/ProLayout/components/TabsManager/style/index.less +24 -8
- package/lib/ProLayout/index.js +12 -8
- package/lib/ProLayout/propTypes.d.ts +69 -10
- package/lib/ProLayout/propTypes.js +5 -1
- package/lib/ProLayout/style/index.less +70 -35
- package/lib/ProStep/components/Step/index.js +2 -1
- package/lib/ProStep/utils/index.js +2 -1
- package/lib/assets/apps.svg +23 -0
- package/lib/assets/header_bg.png +0 -0
- package/lib/style/theme/antd.less +5 -0
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
.pro-header {
|
|
5
5
|
padding: 10px 0 0 0 !important;
|
|
6
6
|
background-color: var(--zaui-base-bg, #ffffff);
|
|
7
|
-
box-shadow:
|
|
7
|
+
box-shadow: 0px 3px 8px 1px rgba(0, 55, 93, 0.1);
|
|
8
8
|
|
|
9
9
|
&.pro-header-no-back.pro-header-has-describe {
|
|
10
10
|
.pro-header-top {
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
right: 0;
|
|
77
77
|
background: #fff;
|
|
78
78
|
letter-spacing: 2px;
|
|
79
|
+
height: 24px;
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
82
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TabsProps } from 'antd';
|
|
2
|
+
export interface TabsHeaderProps {
|
|
3
|
+
activeKey: string | undefined;
|
|
4
|
+
tabsItems: TabsProps['items'];
|
|
5
|
+
onTabChange: (activeKey: string) => void;
|
|
6
|
+
onTabEdit: (targetKey: string, action: 'add' | 'remove') => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* 标签页头部:监听 window 滚动(实际滚动在 window/documentElement,非 body),
|
|
10
|
+
* 滚动时添加阴影类名;仅此组件随滚动重渲染,不带动父组件内容区。
|
|
11
|
+
*/
|
|
12
|
+
export declare function TabsHeader({ activeKey, tabsItems, onTabChange, onTabEdit }: TabsHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TabsHeader = TabsHeader;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _antd = require("antd");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
13
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
14
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
15
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
+
/**
|
|
17
|
+
* 标签页头部:监听 window 滚动(实际滚动在 window/documentElement,非 body),
|
|
18
|
+
* 滚动时添加阴影类名;仅此组件随滚动重渲染,不带动父组件内容区。
|
|
19
|
+
*/
|
|
20
|
+
function TabsHeader(_ref) {
|
|
21
|
+
var activeKey = _ref.activeKey,
|
|
22
|
+
tabsItems = _ref.tabsItems,
|
|
23
|
+
onTabChange = _ref.onTabChange,
|
|
24
|
+
onTabEdit = _ref.onTabEdit;
|
|
25
|
+
var _useState = (0, _react.useState)(() => typeof window !== 'undefined' ? window.scrollY : 0),
|
|
26
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
27
|
+
windowScrollY = _useState2[0],
|
|
28
|
+
setWindowScrollY = _useState2[1];
|
|
29
|
+
(0, _react.useEffect)(() => {
|
|
30
|
+
if (typeof window === 'undefined') return;
|
|
31
|
+
var onScroll = () => setWindowScrollY(window.scrollY);
|
|
32
|
+
window.addEventListener('scroll', onScroll, {
|
|
33
|
+
passive: true
|
|
34
|
+
});
|
|
35
|
+
return () => window.removeEventListener('scroll', onScroll);
|
|
36
|
+
}, []);
|
|
37
|
+
var isScrolled = windowScrollY > 0;
|
|
38
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
39
|
+
className: "pro-layout-tabs-header",
|
|
40
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Tabs, {
|
|
41
|
+
activeKey: activeKey,
|
|
42
|
+
onChange: onTabChange,
|
|
43
|
+
onEdit: onTabEdit,
|
|
44
|
+
type: "editable-card",
|
|
45
|
+
hideAdd: true,
|
|
46
|
+
items: tabsItems,
|
|
47
|
+
className: "pro-layout-tabs-antd",
|
|
48
|
+
classNames: {
|
|
49
|
+
popup: {
|
|
50
|
+
root: 'pro-layout-tabs-dropdown-menu'
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}), isScrolled && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
54
|
+
className: "pro-layout-tabs-header-shadow",
|
|
55
|
+
"aria-hidden": true
|
|
56
|
+
})]
|
|
57
|
+
});
|
|
58
|
+
}
|
|
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var _antd = require("antd");
|
|
9
8
|
var _useTabsState2 = require("./hooks/useTabsState");
|
|
10
9
|
var _TabItem = require("./components/TabItem");
|
|
10
|
+
var _TabsHeader = require("./components/TabsHeader");
|
|
11
11
|
var _TabsContext = require("./components/TabsContext");
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -130,28 +130,6 @@ var TabsManager = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
130
130
|
}));
|
|
131
131
|
}, [state.tabsList, state.activeKey, config === null || config === void 0 ? void 0 : config.menuItems, config === null || config === void 0 ? void 0 : config.tabMenuClick, switchTab, removeTab, closeOtherTabs, closeRightTabs, closeAllTabs]);
|
|
132
132
|
|
|
133
|
-
// 渲染标签页列表
|
|
134
|
-
var renderTabList = () => {
|
|
135
|
-
if (state.tabsList.length === 0) return null;
|
|
136
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
137
|
-
className: "pro-layout-tabs-header",
|
|
138
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Tabs, {
|
|
139
|
-
activeKey: state.activeKey || undefined,
|
|
140
|
-
onChange: handleTabChange,
|
|
141
|
-
onEdit: handleTabEdit,
|
|
142
|
-
type: "editable-card",
|
|
143
|
-
hideAdd: true,
|
|
144
|
-
items: tabsItems,
|
|
145
|
-
className: "pro-layout-tabs-antd",
|
|
146
|
-
classNames: {
|
|
147
|
-
popup: {
|
|
148
|
-
root: 'pro-layout-tabs-dropdown-menu'
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
})
|
|
152
|
-
});
|
|
153
|
-
};
|
|
154
|
-
|
|
155
133
|
// 从 config 中获取组件解析函数和空状态组件
|
|
156
134
|
var activeComponent = config === null || config === void 0 ? void 0 : config.activeComponent;
|
|
157
135
|
var emptyComponent = config === null || config === void 0 ? void 0 : config.empty;
|
|
@@ -205,7 +183,12 @@ var TabsManager = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
205
183
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
206
184
|
className: "pro-layout-tabs",
|
|
207
185
|
"data-testid": "tabs-manager",
|
|
208
|
-
children: [
|
|
186
|
+
children: [state.tabsList.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_TabsHeader.TabsHeader, {
|
|
187
|
+
activeKey: state.activeKey || undefined,
|
|
188
|
+
tabsItems: tabsItems,
|
|
189
|
+
onTabChange: handleTabChange,
|
|
190
|
+
onTabEdit: handleTabEdit
|
|
191
|
+
}), renderContent()]
|
|
209
192
|
})
|
|
210
193
|
});
|
|
211
194
|
});
|
|
@@ -15,9 +15,24 @@
|
|
|
15
15
|
padding: 12px 0;
|
|
16
16
|
border-bottom: none;
|
|
17
17
|
position: sticky;
|
|
18
|
-
top:
|
|
19
|
-
z-index:
|
|
20
|
-
background: #
|
|
18
|
+
top: 64px;
|
|
19
|
+
z-index: 90;
|
|
20
|
+
background: #fff;
|
|
21
|
+
box-shadow: none;
|
|
22
|
+
transition: box-shadow 0.3s ease;
|
|
23
|
+
|
|
24
|
+
&-shadow {
|
|
25
|
+
position: absolute;
|
|
26
|
+
left: 0;
|
|
27
|
+
right: 0;
|
|
28
|
+
bottom: 0;
|
|
29
|
+
height: 1px;
|
|
30
|
+
background: transparent;
|
|
31
|
+
pointer-events: none;
|
|
32
|
+
z-index: 1;
|
|
33
|
+
box-shadow: 1px 2px 4px 1px rgba(0, 55, 93, .2);
|
|
34
|
+
}
|
|
35
|
+
|
|
21
36
|
.pro-layout-tab-icon {
|
|
22
37
|
display: none !important;
|
|
23
38
|
}
|
|
@@ -79,6 +94,7 @@
|
|
|
79
94
|
// 覆盖 nav 样式,使其匹配 pro-layout-tabs-header
|
|
80
95
|
.@{ant-prefix}-tabs-nav {
|
|
81
96
|
margin: 0;
|
|
97
|
+
// padding: 0 var(--zaui-space-size-md, 16px);
|
|
82
98
|
padding: 0;
|
|
83
99
|
border-bottom: none;
|
|
84
100
|
|
|
@@ -121,7 +137,7 @@
|
|
|
121
137
|
padding: 0 !important;
|
|
122
138
|
margin: 0 !important;
|
|
123
139
|
background: transparent !important;
|
|
124
|
-
border: none
|
|
140
|
+
border: none ;
|
|
125
141
|
border-radius: 0 !important;
|
|
126
142
|
cursor: pointer;
|
|
127
143
|
transition: none; // 由内部 TabItemComponent 处理过渡
|
|
@@ -139,6 +155,7 @@
|
|
|
139
155
|
.pro-layout-tab-item {
|
|
140
156
|
width: 100%;
|
|
141
157
|
height: 100%;
|
|
158
|
+
border: 1px solid rgb(217, 217, 217);
|
|
142
159
|
}
|
|
143
160
|
}
|
|
144
161
|
|
|
@@ -146,6 +163,9 @@
|
|
|
146
163
|
.@{ant-prefix}-tabs-tab-active {
|
|
147
164
|
background: transparent !important;
|
|
148
165
|
border: none !important;
|
|
166
|
+
.pro-layout-tab-item{
|
|
167
|
+
border-color: transparent !important;
|
|
168
|
+
}
|
|
149
169
|
|
|
150
170
|
&::before {
|
|
151
171
|
display: none;
|
|
@@ -267,10 +287,6 @@
|
|
|
267
287
|
}
|
|
268
288
|
}
|
|
269
289
|
|
|
270
|
-
.pro-layout-dark .pro-layout-tabs {
|
|
271
|
-
--pro-layout-tabs-text-color: rgba(255, 255, 255, 0.85);
|
|
272
|
-
}
|
|
273
|
-
|
|
274
290
|
.pro-layout-tabs-dropdown-menu{
|
|
275
291
|
.@{ant-prefix}-tabs-dropdown-menu-item-remove{
|
|
276
292
|
display: none !important;
|
package/lib/ProLayout/index.js
CHANGED
|
@@ -28,6 +28,7 @@ var _useProLayoutTabs = require("./components/TabsManager/hooks/useProLayoutTabs
|
|
|
28
28
|
var _useActiveTab = require("./components/TabsManager/hooks/useActiveTab");
|
|
29
29
|
var _utils = require("./utils");
|
|
30
30
|
var _utils2 = require("./components/TabsManager/utils");
|
|
31
|
+
var _header_bg = _interopRequireDefault(require("../assets/header_bg.png"));
|
|
31
32
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
32
33
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
33
34
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -50,7 +51,7 @@ var ProLayout = props => {
|
|
|
50
51
|
_props$pure = props.pure,
|
|
51
52
|
pure = _props$pure === void 0 ? false : _props$pure,
|
|
52
53
|
_props$headerHeight = props.headerHeight,
|
|
53
|
-
headerHeight = _props$headerHeight === void 0 ?
|
|
54
|
+
headerHeight = _props$headerHeight === void 0 ? 64 : _props$headerHeight,
|
|
54
55
|
_props$contentStyle = props.contentStyle,
|
|
55
56
|
contentStyle = _props$contentStyle === void 0 ? {} : _props$contentStyle,
|
|
56
57
|
_props$waterMarkProps = props.waterMarkProps,
|
|
@@ -60,8 +61,6 @@ var ProLayout = props => {
|
|
|
60
61
|
dataSource = props.dataSource,
|
|
61
62
|
_props$pathPrefix = props.pathPrefix,
|
|
62
63
|
pathPrefix = _props$pathPrefix === void 0 ? '' : _props$pathPrefix,
|
|
63
|
-
_props$theme = props.theme,
|
|
64
|
-
theme = _props$theme === void 0 ? 'dark' : _props$theme,
|
|
65
64
|
target = props.target,
|
|
66
65
|
onCollapsedChange = props.onCollapsedChange,
|
|
67
66
|
_props$collapsed = props.collapsed,
|
|
@@ -73,6 +72,7 @@ var ProLayout = props => {
|
|
|
73
72
|
_props$title = props.title,
|
|
74
73
|
title = _props$title === void 0 ? '' : _props$title,
|
|
75
74
|
logo = props.logo,
|
|
75
|
+
appsOptions = props.appsOptions,
|
|
76
76
|
_props$iconfontUrl = props.iconfontUrl,
|
|
77
77
|
iconfontUrl = _props$iconfontUrl === void 0 ? '' : _props$iconfontUrl,
|
|
78
78
|
sideMenuFooterRender = props.sideMenuFooterRender,
|
|
@@ -213,7 +213,8 @@ var ProLayout = props => {
|
|
|
213
213
|
headerContentRender,
|
|
214
214
|
rightContentRender,
|
|
215
215
|
title,
|
|
216
|
-
logo
|
|
216
|
+
logo,
|
|
217
|
+
appsOptions
|
|
217
218
|
};
|
|
218
219
|
|
|
219
220
|
// 为Notice组件创建专门的props对象
|
|
@@ -237,18 +238,21 @@ var ProLayout = props => {
|
|
|
237
238
|
onCollapsedChange && onCollapsedChange(!collapsed);
|
|
238
239
|
},
|
|
239
240
|
pure,
|
|
240
|
-
theme,
|
|
241
241
|
sideMenuFooterRender,
|
|
242
242
|
sideMenuHeaderRender,
|
|
243
|
-
onMenuClick: handleMenuClick
|
|
243
|
+
onMenuClick: handleMenuClick,
|
|
244
|
+
appsOptions
|
|
244
245
|
};
|
|
245
246
|
var layoutDom = /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
246
247
|
className: (0, _classnames.default)({
|
|
247
248
|
'pro-layout': true,
|
|
248
|
-
'pro-layout-
|
|
249
|
-
'pro-layout-
|
|
249
|
+
'pro-layout-light': true,
|
|
250
|
+
'pro-layout-pure': typeof pure === 'boolean' ? pure : (pure === null || pure === void 0 ? void 0 : pure.topMenu) || (pure === null || pure === void 0 ? void 0 : pure.leftMenu),
|
|
250
251
|
[`${className}`]: className
|
|
251
252
|
}),
|
|
253
|
+
style: {
|
|
254
|
+
'--header-bg-image': `url(${_header_bg.default})`
|
|
255
|
+
},
|
|
252
256
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Header, _objectSpread({}, headerProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Notice, _objectSpread({}, noticeProps)), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
253
257
|
className: contentCls,
|
|
254
258
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Menu, _objectSpread({}, menuProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
@@ -1,5 +1,63 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { ProWaterMarkType } from '../ProWaterMark/propsType';
|
|
3
|
+
/**
|
|
4
|
+
* @description 应用选项类型(无分组模式)
|
|
5
|
+
*/
|
|
6
|
+
export interface AppsOption {
|
|
7
|
+
/**
|
|
8
|
+
* @description 应用唯一标识值
|
|
9
|
+
* @default -
|
|
10
|
+
*/
|
|
11
|
+
value: string;
|
|
12
|
+
/**
|
|
13
|
+
* @description 应用名称
|
|
14
|
+
* @default -
|
|
15
|
+
*/
|
|
16
|
+
label: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* @description 应用图标
|
|
19
|
+
* @default -
|
|
20
|
+
*/
|
|
21
|
+
icon?: ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* @description 点击回调
|
|
24
|
+
* @default -
|
|
25
|
+
*/
|
|
26
|
+
onChange?: (value: string, option: AppsOption) => void;
|
|
27
|
+
/**
|
|
28
|
+
* @description 允许扩展字段
|
|
29
|
+
*/
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* @description 应用分组类型(分组模式)
|
|
34
|
+
*/
|
|
35
|
+
export interface AppsGroup {
|
|
36
|
+
/**
|
|
37
|
+
* @description 分组唯一标识
|
|
38
|
+
* @default -
|
|
39
|
+
*/
|
|
40
|
+
value: string;
|
|
41
|
+
/**
|
|
42
|
+
* @description 分组名称
|
|
43
|
+
* @default -
|
|
44
|
+
*/
|
|
45
|
+
label: ReactNode;
|
|
46
|
+
/**
|
|
47
|
+
* @description 分组图标
|
|
48
|
+
* @default -
|
|
49
|
+
*/
|
|
50
|
+
icon?: ReactNode;
|
|
51
|
+
/**
|
|
52
|
+
* @description 该分组下的应用列表
|
|
53
|
+
* @default []
|
|
54
|
+
*/
|
|
55
|
+
options: AppsOption[];
|
|
56
|
+
/**
|
|
57
|
+
* @description 允许扩展字段
|
|
58
|
+
*/
|
|
59
|
+
[key: string]: any;
|
|
60
|
+
}
|
|
3
61
|
export interface MenusType {
|
|
4
62
|
/**
|
|
5
63
|
* @description 菜单ID
|
|
@@ -83,10 +141,6 @@ export interface DataSourceType {
|
|
|
83
141
|
*/
|
|
84
142
|
menus?: MenusType[];
|
|
85
143
|
}
|
|
86
|
-
/**
|
|
87
|
-
* @description 主题枚举类型
|
|
88
|
-
*/
|
|
89
|
-
type themeEnum = 'light' | 'dark';
|
|
90
144
|
/**
|
|
91
145
|
* @description 是否带有菜单界面的配置
|
|
92
146
|
*/
|
|
@@ -125,6 +179,11 @@ interface ProLayoutBaseProps {
|
|
|
125
179
|
* @default -
|
|
126
180
|
*/
|
|
127
181
|
sideMenuFooterRender?: ReactNode;
|
|
182
|
+
/**
|
|
183
|
+
* @description 头部标题区自定义渲染
|
|
184
|
+
* @default -
|
|
185
|
+
*/
|
|
186
|
+
headerTitleRender?: ReactNode;
|
|
128
187
|
/**
|
|
129
188
|
* @description 通告
|
|
130
189
|
* @default -
|
|
@@ -162,7 +221,7 @@ interface ProLayoutBaseProps {
|
|
|
162
221
|
pure?: pureKey;
|
|
163
222
|
/**
|
|
164
223
|
* @description 头部区域高度
|
|
165
|
-
* @default
|
|
224
|
+
* @default 64
|
|
166
225
|
*/
|
|
167
226
|
headerHeight?: number;
|
|
168
227
|
/**
|
|
@@ -194,16 +253,16 @@ interface ProLayoutBaseProps {
|
|
|
194
253
|
* @default "_self"
|
|
195
254
|
*/
|
|
196
255
|
target?: '_blank' | '_parent' | '_self' | '_top';
|
|
197
|
-
/**
|
|
198
|
-
* @description 主题
|
|
199
|
-
* @default "light"
|
|
200
|
-
*/
|
|
201
|
-
theme?: themeEnum;
|
|
202
256
|
/**
|
|
203
257
|
* @description 子元素
|
|
204
258
|
* @default -
|
|
205
259
|
*/
|
|
206
260
|
children?: ReactNode;
|
|
261
|
+
/**
|
|
262
|
+
* @description 应用入口配置(支持分组和扁平两种模式)
|
|
263
|
+
* @default -
|
|
264
|
+
*/
|
|
265
|
+
appsOptions?: AppsGroup[] | AppsOption[];
|
|
207
266
|
/**
|
|
208
267
|
* @description 允许扩展字段
|
|
209
268
|
*/
|
|
@@ -9,7 +9,25 @@
|
|
|
9
9
|
.pro-layout {
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: column;
|
|
12
|
-
|
|
12
|
+
min-height: 100vh;
|
|
13
|
+
background: #F7F9FD;
|
|
14
|
+
position: relative;
|
|
15
|
+
|
|
16
|
+
// 背景图层:固定在顶部,延伸到可视区域下方,z-index低于header和content让内容显示在背景之上
|
|
17
|
+
&::before {
|
|
18
|
+
content: '';
|
|
19
|
+
position: fixed;
|
|
20
|
+
top: 0;
|
|
21
|
+
left: 0;
|
|
22
|
+
right: 0;
|
|
23
|
+
height: 200px;
|
|
24
|
+
background-image: var(--header-bg-image);
|
|
25
|
+
background-repeat: no-repeat;
|
|
26
|
+
background-position: top center;
|
|
27
|
+
background-size: 100% auto;
|
|
28
|
+
pointer-events: none;
|
|
29
|
+
z-index: 1;
|
|
30
|
+
}
|
|
13
31
|
|
|
14
32
|
.pro-layout-menu-open {
|
|
15
33
|
.pro-layout-open-menu-lv1 {
|
|
@@ -19,11 +37,8 @@
|
|
|
19
37
|
}
|
|
20
38
|
}
|
|
21
39
|
|
|
22
|
-
//
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
// pro-collapse折叠调整
|
|
26
|
-
.pro-collapse {
|
|
40
|
+
// pro-collapse折叠调整
|
|
41
|
+
.pro-collapse {
|
|
27
42
|
border-radius: var(--zaui-border-radius, 8px);
|
|
28
43
|
&.@{ant-prefix}-collapse-borderless{
|
|
29
44
|
background: #fff;
|
|
@@ -93,14 +108,9 @@
|
|
|
93
108
|
}
|
|
94
109
|
|
|
95
110
|
|
|
96
|
-
.pro-layout-content {
|
|
97
|
-
padding: 0 var(--zaui-space-size-md, 16px);
|
|
98
|
-
background: #f3f5f8;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
111
|
.pro-layout-menu-open,
|
|
102
112
|
.pro-layout-menu {
|
|
103
|
-
box-shadow:
|
|
113
|
+
box-shadow: none;
|
|
104
114
|
}
|
|
105
115
|
|
|
106
116
|
.pro-layout-open-menu .@{ant-prefix}-menu-title-content div .pro-layout-icon {
|
|
@@ -109,10 +119,14 @@
|
|
|
109
119
|
color: var(--zaui-text, #343434);
|
|
110
120
|
}
|
|
111
121
|
.pro-layout-menu-fold {
|
|
122
|
+
background: #F7F9FD;
|
|
123
|
+
|
|
112
124
|
.pro-layout-menu-fold-list {
|
|
113
|
-
|
|
125
|
+
background: #F7F9FD;
|
|
126
|
+
border-right: none;
|
|
114
127
|
li {
|
|
115
128
|
position: relative;
|
|
129
|
+
background: #F7F9FD;
|
|
116
130
|
|
|
117
131
|
& > div {
|
|
118
132
|
position: relative;
|
|
@@ -164,9 +178,8 @@
|
|
|
164
178
|
}
|
|
165
179
|
|
|
166
180
|
.pro-layout-menu-collapsed {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
border-right: 1px solid #f0f0f0;
|
|
181
|
+
background: #F7F9FD;
|
|
182
|
+
border-right: none;
|
|
170
183
|
&:hover {
|
|
171
184
|
background: transparent !important;
|
|
172
185
|
}
|
|
@@ -200,6 +213,7 @@
|
|
|
200
213
|
}
|
|
201
214
|
.@{ant-prefix}-menu-root {
|
|
202
215
|
overflow-x: hidden !important;
|
|
216
|
+
border: none !important;
|
|
203
217
|
}
|
|
204
218
|
|
|
205
219
|
.anticon-caret-down {
|
|
@@ -208,14 +222,32 @@
|
|
|
208
222
|
}
|
|
209
223
|
|
|
210
224
|
.pro-layout-row .pro-layout-menu {
|
|
211
|
-
background:
|
|
225
|
+
background: #F7F9FD;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// 所有 Menu 相关的背景色统一为 #F7F9FD
|
|
229
|
+
.pro-layout-open-menu {
|
|
230
|
+
background: #F7F9FD;
|
|
231
|
+
|
|
232
|
+
.@{ant-prefix}-menu {
|
|
233
|
+
background: #F7F9FD;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.@{ant-prefix}-menu-root {
|
|
237
|
+
background: #F7F9FD;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.@{ant-prefix}-menu-sub {
|
|
241
|
+
background: #F7F9FD !important;
|
|
242
|
+
}
|
|
243
|
+
|
|
212
244
|
}
|
|
213
245
|
|
|
214
246
|
.pro-layout-open-menu
|
|
215
247
|
.@{ant-prefix}-menu-root
|
|
216
248
|
> .@{ant-prefix}-menu-submenu
|
|
217
249
|
.@{ant-prefix}-menu-sub {
|
|
218
|
-
background:
|
|
250
|
+
background: #F7F9FD;
|
|
219
251
|
}
|
|
220
252
|
|
|
221
253
|
.pro-layout-open-menu .@{ant-prefix}-menu-title-content div h2 {
|
|
@@ -232,7 +264,7 @@
|
|
|
232
264
|
.pro-layout-open-menu .@{ant-prefix}-menu-submenu-title:hover,
|
|
233
265
|
.pro-layout-open-menu .@{ant-prefix}-menu-item-selected{
|
|
234
266
|
position: relative;
|
|
235
|
-
background: transparent;
|
|
267
|
+
background-color: transparent !important;
|
|
236
268
|
|
|
237
269
|
&:before {
|
|
238
270
|
position: absolute;
|
|
@@ -258,34 +290,37 @@
|
|
|
258
290
|
color: var(--zaui-brand, #006aff) !important;
|
|
259
291
|
}
|
|
260
292
|
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
.pro-layout-row-has-notice {
|
|
264
|
-
.pro-layout-content {
|
|
265
|
-
min-height: calc(100vh - 80px);
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
293
|
|
|
269
294
|
/** 内容区 */
|
|
270
295
|
.pro-layout-content {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
flex:
|
|
274
|
-
|
|
275
|
-
margin-
|
|
296
|
+
position: relative;
|
|
297
|
+
z-index: 10;
|
|
298
|
+
flex: 1;
|
|
299
|
+
margin-top: 64px;
|
|
300
|
+
margin-right: var(--zaui-space-size-md, 16px);
|
|
301
|
+
margin-bottom: 0;
|
|
276
302
|
margin-left: 48px;
|
|
277
|
-
padding: 0 var(--zaui-space-size-
|
|
303
|
+
padding: 0 var(--zaui-space-size-md, 16px);
|
|
304
|
+
background: #FFFFFF;
|
|
305
|
+
border-top: 1px solid rgb(235 236 238);
|
|
306
|
+
border-right: 1px solid rgb(235 236 238);
|
|
307
|
+
border-left: 1px solid rgb(235 236 238);
|
|
308
|
+
border-bottom: none;
|
|
309
|
+
border-radius: var(--zaui-border-radius, 8px) var(--zaui-border-radius, 8px) 0 0;
|
|
278
310
|
transition: all 0.24s ease;
|
|
311
|
+
}
|
|
279
312
|
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
313
|
+
// 纯净模式:隐藏背景图
|
|
314
|
+
&.pro-layout-pure {
|
|
315
|
+
&::before {
|
|
316
|
+
display: none;
|
|
283
317
|
}
|
|
284
318
|
}
|
|
285
319
|
|
|
286
320
|
.pro-layout-row-pure {
|
|
287
321
|
.pro-layout-content {
|
|
288
322
|
margin: 0 !important;
|
|
323
|
+
background: #fff;
|
|
289
324
|
}
|
|
290
325
|
}
|
|
291
326
|
|
|
@@ -27,7 +27,8 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
27
27
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
28
28
|
var Step = _ref => {
|
|
29
29
|
var _locale$ProStep;
|
|
30
|
-
var fixedTop = _ref.fixedTop,
|
|
30
|
+
var _ref$fixedTop = _ref.fixedTop,
|
|
31
|
+
fixedTop = _ref$fixedTop === void 0 ? 64 : _ref$fixedTop,
|
|
31
32
|
_ref$dataSource = _ref.dataSource,
|
|
32
33
|
dataSource = _ref$dataSource === void 0 ? [] : _ref$dataSource,
|
|
33
34
|
activeKey = _ref.activeKey,
|
|
@@ -47,8 +47,9 @@ var handleScroll = (id, options) => {
|
|
|
47
47
|
} else {
|
|
48
48
|
// 如果没有错误表单项,则滚动到指定元素位置
|
|
49
49
|
setTimeout((0, _lodash.debounce)(() => {
|
|
50
|
+
var rect = dom.getBoundingClientRect();
|
|
50
51
|
window.scrollTo({
|
|
51
|
-
top:
|
|
52
|
+
top: window.scrollY + rect.top - targetOffset,
|
|
52
53
|
behavior: 'smooth'
|
|
53
54
|
});
|
|
54
55
|
}, 100), 0);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
3
|
+
<title>编组 33</title>
|
|
4
|
+
<g id="AI投保作业平台" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
5
|
+
<g id="顶部导航栏样式" transform="translate(-74, -101)" fill="#343434">
|
|
6
|
+
<g id="编组备份" transform="translate(54, 86)">
|
|
7
|
+
<g id="编组" transform="translate(10, 5)">
|
|
8
|
+
<g id="编组-33" transform="translate(10, 10)">
|
|
9
|
+
<rect id="矩形" x="0" y="0" width="3.47826087" height="3.47826087" rx="0.447204977"></rect>
|
|
10
|
+
<rect id="矩形备份-31" x="0" y="6.26086957" width="3.47826087" height="3.47826087" rx="0.447204977"></rect>
|
|
11
|
+
<rect id="矩形备份-34" x="0" y="12.5217391" width="3.47826087" height="3.47826087" rx="0.447204977"></rect>
|
|
12
|
+
<rect id="矩形备份-29" x="6.26086957" y="0" width="3.47826087" height="3.47826087" rx="0.447204977"></rect>
|
|
13
|
+
<rect id="矩形备份-32" x="6.26086957" y="6.26086957" width="3.47826087" height="3.47826087" rx="0.447204977"></rect>
|
|
14
|
+
<rect id="矩形备份-35" x="6.26086957" y="12.5217391" width="3.47826087" height="3.47826087" rx="0.447204977"></rect>
|
|
15
|
+
<rect id="矩形备份-30" x="12.5217391" y="0" width="3.47826087" height="3.47826087" rx="0.447204977"></rect>
|
|
16
|
+
<rect id="矩形备份-33" x="12.5217391" y="6.26086957" width="3.47826087" height="3.47826087" rx="0.447204977"></rect>
|
|
17
|
+
<rect id="矩形备份-36" x="12.5217391" y="12.5217391" width="3.47826087" height="3.47826087" rx="0.447204977"></rect>
|
|
18
|
+
</g>
|
|
19
|
+
</g>
|
|
20
|
+
</g>
|
|
21
|
+
</g>
|
|
22
|
+
</g>
|
|
23
|
+
</svg>
|
|
Binary file
|