@yueglobal/ui 1.0.2 → 1.0.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/README.md CHANGED
@@ -25,20 +25,22 @@ import {
25
25
 
26
26
  ### 属性
27
27
 
28
- | 属性 | 说明 | 类型 | 默认值 |
29
- | ----------------- | ----------------------------------- | ------------------------------------------- | ------ |
30
- | `width` | 内容宽度 | `string` \| `number` | `80%` |
31
- | `backgroundColor` | 头部背景色 | `string` | `#fff` |
32
- | `activeLabel` | 当前选中的一级菜单项的标题 | `string` | |
33
- | `rightContent` | 顶部右侧的登录/用户信息按钮 | `ReactNode` | |
34
- | `menuItems` | 各业务系统的菜单 | `YueMenuItem`[] | |
35
- | `pageTitle` | 缺值时从一级菜单取值 | `string` | |
36
- | `pageIcon` | 页面图标 | `ReactNode` | |
37
- | `breadcrumbs` | 自定义面包屑数据 | `YueBreadcrumb`[] | |
38
- | `routes` | 路由数据,用于自动生成面包屑 | any | |
39
- | `pathname` | 当前的路由 | `string` | |
40
- | `onRouteChange` | 点击菜单/面包屑时触发的路由切换事件 | `({ key: string; label?: string }) => void` | |
41
- | `onLocaleChange` | 切换语言时的回调事件 | `({locale: string}) => void` | |
28
+ | 属性 | 说明 | 类型 | 默认值 |
29
+ | ----------------- | ----------------------------------- | ------------------------------------------- | ---------- |
30
+ | `width` | 内容宽度 | `string` \| `number` | `80%` |
31
+ | `backgroundColor` | 头部背景色 | `string` | `#fff` |
32
+ | `activeLabel` | 当前选中的一级菜单项的标题 | `string` | |
33
+ | `rightContent` | 顶部右侧的登录/用户信息按钮 | `ReactNode` | |
34
+ | `onLocaleChange` | 切换语言时的回调事件 | `({locale: string}) => void` | |
35
+ | | `以下二级导航栏的配置` | | |
36
+ | `menuItems` | 各业务系统的菜单 | `YueMenuItem`[] | |
37
+ | `pageTitle` | 缺值时从一级菜单匹配值 | `string` | |
38
+ | `pageIcon` | 页面图标 | `ReactNode` | |
39
+ | `breadcrumbs` | 自定义面包屑数据 | `YueBreadcrumb`[] | |
40
+ | `routes` | 路由数据,用于自动生成面包屑 | any | |
41
+ | `pathname` | 当前的路由 | `string` | |
42
+ | `subMenuLayout` | 二级导航栏的菜单弹出层布局 | `vertical` \| `horizontal` | `vertical` |
43
+ | `onRouteChange` | 点击菜单/面包屑时触发的路由切换事件 | `({ key: string; label?: string }) => void` | |
42
44
 
43
45
  - 业务子系统:`pageTitle`或`pageIcon`缺省时会根据`url`自动从一级菜单匹配值
44
46
 
@@ -0,0 +1,9 @@
1
+ <svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
2
+ width="1em" height="1em">
3
+ <path
4
+ d="M890.56 110.69666665H133.33333333c-35.2 0-64.10666667 28.8-64.10666666 64.10666668v518.4c0 35.2 28.8 64.10666667 64.10666666 64.10666667h346.56s0.10666667 0 0.10666667 0.10666666v139.84s0 0.10666667-0.10666667 0.10666666H170.66666667c-17.49333333 0-32.21333333 13.65333333-32.74666667 31.14666668-0.42666667 18.02666667 14.08 32.85333333 32 32.85333333H853.33333333c17.49333333 0 32.21333333-13.65333333 32.74666667-31.14666667 0.42666667-18.02666667-14.08-32.85333333-32-32.85333334H544s-0.10666667 0-0.10666667-0.10666666V757.20333333s0-0.10666667 0.10666667-0.10666667h346.56c35.2 0 64.10666667-28.8 64.10666667-64.10666666v-518.4c0-35.09333333-28.90666667-63.89333333-64.10666667-63.89333335z m0.10666667 582.29333335l-0.21333334 0.21333333H133.44l-0.21333333-0.21333333V174.91l0.21333333-0.21333335h757.01333333l0.21333334 0.21333335v518.08z"
5
+ ></path>
6
+ <path
7
+ d="M266.45333333 251.49666666h-33.70666666c-11.73333333 0-21.33333333 9.6-21.33333334 21.33333334v33.70666665c0 11.73333333 9.6 21.33333333 21.33333334 21.33333335h33.70666666c11.73333333 0 21.33333333-9.6 21.33333334-21.33333335v-33.70666665c0-11.73333333-9.6-21.33333333-21.33333334-21.33333334zM363.52 251.49666666h-33.70666667c-11.73333333 0-21.33333333 9.6-21.33333333 21.33333334v33.70666665c0 11.73333333 9.6 21.33333333 21.33333333 21.33333335h33.70666667c11.73333333 0 21.33333333-9.6 21.33333333-21.33333335v-33.70666665c0-11.73333333-9.6-21.33333333-21.33333333-21.33333334zM460.69333333 251.49666666h-33.70666666c-11.73333333 0-21.33333333 9.6-21.33333334 21.33333334v33.70666665c0 11.73333333 9.6 21.33333333 21.33333334 21.33333335h33.70666666c11.73333333 0 21.33333333-9.6 21.33333334-21.33333335v-33.70666665c0-11.73333333-9.6-21.33333333-21.33333334-21.33333334z"
8
+ ></path>
9
+ </svg>
@@ -6,6 +6,7 @@ export interface SvgIconProps {
6
6
  onClick?: (e?: any) => void;
7
7
  [key: string]: any;
8
8
  }
9
+ export declare const ComputerIcon: FC<SvgIconProps>;
9
10
  export declare const DeclarationIcon: FC<SvgIconProps>;
10
11
  export declare const ExpoIcon: FC<SvgIconProps>;
11
12
  export declare const HwcIcon: FC<SvgIconProps>;
@@ -9,6 +9,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
9
9
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
10
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
11
  import React, { memo } from 'react';
12
+ import { ReactComponent as Computer } from "./computer.svg";
12
13
  import { ReactComponent as Declaration } from "./declaration.svg";
13
14
  import { ReactComponent as Expo } from "./expo.svg";
14
15
  import { ReactComponent as Home } from "./home.svg";
@@ -34,6 +35,11 @@ var SvgIcon = /*#__PURE__*/memo(function (_ref) {
34
35
  }), children);
35
36
  });
36
37
 
38
+ // 电脑(默认图标)
39
+ export var ComputerIcon = /*#__PURE__*/memo(function (props) {
40
+ return /*#__PURE__*/React.createElement(SvgIcon, props, /*#__PURE__*/React.createElement(Computer, null));
41
+ });
42
+
37
43
  // 通关申报
38
44
  export var DeclarationIcon = /*#__PURE__*/memo(function (props) {
39
45
  return /*#__PURE__*/React.createElement(SvgIcon, props, /*#__PURE__*/React.createElement(Declaration, null));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yueglobal/ui",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "粤链全球 - react组件库",
5
5
  "license": "MIT",
6
6
  "module": "index.js",
@@ -88,9 +88,9 @@ var Index = function Index(_ref) {
88
88
 
89
89
  // 其他是模块内部路由跳转
90
90
  var isLast = (currentRoute === null || currentRoute === void 0 ? void 0 : currentRoute.path) === ((_items = items[items.length - 1]) === null || _items === void 0 ? void 0 : _items.path);
91
- var fullPath = newPaths.join('/');
92
- if (!fullPath.startsWith('/')) {
93
- fullPath = '/' + fullPath;
91
+ var currentPath = newPaths[newPaths.length - 1];
92
+ if (!currentPath.startsWith('/')) {
93
+ currentPath = '/' + currentPath;
94
94
  }
95
95
  return isLast ? /*#__PURE__*/React.createElement(Text, {
96
96
  ellipsis: {
@@ -99,7 +99,7 @@ var Index = function Index(_ref) {
99
99
  }, title) : /*#__PURE__*/React.createElement("a", {
100
100
  onClick: function onClick() {
101
101
  onRouteChange === null || onRouteChange === void 0 || onRouteChange({
102
- key: fullPath,
102
+ key: currentPath,
103
103
  label: title
104
104
  });
105
105
  }
@@ -24,7 +24,7 @@ var Index = function Index(_ref) {
24
24
  menuList = _useState4[0],
25
25
  setMenuList = _useState4[1];
26
26
  useEffect(function () {
27
- if (!(selectedKeys !== null && selectedKeys !== void 0 && selectedKeys.length) && !!(menuList !== null && menuList !== void 0 && menuList.length) && moduleData) {
27
+ if (!!(menuList !== null && menuList !== void 0 && menuList.length) && moduleData) {
28
28
  var key = moduleData.key;
29
29
  if (!key) {
30
30
  var _menuList$find;
@@ -36,7 +36,7 @@ var Index = function Index(_ref) {
36
36
  setSelectedKeys([key]);
37
37
  }
38
38
  }
39
- }, [selectedKeys, menuList, moduleData]);
39
+ }, [menuList, moduleData]);
40
40
 
41
41
  // 获取新闻资讯的类目
42
42
  var fetchNewsData = /*#__PURE__*/function () {
@@ -69,7 +69,6 @@ var Index = function Index(_ref) {
69
69
  return {
70
70
  key: "".concat(mainHost, "/consultation/content-list?classId=").concat(d.id, "&title=").concat(d.className),
71
71
  label: d.className
72
- // icon: <i className="yue-icon-dot" />,
73
72
  };
74
73
  }));
75
74
  case 8:
@@ -19,6 +19,7 @@ export interface YuePageHeaderProps {
19
19
  onLocaleChange?: (value: {
20
20
  locale: string;
21
21
  }) => void;
22
+ subMenuLayout?: 'vertical' | 'horizontal';
22
23
  }
23
24
  declare const _default: React.NamedExoticComponent<YuePageHeaderProps>;
24
25
  export default _default;
@@ -32,23 +32,28 @@ var Index = function Index(_ref) {
32
32
  var icon = pageIcon;
33
33
  var key;
34
34
  var firstMenuList = flattenMenuList(true);
35
- var _window$location = window.location,
36
- origin = _window$location.origin,
37
- pathname = _window$location.pathname;
38
- var url = origin + pathname;
39
- var current = firstMenuList.find(function (m) {
40
- return !!(m !== null && m !== void 0 && m.key) && url.startsWith("".concat(m.key));
41
- });
35
+ var current;
36
+ // 先判断activeLabel
37
+ if (activeLabel) {
38
+ current = firstMenuList.find(function (m) {
39
+ return (m === null || m === void 0 ? void 0 : m.label) === activeLabel;
40
+ });
41
+ }
42
+ // 再判断pageTitle
43
+ if (!current && pageTitle) {
44
+ current = firstMenuList.find(function (m) {
45
+ return (m === null || m === void 0 ? void 0 : m.label) === pageTitle;
46
+ });
47
+ }
48
+ // 最后从url匹配
42
49
  if (!current) {
43
- if (activeLabel) {
44
- current = firstMenuList.find(function (m) {
45
- return (m === null || m === void 0 ? void 0 : m.label) === activeLabel;
46
- });
47
- } else if (pageTitle) {
48
- current = firstMenuList.find(function (m) {
49
- return (m === null || m === void 0 ? void 0 : m.label) === pageTitle;
50
- });
51
- }
50
+ var _window$location = window.location,
51
+ origin = _window$location.origin,
52
+ pathname = _window$location.pathname;
53
+ var url = origin + pathname;
54
+ current = firstMenuList.find(function (m) {
55
+ return !!(m !== null && m !== void 0 && m.key) && url.startsWith("".concat(m.key));
56
+ });
52
57
  }
53
58
  if (current) {
54
59
  if (!title) {
@@ -4,8 +4,9 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
4
4
  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; }
5
5
  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; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import { ComputerIcon } from "../../components/svg-icon";
7
8
  import { ConfigProvider, Menu } from 'antd';
8
- import React, { memo, useEffect, useRef, useState } from 'react';
9
+ import React, { memo, useEffect, useMemo, useRef, useState } from 'react';
9
10
  import Breadcrumb from "../breadcrumb";
10
11
  import { flattenTreeList, setSubMenuPopupStyle } from "../helper";
11
12
  import "./index.less";
@@ -16,12 +17,21 @@ var Index = function Index(_ref) {
16
17
  menuItems = _ref.menuItems,
17
18
  pathname = _ref.pathname,
18
19
  moduleData = _ref.moduleData,
19
- onRouteChange = _ref.onRouteChange;
20
+ onRouteChange = _ref.onRouteChange,
21
+ subMenuLayout = _ref.subMenuLayout;
20
22
  var _useState = useState(),
21
23
  _useState2 = _slicedToArray(_useState, 2),
22
24
  selectedKeys = _useState2[0],
23
25
  setSelectedKeys = _useState2[1];
24
26
  var menuRef = useRef(null);
27
+
28
+ // 弹出层的布局,默认是 vertical
29
+ var popupLayout = useMemo(function () {
30
+ if (subMenuLayout === 'vertical' || subMenuLayout === 'horizontal') {
31
+ return subMenuLayout;
32
+ }
33
+ return 'vertical';
34
+ }, [subMenuLayout]);
25
35
  useEffect(function () {
26
36
  if (pathname) setSelectedKeys([pathname]);
27
37
  }, [pathname]);
@@ -86,9 +96,11 @@ var Index = function Index(_ref) {
86
96
  className: "yue-flex left"
87
97
  }, /*#__PURE__*/React.createElement("div", {
88
98
  className: "yue-flex module-info"
89
- }, !!moduleData.icon && /*#__PURE__*/React.createElement("span", {
99
+ }, !!moduleData.icon ? /*#__PURE__*/React.createElement("span", {
100
+ className: "module-icon"
101
+ }, moduleData.icon) : !!moduleData.title && /*#__PURE__*/React.createElement("span", {
90
102
  className: "module-icon"
91
- }, moduleData.icon), !!moduleData.title && /*#__PURE__*/React.createElement("div", {
103
+ }, /*#__PURE__*/React.createElement(ComputerIcon, null)), !!moduleData.title && /*#__PURE__*/React.createElement("div", {
92
104
  className: "module-title"
93
105
  }, moduleData.title)), /*#__PURE__*/React.createElement("div", {
94
106
  className: "menus"
@@ -96,11 +108,11 @@ var Index = function Index(_ref) {
96
108
  ref: menuRef,
97
109
  items: menuItems,
98
110
  mode: "horizontal",
99
- rootClassName: "yue-second-menu-bar",
111
+ rootClassName: ['yue-second-menu-bar', "yue-second-menu-".concat(popupLayout)].join(' '),
100
112
  onSelect: onMenuClick,
101
113
  selectedKeys: selectedKeys,
102
114
  onOpenChange: function onOpenChange(val) {
103
- if (!!(val !== null && val !== void 0 && val.length)) {
115
+ if (!!(val !== null && val !== void 0 && val.length) && popupLayout === 'horizontal') {
104
116
  onSubMenuOpen(val[0]);
105
117
  }
106
118
  }
@@ -1,160 +1,227 @@
1
- .yue-page-header-second-menu {
2
- height: 60px;
3
- background: linear-gradient(90deg, #17f1a1, #1a4bff);
4
- opacity: 1;
5
- transition: opacity 0.2s ease-in-out;
6
-
7
- &.hidden {
8
- //opacity: 0;
9
- }
10
-
11
- .wrapper {
12
- margin: 0 auto;
13
- justify-content: space-between;
14
- height: 100%;
15
- color: #fff;
16
- max-width: 98%;
17
- }
18
-
19
- .left {
20
- gap: 8px;
21
- height: 100%;
22
- }
23
-
24
- .module-info {
25
- gap: 14px;
26
- margin-right: 10px;
27
- flex-shrink: 0;
28
- }
29
-
30
- .module-icon {
31
- font-size: 27px;
32
- line-height: 0;
33
- }
34
-
35
- .module-title {
36
- font-size: 24px;
37
- font-weight: bold;
38
- min-width: 147px;
39
- max-width: 300px;
40
- white-space: nowrap;
41
- overflow: hidden;
42
- text-overflow: ellipsis;
43
- }
44
-
45
- .vr {
46
- width: 1px;
47
- height: 28px;
48
- background-color: rgba(255, 255, 255, 85%);
49
- flex-shrink: 0;
50
- }
51
-
52
- .menus {
53
- //max-width: 82%;
54
- height: 100%;
55
- padding-block: 1px;
56
- flex: 1 1 0;
57
- min-width: 0;
58
- padding-right: 30px;
59
- }
60
- }
61
-
62
- .yue-second-menu-bar {
63
- &.ant-menu-root {
64
- background-color: transparent;
65
- font-size: 18px;
66
- height: 100%;
67
- border-bottom: none;
68
- gap: 4px;
69
-
70
- & > li {
71
- display: flex;
72
- align-items: center;
73
- justify-content: center;
74
- }
75
-
76
- .ant-menu-submenu-title {
77
- height: 100%;
78
- display: flex;
79
- align-items: center;
80
- justify-content: center;
81
- }
82
-
83
- .ant-menu-title-content {
84
- height: 34px;
85
- line-height: 32px;
86
- border-radius: 16px;
87
- padding-inline: 16px;
88
- min-width: 80px;
89
- text-align: center;
90
- }
91
-
92
- .ant-menu-submenu-active,
93
- .ant-menu-item-active {
94
- .ant-menu-title-content {
95
- background-color: rgba(255, 255, 255, 20%);
96
- }
97
- }
98
-
99
- .ant-menu-submenu-selected,
100
- .ant-menu-item-selected {
101
- .ant-menu-title-content {
102
- background-color: #fff;
103
- }
104
- }
105
- }
106
-
107
- &.ant-menu-submenu-popup {
108
- left: 0 !important;
109
- padding: 0;
110
- font-size: 18px;
111
- //background-color: rgba(0, 0, 0, 45%);
112
- background-color: rgba(4, 41, 131, 0.65);
113
- border-radius: 0;
114
- width: 100%;
115
-
116
- .ant-menu-sub {
117
- display: flex;
118
- justify-content: center;
119
- background-color: transparent;
120
- border-radius: 0;
121
- box-shadow: none;
122
- }
123
-
124
- .ant-menu-item {
125
- width: max-content;
126
- flex: unset;
127
- color: #fff;
128
- margin: 0;
129
- border-radius: 0;
130
- height: 60px;
131
- line-height: 30px;
132
- display: flex;
133
- align-items: center;
134
- padding-inline: 25px 18px;
135
- flex-shrink: 0;
136
- position: relative;
137
-
138
- &::before {
139
- content: '';
140
- position: absolute;
141
- left: 10px;
142
- top: 50%;
143
- transform: translateY(-50%);
144
- width: 4px;
145
- height: 4px;
146
- border-radius: 50%;
147
- background-color: rgba(255, 255, 255, 85%);
148
- }
149
- }
150
-
151
- .ant-menu-item-active,
152
- .ant-menu-item-selected {
153
- background: linear-gradient(90deg, #17f1a1, #1a4bff);
154
- }
155
-
156
- /*.ant-menu-item-selected {
157
- background-color: rgba(0, 0, 0, 40%);
158
- }*/
159
- }
160
- }
1
+ .yue-page-header-second-menu {
2
+ height: 60px;
3
+ background: linear-gradient(90deg, #17f1a1, #1a4bff);
4
+ opacity: 1;
5
+ transition: opacity 0.2s ease-in-out;
6
+
7
+ &.hidden {
8
+ //opacity: 0;
9
+ }
10
+
11
+ .wrapper {
12
+ margin: 0 auto;
13
+ justify-content: space-between;
14
+ height: 100%;
15
+ color: #fff;
16
+ max-width: 98%;
17
+ }
18
+
19
+ .left {
20
+ gap: 8px;
21
+ height: 100%;
22
+ }
23
+
24
+ .module-info {
25
+ gap: 14px;
26
+ margin-right: 10px;
27
+ flex-shrink: 0;
28
+ }
29
+
30
+ .module-icon {
31
+ font-size: 27px;
32
+ line-height: 0;
33
+ }
34
+
35
+ .module-title {
36
+ font-size: 24px;
37
+ font-weight: bold;
38
+ min-width: 147px;
39
+ max-width: 300px;
40
+ white-space: nowrap;
41
+ overflow: hidden;
42
+ text-overflow: ellipsis;
43
+ }
44
+
45
+ .vr {
46
+ width: 1px;
47
+ height: 28px;
48
+ background-color: rgba(255, 255, 255, 85%);
49
+ flex-shrink: 0;
50
+ }
51
+
52
+ .menus {
53
+ //max-width: 82%;
54
+ height: 100%;
55
+ padding-block: 1px;
56
+ flex: 1 1 0;
57
+ min-width: 0;
58
+ padding-right: 30px;
59
+ }
60
+ }
61
+
62
+ .yue-second-menu-bar {
63
+ &.ant-menu-root {
64
+ background-color: transparent;
65
+ font-size: 18px;
66
+ height: 100%;
67
+ border-bottom: none;
68
+ gap: 4px;
69
+
70
+ & > li {
71
+ display: flex;
72
+ align-items: center;
73
+ justify-content: center;
74
+ }
75
+
76
+ .ant-menu-submenu-title {
77
+ height: 100%;
78
+ display: flex;
79
+ align-items: center;
80
+ justify-content: center;
81
+ }
82
+
83
+ .ant-menu-title-content {
84
+ height: 34px;
85
+ line-height: 32px;
86
+ border-radius: 16px;
87
+ padding-inline: 16px;
88
+ min-width: 80px;
89
+ text-align: center;
90
+ }
91
+
92
+ .ant-menu-submenu-active,
93
+ .ant-menu-item-active {
94
+ .ant-menu-title-content {
95
+ background-color: rgba(255, 255, 255, 20%);
96
+ }
97
+ }
98
+
99
+ .ant-menu-submenu-selected,
100
+ .ant-menu-item-selected {
101
+ .ant-menu-title-content {
102
+ background-color: #fff;
103
+ }
104
+ }
105
+ }
106
+
107
+ &.ant-menu-submenu-popup {
108
+ // 横向菜单的样式
109
+ &.yue-second-menu-horizontal {
110
+ left: 0 !important;
111
+ padding: 0;
112
+ font-size: 18px;
113
+ //background-color: rgba(0, 0, 0, 45%);
114
+ background-color: rgba(4, 41, 131, 0.65);
115
+ border-radius: 0;
116
+ width: 100%;
117
+
118
+ .ant-menu-sub {
119
+ display: flex;
120
+ justify-content: center;
121
+ background-color: transparent;
122
+ border-radius: 0;
123
+ box-shadow: none;
124
+ }
125
+
126
+ .ant-menu-item {
127
+ width: max-content;
128
+ flex: unset;
129
+ color: #fff;
130
+ margin: 0;
131
+ border-radius: 0;
132
+ height: 60px;
133
+ line-height: 30px;
134
+ display: flex;
135
+ align-items: center;
136
+ padding-inline: 25px 18px;
137
+ flex-shrink: 0;
138
+ position: relative;
139
+
140
+ &::before {
141
+ content: '';
142
+ position: absolute;
143
+ left: 10px;
144
+ top: 50%;
145
+ transform: translateY(-50%);
146
+ width: 4px;
147
+ height: 4px;
148
+ border-radius: 50%;
149
+ background-color: rgba(255, 255, 255, 85%);
150
+ }
151
+ }
152
+
153
+ .ant-menu-item-active,
154
+ .ant-menu-item-selected {
155
+ background: linear-gradient(90deg, #17f1a1, #1a4bff);
156
+ }
157
+ }
158
+
159
+ // 竖向菜单的样式
160
+ &.yue-second-menu-vertical {
161
+ font-size: 17px;
162
+
163
+ .ant-menu-sub {
164
+ background: linear-gradient(
165
+ 135deg,
166
+ rgb(50, 205, 150),
167
+ rgb(73, 108, 236)
168
+ );
169
+ margin: -7px 0 0;
170
+ }
171
+
172
+ .ant-menu-item {
173
+ color: #fff;
174
+ position: relative;
175
+ border-radius: 0;
176
+ padding-inline: 28px 22px;
177
+ margin: 0;
178
+ width: max-content;
179
+ height: 46px;
180
+ line-height: 46px;
181
+ margin-block: 1px;
182
+ overflow: unset;
183
+
184
+ &::before {
185
+ content: '';
186
+ position: absolute;
187
+ left: 14px;
188
+ top: 50%;
189
+ transform: translateY(-50%);
190
+ width: 4px;
191
+ height: 4px;
192
+ border-radius: 50%;
193
+ background-color: rgba(255, 255, 255, 85%);
194
+ }
195
+
196
+ &::after {
197
+ content: '';
198
+ position: absolute;
199
+ left: 50%;
200
+ bottom: -1px;
201
+ width: 80%;
202
+ transform: translateX(-50%);
203
+ height: 1px;
204
+ background-color: rgba(255, 255, 255, 0.25);
205
+ z-index: 1;
206
+ }
207
+
208
+ &:last-child::after {
209
+ content: none;
210
+ }
211
+ }
212
+
213
+ .ant-menu-item-active,
214
+ .ant-menu-item-selected {
215
+ background: linear-gradient(90deg, #06a168, #2a50dc);
216
+ }
217
+
218
+ .ant-menu-item-selected {
219
+ color: #00ffca;
220
+
221
+ &::before {
222
+ background-color: #00ffca;
223
+ }
224
+ }
225
+ }
226
+ }
227
+ }