@lingxiteam/assets 0.9.30 → 0.11.30-alpha-2
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/IconSvg/index.js +7 -13
- package/es/error/errorCatch/index.js +0 -0
- package/es/error/errorDisplay/Mobile/Drawer/Drawer.js +104 -0
- package/es/error/errorDisplay/Mobile/Drawer/Drawer.less +177 -0
- package/es/error/errorDisplay/Mobile/Drawer/index.js +132 -0
- package/es/error/errorDisplay/Mobile/ErrorMsg/index.js +199 -0
- package/es/error/errorDisplay/Mobile/Modal/Modal.js +43 -0
- package/es/error/errorDisplay/Mobile/Modal/Modal.less +146 -0
- package/es/error/errorDisplay/Mobile/Modal/index.js +119 -0
- package/es/error/errorDisplay/Mobile/defaultGlobalConfig.js +12 -0
- package/es/error/errorDisplay/SVGstring.js +6 -0
- package/es/error/errorDisplay/Web/Drawer/Drawer.js +232 -0
- package/es/error/errorDisplay/Web/Drawer/Drawer.less +354 -0
- package/es/error/errorDisplay/Web/Drawer/DrawerConnect.js +203 -0
- package/es/error/errorDisplay/Web/Drawer/index.js +124 -0
- package/es/error/errorDisplay/Web/ErrorMsg/index.js +241 -0
- package/es/error/errorDisplay/Web/Notification/Notice.js +151 -0
- package/es/error/errorDisplay/Web/Notification/Notification.js +129 -0
- package/es/error/errorDisplay/Web/Notification/Notification.less +134 -0
- package/es/error/errorDisplay/Web/Notification/index.js +84 -0
- package/es/error/errorDisplay/Web/defaultGlobalConfig.js +12 -0
- package/es/error/errorDisplay/animation.less +112 -0
- package/es/error/errorDisplay/compUtils.js +16 -0
- package/es/error/errorDisplay/const.js +44 -0
- package/es/error/errorDisplay/http.js +103 -0
- package/es/error/errorDisplay/variables.less +1 -0
- package/es/error/index.js +3 -0
- package/es/images/ico-back.png +0 -0
- package/es/index.d.ts +2 -1
- package/es/index.js +2 -1
- package/es/security/const.d.ts +14 -0
- package/es/security/const.js +16 -0
- package/es/security/encipher/aes.d.ts +2 -0
- package/es/security/encipher/aes.js +26 -0
- package/es/security/encipher/des.d.ts +2 -0
- package/es/security/encipher/des.js +25 -0
- package/es/security/encipher/rsa.d.ts +2 -0
- package/es/security/encipher/rsa.js +17 -0
- package/es/security/{sign.d.ts → encipher/sign.d.ts} +0 -0
- package/es/security/{sign.js → encipher/sign.js} +27 -50
- package/es/security/fetch.d.ts +6 -2
- package/es/security/fetch.js +193 -19
- package/es/security/httpEncryption.js +22 -17
- package/es/security/index.d.ts +11 -4
- package/es/security/index.js +5 -1
- package/es/utils/url.d.ts +1 -0
- package/es/utils/url.js +24 -0
- package/lib/index.js +13 -4
- package/package.json +4 -2
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
10
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
11
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
|
+
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."); }
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
16
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
|
+
import React, { forwardRef, isValidElement, useEffect, useState } from 'react';
|
|
18
|
+
import classnames from 'classnames';
|
|
19
|
+
import { CloseIcon, CloseWhiteIcon, ArrowIcon } from '../../SVGstring';
|
|
20
|
+
import { getSvgImageBase64 } from '../../../../utils/img';
|
|
21
|
+
import './Drawer.less';
|
|
22
|
+
var isDomEle = function isDomEle(target) {
|
|
23
|
+
return typeof target === 'string' || typeof target === 'number' || /*#__PURE__*/isValidElement(target);
|
|
24
|
+
};
|
|
25
|
+
var Drawer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
26
|
+
var title = props.title,
|
|
27
|
+
visible = props.visible,
|
|
28
|
+
content = props.content,
|
|
29
|
+
footer = props.footer,
|
|
30
|
+
onClose = props.onClose,
|
|
31
|
+
onVisibleChange = props.onVisibleChange,
|
|
32
|
+
_props$mask = props.mask,
|
|
33
|
+
mask = _props$mask === void 0 ? true : _props$mask,
|
|
34
|
+
_props$width = props.width,
|
|
35
|
+
width = _props$width === void 0 ? 630 : _props$width,
|
|
36
|
+
_props$offset = props.offset,
|
|
37
|
+
offset = _props$offset === void 0 ? 0 : _props$offset,
|
|
38
|
+
_props$status = props.status,
|
|
39
|
+
status = _props$status === void 0 ? 'default' : _props$status,
|
|
40
|
+
_props$mode = props.mode,
|
|
41
|
+
mode = _props$mode === void 0 ? 'default' : _props$mode,
|
|
42
|
+
_props$groupListProps = props.groupListProps,
|
|
43
|
+
groupListProps = _props$groupListProps === void 0 ? {
|
|
44
|
+
dataSource: []
|
|
45
|
+
} : _props$groupListProps,
|
|
46
|
+
_props$errorInfoProps = props.errorInfoProps,
|
|
47
|
+
errorInfoProps = _props$errorInfoProps === void 0 ? {
|
|
48
|
+
tabs: []
|
|
49
|
+
} : _props$errorInfoProps;
|
|
50
|
+
var _useState = useState([]),
|
|
51
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
52
|
+
extraConts = _useState2[0],
|
|
53
|
+
setExtraConts = _useState2[1]; // 展开内容的keys
|
|
54
|
+
var _useState3 = useState(true),
|
|
55
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
56
|
+
isFull = _useState4[0],
|
|
57
|
+
setIsFull = _useState4[1];
|
|
58
|
+
useEffect(function () {
|
|
59
|
+
if (onVisibleChange instanceof Function) {
|
|
60
|
+
onVisibleChange(visible);
|
|
61
|
+
}
|
|
62
|
+
}, [visible, onVisibleChange]);
|
|
63
|
+
var renderGroups = function renderGroups() {
|
|
64
|
+
var _ref = groupListProps || {},
|
|
65
|
+
renderRecord = _ref.renderRecord,
|
|
66
|
+
_ref$dataSource = _ref.dataSource,
|
|
67
|
+
dataSource = _ref$dataSource === void 0 ? [] : _ref$dataSource,
|
|
68
|
+
_ref$rowKey = _ref.rowKey,
|
|
69
|
+
rowKey = _ref$rowKey === void 0 ? 'key' : _ref$rowKey,
|
|
70
|
+
_ref$contentRowKey = _ref.contentRowKey,
|
|
71
|
+
contentRowKey = _ref$contentRowKey === void 0 ? 'key' : _ref$contentRowKey,
|
|
72
|
+
_ref$contentMaxLen = _ref.contentMaxLen,
|
|
73
|
+
contentMaxLen = _ref$contentMaxLen === void 0 ? 120 : _ref$contentMaxLen;
|
|
74
|
+
var renderList = function renderList(items) {
|
|
75
|
+
if (Array.isArray(items) && items.length > 0) {
|
|
76
|
+
var renderItemÇont = function renderItemÇont(cont, recordKey) {
|
|
77
|
+
if (typeof cont === 'string') {
|
|
78
|
+
if (cont.length <= contentMaxLen || !extraConts.includes(recordKey)) {
|
|
79
|
+
return cont.slice(0, contentMaxLen);
|
|
80
|
+
}
|
|
81
|
+
return cont;
|
|
82
|
+
}
|
|
83
|
+
return cont;
|
|
84
|
+
};
|
|
85
|
+
return items.map(function (item) {
|
|
86
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
87
|
+
className: "lx-drawer-group-article",
|
|
88
|
+
key: item[contentRowKey]
|
|
89
|
+
}, isDomEle(item === null || item === void 0 ? void 0 : item.title) ? /*#__PURE__*/React.createElement("div", {
|
|
90
|
+
className: "lx-drawer-group-article-title"
|
|
91
|
+
}, item === null || item === void 0 ? void 0 : item.title) : '', isDomEle(item === null || item === void 0 ? void 0 : item.author) ? /*#__PURE__*/React.createElement("div", {
|
|
92
|
+
className: "lx-drawer-group-article-author"
|
|
93
|
+
}, item === null || item === void 0 ? void 0 : item.author) : '', isDomEle(item === null || item === void 0 ? void 0 : item.content) ? /*#__PURE__*/React.createElement("div", {
|
|
94
|
+
className: "lx-drawer-group-article-content"
|
|
95
|
+
}, renderItemÇont(item === null || item === void 0 ? void 0 : item.content, item[contentRowKey]), typeof (item === null || item === void 0 ? void 0 : item.content) === 'string' && (item === null || item === void 0 ? void 0 : item.content.length) > contentMaxLen ? /*#__PURE__*/React.createElement("a", {
|
|
96
|
+
className: "lx-drawer-group-article-extra",
|
|
97
|
+
onClick: function onClick() {
|
|
98
|
+
setExtraConts(function (list) {
|
|
99
|
+
var cloneList = _toConsumableArray(list);
|
|
100
|
+
if (!item[contentRowKey]) {
|
|
101
|
+
return cloneList;
|
|
102
|
+
}
|
|
103
|
+
if (list.includes(item[contentRowKey])) {
|
|
104
|
+
return cloneList.filter(function (record) {
|
|
105
|
+
return record !== item[contentRowKey];
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
return [].concat(_toConsumableArray(cloneList), [item[contentRowKey]]);
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}, extraConts.includes(item[contentRowKey]) ? '收起' : '展开') : '') : '');
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
return '';
|
|
115
|
+
};
|
|
116
|
+
if (Array.isArray(dataSource) && dataSource.length > 0) {
|
|
117
|
+
return dataSource.map(function (item, index) {
|
|
118
|
+
return renderRecord instanceof Function ? renderRecord(item, index) : /*#__PURE__*/React.createElement("div", {
|
|
119
|
+
className: "lx-drawer-group-item",
|
|
120
|
+
key: item[rowKey]
|
|
121
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
122
|
+
className: "lx-drawer-group-item-head"
|
|
123
|
+
}, item === null || item === void 0 ? void 0 : item.title), /*#__PURE__*/React.createElement("div", {
|
|
124
|
+
className: "lx-drawer-group-item-body"
|
|
125
|
+
}, isDomEle(item === null || item === void 0 ? void 0 : item.content) ? item === null || item === void 0 ? void 0 : item.content : '', renderList(item === null || item === void 0 ? void 0 : item.content)));
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
return '';
|
|
129
|
+
};
|
|
130
|
+
var renderTabsList = function renderTabsList(tabsCont) {
|
|
131
|
+
var tabsRowRender = errorInfoProps.tabsRowRender,
|
|
132
|
+
_errorInfoProps$tabsR = errorInfoProps.tabsRowKey,
|
|
133
|
+
tabsRowKey = _errorInfoProps$tabsR === void 0 ? 'key' : _errorInfoProps$tabsR;
|
|
134
|
+
if (Array.isArray(tabsCont) && tabsCont.length > 0) {
|
|
135
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
136
|
+
className: "lx-drawer-err-list"
|
|
137
|
+
}, tabsCont.map(function (item) {
|
|
138
|
+
return tabsRowRender instanceof Function ? tabsRowRender(item) : /*#__PURE__*/React.createElement("div", {
|
|
139
|
+
key: item[tabsRowKey],
|
|
140
|
+
className: classnames('lx-drawer-err-item', item === null || item === void 0 ? void 0 : item.status)
|
|
141
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
142
|
+
className: "lx-drawer-err-item-head"
|
|
143
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
144
|
+
className: "lx-drawer-err-item-head-cell"
|
|
145
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
146
|
+
className: "lx-drawer-err-item-head-title"
|
|
147
|
+
}, item === null || item === void 0 ? void 0 : item.title, ' '), item === null || item === void 0 ? void 0 : item.code), isDomEle(item === null || item === void 0 ? void 0 : item.extra) ? /*#__PURE__*/React.createElement("div", {
|
|
148
|
+
className: "lx-drawer-err-item-head-extra"
|
|
149
|
+
}, ' ', item === null || item === void 0 ? void 0 : item.extra) : ''), /*#__PURE__*/React.createElement("div", {
|
|
150
|
+
className: "lx-drawer-err-item-body"
|
|
151
|
+
}, item === null || item === void 0 ? void 0 : item.content));
|
|
152
|
+
})));
|
|
153
|
+
}
|
|
154
|
+
return isDomEle(tabsCont) ? tabsCont : '';
|
|
155
|
+
};
|
|
156
|
+
var renderContent = function renderContent() {
|
|
157
|
+
if (!mode || mode === 'default') {
|
|
158
|
+
return isDomEle(content) ? content : '';
|
|
159
|
+
}
|
|
160
|
+
if (mode === 'errorInfo') {
|
|
161
|
+
var tabs = errorInfoProps.tabs,
|
|
162
|
+
tabsActiveKey = errorInfoProps.tabsActiveKey,
|
|
163
|
+
tabsContent = errorInfoProps.tabsContent,
|
|
164
|
+
tabsFooter = errorInfoProps.tabsFooter,
|
|
165
|
+
onTabsChange = errorInfoProps.onTabsChange;
|
|
166
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, isDomEle(content) ? /*#__PURE__*/React.createElement("div", {
|
|
167
|
+
className: "lx-drawer-code-desc"
|
|
168
|
+
}, content) : '', /*#__PURE__*/React.createElement("div", {
|
|
169
|
+
className: classnames('lx-drawer-code-tabs', isFull ? 'full' : '')
|
|
170
|
+
}, Array.isArray(tabs) && tabs.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
171
|
+
className: "lx-drawer-code-tabs-head"
|
|
172
|
+
}, isDomEle(content) ? /*#__PURE__*/React.createElement("div", {
|
|
173
|
+
className: "lx-drawer-code-tabs-control",
|
|
174
|
+
onClick: function onClick() {
|
|
175
|
+
setIsFull(!isFull);
|
|
176
|
+
}
|
|
177
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
178
|
+
src: getSvgImageBase64(ArrowIcon),
|
|
179
|
+
alt: "",
|
|
180
|
+
className: classnames('lx-drawer-code-tabs-control-icon', isFull ? '' : 'flip')
|
|
181
|
+
})) : '', tabs.map(function (item) {
|
|
182
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
183
|
+
className: classnames('lx-drawer-code-tabs-head-item', tabsActiveKey === item.key ? 'active' : ''),
|
|
184
|
+
key: item.key,
|
|
185
|
+
onClick: function onClick(ev) {
|
|
186
|
+
onTabsChange(_objectSpread(_objectSpread({}, item), {}, {
|
|
187
|
+
update: props === null || props === void 0 ? void 0 : props.onUpdate
|
|
188
|
+
}), ev);
|
|
189
|
+
}
|
|
190
|
+
}, item.tab);
|
|
191
|
+
})) : '', /*#__PURE__*/React.createElement("div", {
|
|
192
|
+
className: "lx-drawer-code-tabs-body"
|
|
193
|
+
}, renderTabsList(tabsContent), isDomEle(tabsFooter) ? tabsFooter : '')));
|
|
194
|
+
}
|
|
195
|
+
if (mode === 'groupList') {
|
|
196
|
+
return /*#__PURE__*/React.createElement("div", null, renderGroups());
|
|
197
|
+
}
|
|
198
|
+
return isDomEle(content) ? content : '';
|
|
199
|
+
};
|
|
200
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
201
|
+
className: classnames('lx-drawer', {
|
|
202
|
+
opening: visible,
|
|
203
|
+
closeing: !visible
|
|
204
|
+
}),
|
|
205
|
+
ref: ref
|
|
206
|
+
}, mask ? /*#__PURE__*/React.createElement("div", {
|
|
207
|
+
className: "lx-drawer-mask",
|
|
208
|
+
onClick: onClose
|
|
209
|
+
}) : '', /*#__PURE__*/React.createElement("div", {
|
|
210
|
+
className: classnames('lx-drawer-container', status),
|
|
211
|
+
style: {
|
|
212
|
+
width: "".concat(width, "px"),
|
|
213
|
+
transform: "translateX(-".concat(offset, "px)")
|
|
214
|
+
}
|
|
215
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
216
|
+
className: "lx-drawer-head"
|
|
217
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
218
|
+
className: "lx-drawer-head-title"
|
|
219
|
+
}, isDomEle(title) ? title : ''), /*#__PURE__*/React.createElement("div", {
|
|
220
|
+
className: "lx-drawer-head-extra",
|
|
221
|
+
onClick: onClose
|
|
222
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
223
|
+
src: getSvgImageBase64(status === 'default' ? CloseIcon : CloseWhiteIcon),
|
|
224
|
+
alt: "",
|
|
225
|
+
className: "lx-drawer-head-close"
|
|
226
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
227
|
+
className: "lx-drawer-body"
|
|
228
|
+
}, renderContent()), isDomEle(footer) ? /*#__PURE__*/React.createElement("div", {
|
|
229
|
+
className: "lx-drawer-footer"
|
|
230
|
+
}, footer) : ''));
|
|
231
|
+
});
|
|
232
|
+
export default Drawer;
|
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
@import url('../../animation.less');
|
|
2
|
+
|
|
3
|
+
.lx-drawer {
|
|
4
|
+
position: absolute;
|
|
5
|
+
left: 0;
|
|
6
|
+
top: 0;
|
|
7
|
+
width: 100%;
|
|
8
|
+
height: 100%;
|
|
9
|
+
z-index: 99999;
|
|
10
|
+
pointer-events: none;
|
|
11
|
+
overflow: hidden;
|
|
12
|
+
|
|
13
|
+
&.opening &-container {
|
|
14
|
+
animation: lxMoveOpen 0.3s;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&.closeing &-container {
|
|
18
|
+
animation: lxMoveClose 0.3s;
|
|
19
|
+
animation-fill-mode: forwards;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&.opening &-mask {
|
|
23
|
+
animation: lxFateIn 0.3s;
|
|
24
|
+
animation-fill-mode: forwards;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.opening &-mask {
|
|
28
|
+
animation: lxFateOut 0.3s;
|
|
29
|
+
animation-fill-mode: forwards;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&-mask {
|
|
33
|
+
position: absolute;
|
|
34
|
+
left: 0;
|
|
35
|
+
top: 0;
|
|
36
|
+
width: 100%;
|
|
37
|
+
height: 100%;
|
|
38
|
+
background: rgba(0, 0, 0, 0.45);
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
pointer-events: auto;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&-container {
|
|
44
|
+
position: absolute;
|
|
45
|
+
right: 0;
|
|
46
|
+
top: 0;
|
|
47
|
+
width: 800px;
|
|
48
|
+
height: 100%;
|
|
49
|
+
background-color: #fff;
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
pointer-events: auto;
|
|
54
|
+
transition: all 0.3s;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&-container.error &-head,
|
|
58
|
+
&-container.red &-head {
|
|
59
|
+
background-color: #fa7570;
|
|
60
|
+
border-color: #fa7570;
|
|
61
|
+
color: #fff;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&-container.error &-body {
|
|
65
|
+
padding: 0;
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
overflow: hidden;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&-container.error &-code-desc {
|
|
72
|
+
padding: 12px 20px;
|
|
73
|
+
overflow-y: auto;
|
|
74
|
+
flex: 1;
|
|
75
|
+
font-size: 12px;
|
|
76
|
+
color: rgba(28, 36, 46, 0.75);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&-container.purple &-head {
|
|
80
|
+
background-color: #9747ff;
|
|
81
|
+
border-color: #9747ff;
|
|
82
|
+
color: #fff;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&-container.blue &-head {
|
|
86
|
+
background-color: #47e;
|
|
87
|
+
border-color: #47e;
|
|
88
|
+
color: #fff;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&-head {
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
border-bottom: 1px solid #e7e8ea;
|
|
95
|
+
|
|
96
|
+
&-title {
|
|
97
|
+
flex: 1;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&-close {
|
|
101
|
+
width: 16px;
|
|
102
|
+
height: 16px;
|
|
103
|
+
display: flex;
|
|
104
|
+
vertical-align: middle;
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&-title + &-extra {
|
|
109
|
+
margin-left: 16px;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&-head,
|
|
114
|
+
&-body,
|
|
115
|
+
&-footer {
|
|
116
|
+
padding: 12px 20px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&-body {
|
|
120
|
+
color: rgba(28, 36, 46, 0.75);
|
|
121
|
+
flex: 1;
|
|
122
|
+
overflow-y: auto;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&-group {
|
|
126
|
+
&-item + &-item {
|
|
127
|
+
margin-top: 20px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
&-item-head {
|
|
131
|
+
padding: 10px 12px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&-item-body {
|
|
135
|
+
padding: 16px 12px;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&-item-head {
|
|
139
|
+
font-size: 16px;
|
|
140
|
+
font-weight: 500;
|
|
141
|
+
color: #1c242e;
|
|
142
|
+
background-color: #f9f9f9;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&-item-body {
|
|
146
|
+
font-size: 12px;
|
|
147
|
+
color: rgba(28, 36, 46, 0.55);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&-article + &-article {
|
|
151
|
+
margin-top: 20px;
|
|
152
|
+
padding-top: 20px;
|
|
153
|
+
border-top: 1px solid #f0f0f0;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&-article {
|
|
157
|
+
color: rgba(28, 36, 46, 0.75);
|
|
158
|
+
|
|
159
|
+
&-title {
|
|
160
|
+
font-size: 13px;
|
|
161
|
+
color: #1c242e;
|
|
162
|
+
font-weight: 500;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&-author {
|
|
166
|
+
font-size: 12px;
|
|
167
|
+
color: rgba(28, 36, 46, 0.25);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
&-content {
|
|
171
|
+
color: rgba(28, 36, 46, 0.55);
|
|
172
|
+
font-size: 12px;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&-author + &-content,
|
|
176
|
+
&-title + &-content {
|
|
177
|
+
margin-top: 8px;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
&-extra {
|
|
181
|
+
float: right;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// 内置文章样式
|
|
185
|
+
dt {
|
|
186
|
+
margin-bottom: 6px;
|
|
187
|
+
font-weight: 600;
|
|
188
|
+
}
|
|
189
|
+
li {
|
|
190
|
+
line-height: 30px;
|
|
191
|
+
}
|
|
192
|
+
section {
|
|
193
|
+
padding: 6px;
|
|
194
|
+
background-color: rgba(161, 161, 161, 0.15);
|
|
195
|
+
border-radius: 4px;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
&-code-tabs {
|
|
201
|
+
flex: 1;
|
|
202
|
+
|
|
203
|
+
&.full {
|
|
204
|
+
flex: 2;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
&-head {
|
|
208
|
+
position: relative;
|
|
209
|
+
background-color: #fafafa;
|
|
210
|
+
height: 40px;
|
|
211
|
+
padding: 0 20px;
|
|
212
|
+
display: flex;
|
|
213
|
+
align-items: center;
|
|
214
|
+
|
|
215
|
+
&-item {
|
|
216
|
+
position: relative;
|
|
217
|
+
color: rgba(28, 36, 46, 0.75);
|
|
218
|
+
height: 40px;
|
|
219
|
+
margin-right: 30px;
|
|
220
|
+
text-align: center;
|
|
221
|
+
line-height: 40px;
|
|
222
|
+
cursor: pointer;
|
|
223
|
+
|
|
224
|
+
&::before {
|
|
225
|
+
content: '';
|
|
226
|
+
position: absolute;
|
|
227
|
+
bottom: 0;
|
|
228
|
+
left: 50%;
|
|
229
|
+
transform: translateX(-50%);
|
|
230
|
+
width: 0;
|
|
231
|
+
height: 2px;
|
|
232
|
+
transition: all 0.3s;
|
|
233
|
+
background-color: #47e;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
&.active {
|
|
237
|
+
color: #47e;
|
|
238
|
+
|
|
239
|
+
&::before {
|
|
240
|
+
width: 100%;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
&-control {
|
|
247
|
+
position: absolute;
|
|
248
|
+
left: 50%;
|
|
249
|
+
top: -8px;
|
|
250
|
+
cursor: pointer;
|
|
251
|
+
transform: translateX(-50%);
|
|
252
|
+
width: 64px;
|
|
253
|
+
height: 16px;
|
|
254
|
+
line-height: 16px;
|
|
255
|
+
background: #e5e5e5;
|
|
256
|
+
border-radius: 6px 6px 6px 6px;
|
|
257
|
+
text-align: center;
|
|
258
|
+
z-index: 2;
|
|
259
|
+
|
|
260
|
+
&-icon {
|
|
261
|
+
width: 12px;
|
|
262
|
+
height: 12px;
|
|
263
|
+
color: rgba(28, 36, 46, 0.25);
|
|
264
|
+
display: inline-block;
|
|
265
|
+
vertical-align: middle;
|
|
266
|
+
|
|
267
|
+
&.flip {
|
|
268
|
+
transform: rotate(-180deg);
|
|
269
|
+
transition: all 0.3s;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
&-body {
|
|
275
|
+
padding: 16px 20px;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
&-err-item {
|
|
280
|
+
background: #fafafa;
|
|
281
|
+
padding: 8px 16px;
|
|
282
|
+
border-radius: 4px;
|
|
283
|
+
margin-bottom: 16px;
|
|
284
|
+
|
|
285
|
+
&-head {
|
|
286
|
+
display: flex;
|
|
287
|
+
align-items: center;
|
|
288
|
+
|
|
289
|
+
&-title {
|
|
290
|
+
margin-right: 8px;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
&-cell {
|
|
294
|
+
flex: 1;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
&-extra {
|
|
298
|
+
margin-left: 8px;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
&.red &-head {
|
|
303
|
+
&-title {
|
|
304
|
+
color: #fa7570;
|
|
305
|
+
|
|
306
|
+
a {
|
|
307
|
+
color: #fa7570;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
&.purple &-head {
|
|
313
|
+
&-title {
|
|
314
|
+
color: #9747ff;
|
|
315
|
+
|
|
316
|
+
a {
|
|
317
|
+
color: #9747ff;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
&.blue &-head {
|
|
323
|
+
&-title {
|
|
324
|
+
color: #47e;
|
|
325
|
+
|
|
326
|
+
a {
|
|
327
|
+
color: #47e;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
&-head + &-body {
|
|
333
|
+
margin-top: 4px;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
&-head {
|
|
337
|
+
color: rgba(28, 36, 46, 0.75);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
&-body {
|
|
341
|
+
color: rgba(28, 36, 46, 0.75);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
&-footer {
|
|
346
|
+
text-align: right;
|
|
347
|
+
border-top: 1px solid #e7e8ea;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
&-empty {
|
|
351
|
+
text-align: center;
|
|
352
|
+
color: rgba(28, 36, 46, 0.45);
|
|
353
|
+
}
|
|
354
|
+
}
|