tntd 1.3.50 → 1.3.54
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/components/Layout/Avatar.js +6 -3
- package/components/Layout/GlobalNavigation/NavigationPopup.js +6 -4
- package/components/Layout/GlobalNavigation/index.js +2 -1
- package/components/Layout/HeaderActions.js +1 -0
- package/components/Layout/README.md +2 -1
- package/components/Layout/createActions.js +10 -2
- package/components/Layout/index.js +10 -1
- package/components/Layout/utils.js +2 -2
- package/components/Page/Box.js +3 -3
- package/components/Page/README.md +17 -5
- package/components/Page/index.js +3 -3
- package/components/Page/index.less +31 -7
- package/components/QueryForm/index.js +12 -8
- package/components/QueryListScene/List.js +2 -1
- package/components/locale.js +60 -0
- package/lib/BlockHeader/README.md +83 -0
- package/lib/BlockHeader/fonts/OswaldLight.ttf +0 -0
- package/lib/BlockHeader/index.js +42 -0
- package/lib/BlockHeader/index.less +141 -0
- package/lib/Layout/Avatar.js +11 -3
- package/lib/Layout/GlobalNavigation/NavigationPopup.js +7 -4
- package/lib/Layout/GlobalNavigation/index.js +2 -1
- package/lib/Layout/README.md +2 -1
- package/lib/Layout/createActions.js +14 -1
- package/lib/Layout/index.js +19 -5
- package/lib/Layout/paaslayout/index.less +75 -0
- package/lib/Layout/utils.js +2 -2
- package/lib/Page/Box.js +4 -3
- package/lib/Page/README.md +17 -5
- package/lib/Page/demo.js +302 -0
- package/lib/Page/index.js +3 -3
- package/lib/Page/index.less +31 -7
- package/lib/QueryForm/index.js +14 -11
- package/lib/QueryListScene/Field/SelectInput.js +107 -0
- package/lib/QueryListScene/Field/fieldsMap.js +37 -0
- package/lib/QueryListScene/Field/index.js +75 -0
- package/lib/QueryListScene/Field/select.js +100 -0
- package/lib/QueryListScene/List.js +3 -1
- package/lib/QueryListScene/QueryForm/index.js +419 -0
- package/lib/QueryListScene/QueryForm/index.less +127 -0
- package/lib/locale.js +75 -0
- package/package.json +1 -1
- package/lib/Layout/EnterpriseLayout/Header.js +0 -113
- package/lib/Layout/EnterpriseLayout/HeaderActions.js +0 -104
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
.tntd-block-header {
|
|
2
|
+
@font-face {
|
|
3
|
+
font-family:'OswaldLight';
|
|
4
|
+
font-display: swap;
|
|
5
|
+
src:url('./fonts/OswaldLight.ttf');
|
|
6
|
+
}
|
|
7
|
+
& {
|
|
8
|
+
height: 32px;
|
|
9
|
+
line-height: 32px;
|
|
10
|
+
clear: both;
|
|
11
|
+
}
|
|
12
|
+
&.has-number{
|
|
13
|
+
.tntd-block-header-title {
|
|
14
|
+
h3 {
|
|
15
|
+
margin-left: 0;
|
|
16
|
+
}
|
|
17
|
+
&::before {
|
|
18
|
+
display: none;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
&.small {
|
|
22
|
+
.count {
|
|
23
|
+
font-size: 20px;
|
|
24
|
+
margin-right: 12px;
|
|
25
|
+
&::before {
|
|
26
|
+
width: 20px;
|
|
27
|
+
height: 15px;
|
|
28
|
+
top: 44%;
|
|
29
|
+
left: 60%;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
&.large {
|
|
34
|
+
.count {
|
|
35
|
+
font-size: 24px;
|
|
36
|
+
margin-right: 12px;
|
|
37
|
+
&::before {
|
|
38
|
+
width: 24px;
|
|
39
|
+
height: 15px;
|
|
40
|
+
left: 56%;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
.count {
|
|
45
|
+
position: relative;
|
|
46
|
+
top: -1px;
|
|
47
|
+
color: #0089ff;
|
|
48
|
+
font-size: 22px;
|
|
49
|
+
font-style: normal;
|
|
50
|
+
margin-right: 12px;
|
|
51
|
+
position: relative;
|
|
52
|
+
vertical-align: top;
|
|
53
|
+
font-weight: 500;
|
|
54
|
+
font-family: "OswaldLight" !important;
|
|
55
|
+
letter-spacing: 2px;
|
|
56
|
+
}
|
|
57
|
+
.count::before {
|
|
58
|
+
position: absolute;
|
|
59
|
+
display: block;
|
|
60
|
+
content: "";
|
|
61
|
+
width: 22px;
|
|
62
|
+
height: 15px;
|
|
63
|
+
border-top: 1px solid #0089ff;
|
|
64
|
+
background-color: #fff;
|
|
65
|
+
top: 47%;
|
|
66
|
+
left: 52%;
|
|
67
|
+
transform: rotate(-45deg);
|
|
68
|
+
-webkit-transform: rotate(-45deg);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
&.small {
|
|
72
|
+
& {
|
|
73
|
+
height: 28px;
|
|
74
|
+
line-height: 28px;
|
|
75
|
+
}
|
|
76
|
+
.tntd-block-header-title {
|
|
77
|
+
h3 {
|
|
78
|
+
font-size: 14px;
|
|
79
|
+
}
|
|
80
|
+
&::before {
|
|
81
|
+
height: 14px;
|
|
82
|
+
top: 7px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
&.large {
|
|
87
|
+
& {
|
|
88
|
+
height: 36px;
|
|
89
|
+
line-height: 36px;
|
|
90
|
+
}
|
|
91
|
+
.tntd-block-header-title {
|
|
92
|
+
h3 {
|
|
93
|
+
font-size: 18px;
|
|
94
|
+
}
|
|
95
|
+
&::before {
|
|
96
|
+
height: 18px;
|
|
97
|
+
top: 9px;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
.tntd-block-header-title {
|
|
102
|
+
& {
|
|
103
|
+
position: relative;
|
|
104
|
+
float: left;
|
|
105
|
+
}
|
|
106
|
+
h3 {
|
|
107
|
+
font-size: 16px;
|
|
108
|
+
color: #17233D;
|
|
109
|
+
font-weight: normal;
|
|
110
|
+
margin: 0;
|
|
111
|
+
margin-right: 10px;
|
|
112
|
+
margin-left: 10px;
|
|
113
|
+
display: inline-block;
|
|
114
|
+
}
|
|
115
|
+
span {
|
|
116
|
+
position: relative;
|
|
117
|
+
top: 1px;
|
|
118
|
+
font-size: 12px;
|
|
119
|
+
color:#8b919e;
|
|
120
|
+
margin-right: 10px;
|
|
121
|
+
line-height: 1;
|
|
122
|
+
}
|
|
123
|
+
&::before {
|
|
124
|
+
position: absolute;
|
|
125
|
+
left: 0;
|
|
126
|
+
top: 8px;
|
|
127
|
+
background-color: #126BFB;
|
|
128
|
+
content: "";
|
|
129
|
+
width: 3px;
|
|
130
|
+
height: 16px;
|
|
131
|
+
margin-right: 8px;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
.tntd-block-header-extra {
|
|
135
|
+
& {
|
|
136
|
+
position: relative;
|
|
137
|
+
float: right;
|
|
138
|
+
margin-left: 8px;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
package/lib/Layout/Avatar.js
CHANGED
|
@@ -15,6 +15,8 @@ require("antd/lib/button/style");
|
|
|
15
15
|
|
|
16
16
|
var _button = _interopRequireDefault(require("antd/lib/button"));
|
|
17
17
|
|
|
18
|
+
var _react = require("react");
|
|
19
|
+
|
|
18
20
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
19
21
|
|
|
20
22
|
var _deleteAllCookies = _interopRequireDefault(require("delete-all-cookies"));
|
|
@@ -23,6 +25,8 @@ var _lodash = require("lodash");
|
|
|
23
25
|
|
|
24
26
|
var _images = _interopRequireDefault(require("./images"));
|
|
25
27
|
|
|
28
|
+
var _ActionsContext = _interopRequireDefault(require("./ActionsContext"));
|
|
29
|
+
|
|
26
30
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
27
31
|
|
|
28
32
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -78,6 +82,10 @@ var UserInfoContent = function UserInfoContent(props) {
|
|
|
78
82
|
onPersonalSetting = _props$onPersonalSett === void 0 ? function () {
|
|
79
83
|
return true;
|
|
80
84
|
} : _props$onPersonalSett;
|
|
85
|
+
|
|
86
|
+
var _useContext = (0, _react.useContext)(_ActionsContext["default"]),
|
|
87
|
+
getText = _useContext.getText;
|
|
88
|
+
|
|
81
89
|
return React.createElement(UserInfoWrapper, {
|
|
82
90
|
className: "user-info-setting-wrap"
|
|
83
91
|
}, React.createElement("div", {
|
|
@@ -89,10 +97,10 @@ var UserInfoContent = function UserInfoContent(props) {
|
|
|
89
97
|
}, userInfo.account), React.createElement("a", {
|
|
90
98
|
onClick: onPersonalSetting,
|
|
91
99
|
href: "/bridge/userCenter?currentTab=1"
|
|
92
|
-
},
|
|
100
|
+
}, getText('personalSettings')), React.createElement("a", {
|
|
93
101
|
onClick: onChangePassword,
|
|
94
102
|
href: "/bridge/userCenter?currentTab=2"
|
|
95
|
-
},
|
|
103
|
+
}, getText('changePwd'))), React.createElement("div", {
|
|
96
104
|
className: "user-info-footer"
|
|
97
105
|
}, React.createElement(_button["default"], {
|
|
98
106
|
className: "user-info-footer-signout",
|
|
@@ -105,7 +113,7 @@ var UserInfoContent = function UserInfoContent(props) {
|
|
|
105
113
|
window.location.href = "/user/login?callbackUrl=".concat(window.encodeURI(location.href));
|
|
106
114
|
}
|
|
107
115
|
}
|
|
108
|
-
}, React.createElement("a", null,
|
|
116
|
+
}, React.createElement("a", null, getText('signOut')))));
|
|
109
117
|
};
|
|
110
118
|
|
|
111
119
|
var _default = function _default(props) {
|
|
@@ -17,6 +17,8 @@ var _utils = require("../utils");
|
|
|
17
17
|
|
|
18
18
|
var _Iconfont = _interopRequireDefault(require("../Iconfont"));
|
|
19
19
|
|
|
20
|
+
var _locale = require("../../locale");
|
|
21
|
+
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
23
|
|
|
22
24
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
|
|
@@ -177,6 +179,7 @@ var _default = function _default(_ref2) {
|
|
|
177
179
|
searchValue = _useState4[0],
|
|
178
180
|
setSearchValue = _useState4[1];
|
|
179
181
|
|
|
182
|
+
var language = actions == null ? void 0 : actions.getLanguage();
|
|
180
183
|
var isLevel3 = (0, _utils.hasLevel3)(menus);
|
|
181
184
|
|
|
182
185
|
var _useState5 = (0, _react.useState)(isLevel3 ? menus == null ? void 0 : menus[0] : null),
|
|
@@ -359,7 +362,7 @@ var _default = function _default(_ref2) {
|
|
|
359
362
|
}, React.createElement(_Iconfont["default"], {
|
|
360
363
|
type: "search"
|
|
361
364
|
}), React.createElement("input", {
|
|
362
|
-
placeholder:
|
|
365
|
+
placeholder: actions == null ? void 0 : actions.getText('menuSearch'),
|
|
363
366
|
value: searchValue,
|
|
364
367
|
onChange: onSearchChange,
|
|
365
368
|
onFocus: function onFocus() {
|
|
@@ -385,7 +388,7 @@ var _default = function _default(_ref2) {
|
|
|
385
388
|
onClick: function onClick() {
|
|
386
389
|
return onSelectAppTab(menu);
|
|
387
390
|
}
|
|
388
|
-
}, menu == null ? void 0 : menu
|
|
391
|
+
}, menu == null ? void 0 : menu[language === 'cn' ? 'groupName' : 'enName']);
|
|
389
392
|
})), React.createElement(GroupMenus, {
|
|
390
393
|
theme: theme,
|
|
391
394
|
isLevel3: isLevel3
|
|
@@ -393,7 +396,7 @@ var _default = function _default(_ref2) {
|
|
|
393
396
|
return React.createElement("div", null, groups == null ? void 0 : groups.map(function (group) {
|
|
394
397
|
return React.createElement(GroupMenuItem, {
|
|
395
398
|
theme: theme
|
|
396
|
-
}, React.createElement("h5", null, group
|
|
399
|
+
}, React.createElement("h5", null, group == null ? void 0 : group[language === 'cn' ? 'groupName' : 'enName']), React.createElement(MenuList, null, (group.children || []).map(function (menu) {
|
|
397
400
|
return React.createElement(MenuItem, {
|
|
398
401
|
key: menu.code,
|
|
399
402
|
className: (0, _classnames["default"])({
|
|
@@ -408,7 +411,7 @@ var _default = function _default(_ref2) {
|
|
|
408
411
|
onClick: function onClick(evt) {
|
|
409
412
|
return evt.preventDefault();
|
|
410
413
|
}
|
|
411
|
-
}, menu
|
|
414
|
+
}, menu == null ? void 0 : menu[language === 'cn' ? 'menuName' : 'enName']));
|
|
412
415
|
})));
|
|
413
416
|
}));
|
|
414
417
|
})));
|
|
@@ -100,6 +100,7 @@ var GlobalStyle = (0, _styledComponents.createGlobalStyle)(_templateObject2(), f
|
|
|
100
100
|
|
|
101
101
|
var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
102
102
|
var actions = (0, _react.useContext)(_ActionsContext["default"]);
|
|
103
|
+
var getText = actions.getText;
|
|
103
104
|
var headerRef = props.headerRef,
|
|
104
105
|
menus = props.menus;
|
|
105
106
|
|
|
@@ -156,7 +157,7 @@ var _default = (0, _styledComponents.withTheme)(function (props) {
|
|
|
156
157
|
})
|
|
157
158
|
}, React.createElement(_Iconfont["default"], {
|
|
158
159
|
type: "unordered-list"
|
|
159
|
-
}), React.createElement("span", null,
|
|
160
|
+
}), React.createElement("span", null, getText('globalNavigation')), React.createElement(GlobalStyle, {
|
|
160
161
|
hasLevel3: (0, _utils.hasLevel3)(menus)
|
|
161
162
|
}));
|
|
162
163
|
});
|
package/lib/Layout/README.md
CHANGED
|
@@ -7,11 +7,14 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _eventemitter = _interopRequireDefault(require("eventemitter3"));
|
|
9
9
|
|
|
10
|
+
var _locale = require("../locale");
|
|
11
|
+
|
|
10
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
13
|
|
|
12
|
-
var _default = function _default() {
|
|
14
|
+
var _default = function _default(params) {
|
|
13
15
|
var eventEmitter = new _eventemitter["default"]();
|
|
14
16
|
var data = {
|
|
17
|
+
language: (params == null ? void 0 : params.language) || 'cn',
|
|
15
18
|
selectedMenuKey: null
|
|
16
19
|
};
|
|
17
20
|
return {
|
|
@@ -24,6 +27,16 @@ var _default = function _default() {
|
|
|
24
27
|
getSelectedMenuKey: function getSelectedMenuKey() {
|
|
25
28
|
return data.selectedMenuKey;
|
|
26
29
|
},
|
|
30
|
+
getLanguage: function getLanguage() {
|
|
31
|
+
return data.language;
|
|
32
|
+
},
|
|
33
|
+
setLanguage: function setLanguage(language) {
|
|
34
|
+
return data.language = language;
|
|
35
|
+
},
|
|
36
|
+
getText: function getText(key) {
|
|
37
|
+
var language = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : data.language;
|
|
38
|
+
return (0, _locale.getText)(key, language);
|
|
39
|
+
},
|
|
27
40
|
on: function on(eventName, callback) {
|
|
28
41
|
eventEmitter.on(eventName, callback);
|
|
29
42
|
},
|
package/lib/Layout/index.js
CHANGED
|
@@ -43,6 +43,8 @@ var _ActionsContext = _interopRequireDefault(require("./ActionsContext"));
|
|
|
43
43
|
|
|
44
44
|
var _createActions = _interopRequireDefault(require("./createActions"));
|
|
45
45
|
|
|
46
|
+
var _storage = require("./storage");
|
|
47
|
+
|
|
46
48
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
47
49
|
|
|
48
50
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -103,7 +105,16 @@ var TNTLayout = function TNTLayout(_ref) {
|
|
|
103
105
|
_ref2$themeSwitch = _ref2.themeSwitch,
|
|
104
106
|
themeSwitch = _ref2$themeSwitch === void 0 ? true : _ref2$themeSwitch;
|
|
105
107
|
|
|
106
|
-
var userInfo = props.userInfo || {};
|
|
108
|
+
var userInfo = props.userInfo || {};
|
|
109
|
+
var actionsContextValue = (0, _createActions["default"])({
|
|
110
|
+
language: (0, _storage.getLanguageStore)() || userInfo.lang || 'cn'
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
var onLanguageChange = function onLanguageChange(language) {
|
|
114
|
+
actionsContextValue.setLanguage(language);
|
|
115
|
+
props == null ? void 0 : props.onLanguageChange(language);
|
|
116
|
+
}; // layout上的指定的属性优先级会高于extendMap中的属性
|
|
117
|
+
|
|
107
118
|
|
|
108
119
|
type = type || displayType;
|
|
109
120
|
config = Object.assign({
|
|
@@ -117,28 +128,31 @@ var TNTLayout = function TNTLayout(_ref) {
|
|
|
117
128
|
}, React.createElement(_AuthContext["default"].Provider, {
|
|
118
129
|
value: (0, _checkAuth["default"])(props.menus)
|
|
119
130
|
}, React.createElement(_ActionsContext["default"].Provider, {
|
|
120
|
-
value:
|
|
131
|
+
value: actionsContextValue
|
|
121
132
|
}, type === 'paas' && React.createElement(_paaslayout["default"], _extends({
|
|
122
133
|
menuAlignMode: menuAlignMode,
|
|
123
134
|
config: config
|
|
124
135
|
}, props, {
|
|
125
136
|
extraHeaderActions: extraHeaderActions,
|
|
126
137
|
isInIframe: isInIframe,
|
|
127
|
-
userInfo: userInfo
|
|
138
|
+
userInfo: userInfo,
|
|
139
|
+
onLanguageChange: onLanguageChange
|
|
128
140
|
})), type === 'enterprise' && React.createElement(_EnterpriseLayout["default"], _extends({
|
|
129
141
|
menuAlignMode: menuAlignMode,
|
|
130
142
|
config: config
|
|
131
143
|
}, props, {
|
|
132
144
|
extraHeaderActions: extraHeaderActions,
|
|
133
145
|
isInIframe: isInIframe,
|
|
134
|
-
userInfo: userInfo
|
|
146
|
+
userInfo: userInfo,
|
|
147
|
+
onLanguageChange: onLanguageChange
|
|
135
148
|
})), (!type || !['paas', 'enterprise'].includes(type)) && React.createElement(_Layout["default"], _extends({
|
|
136
149
|
menuAlignMode: menuAlignMode,
|
|
137
150
|
config: config
|
|
138
151
|
}, props, {
|
|
139
152
|
extraHeaderActions: extraHeaderActions,
|
|
140
153
|
isInIframe: isInIframe,
|
|
141
|
-
userInfo: userInfo
|
|
154
|
+
userInfo: userInfo,
|
|
155
|
+
onLanguageChange: onLanguageChange
|
|
142
156
|
})))));
|
|
143
157
|
};
|
|
144
158
|
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
.side-menu-section {
|
|
4
|
+
&:first-child {
|
|
5
|
+
h2 {
|
|
6
|
+
padding-top: 0;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
&.only-one-submenu {
|
|
10
|
+
margin-bottom: 0;
|
|
11
|
+
}
|
|
12
|
+
h2 {
|
|
13
|
+
font-size: 14px;
|
|
14
|
+
color: #17233D;
|
|
15
|
+
height: 40px;
|
|
16
|
+
line-height: 40px;
|
|
17
|
+
font-weight: normal;
|
|
18
|
+
padding-left: 17px;
|
|
19
|
+
margin: 0;
|
|
20
|
+
.tnt-icon {
|
|
21
|
+
margin-right: 7px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
.side-menu-list {
|
|
25
|
+
margin-bottom: 0;
|
|
26
|
+
.side-menu-item {
|
|
27
|
+
& {
|
|
28
|
+
position: relative;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
height: 30px;
|
|
31
|
+
line-height: 30px;
|
|
32
|
+
opacity: 0.8;
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
color: #17233D;
|
|
35
|
+
letter-spacing: 0;
|
|
36
|
+
}
|
|
37
|
+
a {
|
|
38
|
+
padding-left: 42px;
|
|
39
|
+
& {
|
|
40
|
+
color: #666;
|
|
41
|
+
text-decoration: none;
|
|
42
|
+
display: block;
|
|
43
|
+
transition: none;
|
|
44
|
+
height: 30px;
|
|
45
|
+
line-height: 30px;
|
|
46
|
+
}
|
|
47
|
+
&:hover {
|
|
48
|
+
color: #323232;
|
|
49
|
+
background: #f5f5f5;
|
|
50
|
+
}
|
|
51
|
+
i {
|
|
52
|
+
padding-left: 20px;
|
|
53
|
+
font-size: 20px;
|
|
54
|
+
margin-right: 15px;
|
|
55
|
+
vertical-align: sub;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
&.active {
|
|
59
|
+
&:before {
|
|
60
|
+
position: absolute;
|
|
61
|
+
content: "";
|
|
62
|
+
left: 0;
|
|
63
|
+
top: 0;
|
|
64
|
+
width: 3px;
|
|
65
|
+
height: 100%;
|
|
66
|
+
background: @primary-color;
|
|
67
|
+
}
|
|
68
|
+
a {
|
|
69
|
+
background: rgba(18,107,251,0.10);
|
|
70
|
+
color: @primary-color;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
package/lib/Layout/utils.js
CHANGED
|
@@ -121,8 +121,8 @@ var isNewTabMenu = function isNewTabMenu(menu) {
|
|
|
121
121
|
|
|
122
122
|
exports.isNewTabMenu = isNewTabMenu;
|
|
123
123
|
|
|
124
|
-
var openInNewTab = function openInNewTab(
|
|
125
|
-
window.open(
|
|
124
|
+
var openInNewTab = function openInNewTab(path) {
|
|
125
|
+
window.open(path, '_blank');
|
|
126
126
|
};
|
|
127
127
|
|
|
128
128
|
exports.openInNewTab = openInNewTab;
|
package/lib/Page/Box.js
CHANGED
|
@@ -29,7 +29,8 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
|
|
|
29
29
|
|
|
30
30
|
var Box = function Box(_ref) {
|
|
31
31
|
var inLayout = _ref.inLayout,
|
|
32
|
-
clsPrefix = _ref.clsPrefix,
|
|
32
|
+
_ref$clsPrefix = _ref.clsPrefix,
|
|
33
|
+
clsPrefix = _ref$clsPrefix === void 0 ? 'tnt-page' : _ref$clsPrefix,
|
|
33
34
|
children = _ref.children,
|
|
34
35
|
_ref$noPadding = _ref.noPadding,
|
|
35
36
|
noPadding = _ref$noPadding === void 0 ? false : _ref$noPadding,
|
|
@@ -73,8 +74,8 @@ var Box = function Box(_ref) {
|
|
|
73
74
|
className: "".concat(clsPrefix, "-box-card"),
|
|
74
75
|
bordered: bordered,
|
|
75
76
|
bodyStyle: _objectSpread({}, bodyStyle, {
|
|
76
|
-
overflow: 'auto',
|
|
77
|
-
height: inLayout ?
|
|
77
|
+
// overflow: 'auto',
|
|
78
|
+
height: inLayout ? "calc(100% - ".concat(headerHeight, ")") : cardBodyHeight
|
|
78
79
|
}),
|
|
79
80
|
size: size,
|
|
80
81
|
headStyle: headStyle
|
package/lib/Page/README.md
CHANGED
|
@@ -67,8 +67,8 @@ const Demo = (props) => {
|
|
|
67
67
|
<h3>第三种场景, 无标题栏</h3>
|
|
68
68
|
|
|
69
69
|
<Page height="400px">
|
|
70
|
-
<Box title='分组列表' extra={<Button type="primary" size=
|
|
71
|
-
<Box mode="white" title='菜单列表' extra={<Button type="primary" size=
|
|
70
|
+
<Box title='分组列表' extra={<Button type="primary" size='small'>添加</Button>}>第一列</Box>
|
|
71
|
+
<Box mode="white" title='菜单列表' extra={<Button type="primary" size='small'>添加</Button>}>第二列</Box>
|
|
72
72
|
<Box title="系统列表">第三列</Box>
|
|
73
73
|
<Box title="功能注册">第四列</Box>
|
|
74
74
|
</Page>
|
|
@@ -86,7 +86,13 @@ const Demo = (props) => {
|
|
|
86
86
|
// extra={right}
|
|
87
87
|
inLayout
|
|
88
88
|
>
|
|
89
|
-
<Box
|
|
89
|
+
<Box
|
|
90
|
+
title="系统列表"
|
|
91
|
+
width={320}
|
|
92
|
+
mode='white'
|
|
93
|
+
>
|
|
94
|
+
第三列
|
|
95
|
+
</Box>
|
|
90
96
|
<Box title="功能注册">
|
|
91
97
|
第四列<br/>
|
|
92
98
|
第四列<br/>
|
|
@@ -114,7 +120,14 @@ const Demo = (props) => {
|
|
|
114
120
|
第四列<br/>
|
|
115
121
|
第四列<br/>
|
|
116
122
|
第四列<br/>
|
|
117
|
-
|
|
123
|
+
第四列end
|
|
124
|
+
</Box>
|
|
125
|
+
<Box
|
|
126
|
+
title="系统列表"
|
|
127
|
+
width={200}
|
|
128
|
+
mode='white'
|
|
129
|
+
>
|
|
130
|
+
第三列
|
|
118
131
|
</Box>
|
|
119
132
|
</Page>
|
|
120
133
|
</Layout>
|
|
@@ -154,7 +167,6 @@ ReactDOM.render(<Demo />, document.getElementById('root'))
|
|
|
154
167
|
|
|
155
168
|
|
|
156
169
|
|
|
157
|
-
|
|
158
170
|
#### Page.Box
|
|
159
171
|
|
|
160
172
|
描述:Page.Box包裹了antd库中的Card组件,Box属性都会透传到Card组件。
|