@antv/dumi-theme-antv 0.3.0-beta.1 → 0.3.0-beta.11
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/builtins/Playground/index.d.ts +2 -5
- package/dist/builtins/Playground/index.js +25 -6
- package/dist/context.d.ts +2 -1
- package/dist/layouts/DocLayout.js +25 -16
- package/dist/layouts/entry/Index.js +10 -2
- package/dist/layouts/entry/Manual.js +3 -1
- package/dist/pages/404.js +5 -1
- package/dist/pages/Example/index.js +28 -52
- package/dist/pages/Example/index.module.less +50 -8
- package/dist/pages/Example/utils.d.ts +1 -0
- package/dist/pages/Example/utils.js +9 -0
- package/dist/pages/Examples/components/GalleryPageContent/DemoCard/index.js +8 -5
- package/dist/pages/Examples/index.js +22 -2
- package/dist/pages/Examples/index.module.less +2 -0
- package/dist/pages/Examples/types.d.ts +7 -6
- package/dist/plugin/examples.d.ts +16 -2
- package/dist/plugin/examples.js +32 -10
- package/dist/plugin/index.js +31 -20
- package/dist/plugin/utils.d.ts +5 -0
- package/dist/plugin/utils.js +46 -0
- package/dist/slots/Cases/index.d.ts +1 -0
- package/dist/slots/Cases/index.js +1 -1
- package/dist/slots/Cases/index.module.less +2 -1
- package/dist/slots/CodeEditor/Toolbar.js +4 -16
- package/dist/slots/CodeEditor/index.d.ts +4 -0
- package/dist/slots/CodeEditor/index.js +48 -16
- package/dist/slots/CodeEditor/utils.js +2 -2
- package/dist/slots/CodePreview/CodeHeader.js +15 -14
- package/dist/slots/CodePreview/index.d.ts +8 -0
- package/dist/slots/CodePreview/index.js +6 -4
- package/dist/slots/CodePreview/index.module.less +17 -7
- package/dist/slots/CodeRunner/index.d.ts +5 -2
- package/dist/slots/CodeRunner/index.js +18 -4
- package/dist/slots/CodeRunner/utils.d.ts +3 -2
- package/dist/slots/CodeRunner/utils.js +1 -1
- package/dist/slots/Detail/News.d.ts +1 -0
- package/dist/slots/Detail/index.d.ts +1 -0
- package/dist/slots/Detail/index.js +1 -1
- package/dist/slots/ExampleSider/index.d.ts +4 -38
- package/dist/slots/ExampleSider/index.js +22 -44
- package/dist/slots/ExampleSider/index.module.less +1 -1
- package/dist/slots/Features/FeatureCard.d.ts +1 -0
- package/dist/slots/Features/index.js +2 -1
- package/dist/slots/Footer/index.js +3 -2
- package/dist/slots/Header/Navs.d.ts +10 -1
- package/dist/slots/Header/Navs.js +36 -19
- package/dist/slots/Header/index.js +8 -7
- package/dist/slots/Loading/index.d.ts +6 -1
- package/dist/slots/Loading/index.js +24 -10
- package/dist/slots/Loading/index.module.less +276 -9
- package/dist/slots/ManualContent/index.js +138 -113
- package/dist/slots/ManualContent/index.module.less +40 -33
- package/dist/slots/ManualContent/utils.d.ts +18 -0
- package/dist/slots/ManualContent/utils.js +64 -0
- package/dist/slots/SEO.d.ts +10 -0
- package/dist/slots/SEO.js +59 -0
- package/dist/slots/{TOC.d.ts → TOC/index.d.ts} +1 -0
- package/dist/slots/{TOC.js → TOC/index.js} +1 -0
- package/dist/slots/TOC/index.module.less +11 -0
- package/dist/slots/hooks.d.ts +3 -3
- package/dist/slots/utils.d.ts +4 -19
- package/dist/slots/utils.js +77 -119
- package/dist/types.d.ts +83 -0
- package/dist/typings.d.ts +0 -113
- package/package.json +7 -4
- package/dist/slots/Loading.d.ts +0 -5
- package/dist/slots/Loading.js +0 -8
|
@@ -1,52 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
source: string;
|
|
4
|
-
examples: PlayGroundItemProps[];
|
|
5
|
-
babeledSource: string;
|
|
6
|
-
absolutePath?: string;
|
|
7
|
-
relativePath?: string;
|
|
8
|
-
screenshot?: string;
|
|
9
|
-
recommended?: boolean;
|
|
10
|
-
filename: string;
|
|
11
|
-
title?: string;
|
|
12
|
-
location?: Location;
|
|
13
|
-
playground?: {
|
|
14
|
-
container?: string;
|
|
15
|
-
playgroundDidMount?: string;
|
|
16
|
-
playgroundWillUnmount?: string;
|
|
17
|
-
dependencies?: {
|
|
18
|
-
[key: string]: string;
|
|
19
|
-
};
|
|
20
|
-
devDependencies?: {
|
|
21
|
-
[key: string]: string;
|
|
22
|
-
};
|
|
23
|
-
htmlCodeTemplate?: string;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export interface TreeItem {
|
|
27
|
-
title?: string;
|
|
28
|
-
value?: string;
|
|
29
|
-
key?: string;
|
|
30
|
-
children?: any;
|
|
31
|
-
icon?: string;
|
|
32
|
-
relativePath?: string;
|
|
33
|
-
filename?: string;
|
|
34
|
-
screenshot?: string;
|
|
35
|
-
node?: any;
|
|
36
|
-
}
|
|
2
|
+
import { Demo, ExampleTopic } from '../../types';
|
|
37
3
|
export interface ExampleSiderProps {
|
|
38
4
|
/**
|
|
39
5
|
* 当前 Example (受控)
|
|
40
6
|
*/
|
|
41
|
-
currentDemo:
|
|
7
|
+
currentDemo: Demo;
|
|
42
8
|
/**
|
|
43
9
|
* 当选中的 Demo 被改变时做些什么
|
|
44
10
|
*/
|
|
45
|
-
onDemoClicked: (demo:
|
|
11
|
+
onDemoClicked: (demo: Demo) => void;
|
|
46
12
|
/**
|
|
47
13
|
* 所有的案例主题
|
|
48
14
|
*/
|
|
49
|
-
exampleTopics:
|
|
15
|
+
exampleTopics: ExampleTopic[];
|
|
50
16
|
showExampleDemoTitle: boolean;
|
|
51
17
|
}
|
|
52
18
|
/**
|
|
@@ -4,14 +4,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
|
|
5
5
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
|
|
7
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
8
|
-
|
|
9
|
-
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."); }
|
|
10
|
-
|
|
11
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
12
|
-
|
|
13
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
14
|
-
|
|
15
7
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
16
8
|
|
|
17
9
|
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."); }
|
|
@@ -24,15 +16,15 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
24
16
|
|
|
25
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
26
18
|
|
|
27
|
-
import { Input, Menu, Tooltip } from 'antd';
|
|
28
19
|
import React, { useEffect, useRef, useState } from 'react';
|
|
20
|
+
import { Input, Menu, Tooltip } from 'antd';
|
|
29
21
|
import { useLocale } from 'dumi';
|
|
30
22
|
import { createFromIconfontCN, SearchOutlined, VerticalAlignTopOutlined } from '@ant-design/icons';
|
|
31
23
|
import classNames from 'classnames';
|
|
32
|
-
import { reduce, size } from 'lodash-es';
|
|
33
24
|
import { useT } from "../hooks";
|
|
34
|
-
import
|
|
35
|
-
// menu icon
|
|
25
|
+
import { filterTreeNode } from "../utils";
|
|
26
|
+
import styles from "./index.module.less"; // menu icon
|
|
27
|
+
|
|
36
28
|
var MenuIcon = createFromIconfontCN({
|
|
37
29
|
scriptUrl: '//at.alicdn.com/t/font_470089_1lnym745udm.js' // generated by iconfont.cn
|
|
38
30
|
|
|
@@ -64,37 +56,23 @@ export var ExampleSider = function ExampleSider(props) {
|
|
|
64
56
|
searchValue = _useState6[0],
|
|
65
57
|
setSearchValue = _useState6[1];
|
|
66
58
|
|
|
67
|
-
var locale = useLocale();
|
|
68
|
-
|
|
69
|
-
var
|
|
70
|
-
|
|
71
|
-
var
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
return value;
|
|
85
|
-
}, []);
|
|
86
|
-
}; // 获取默认展开的keys数组 传入treeData 和 底层的 key 返回符合条件的 keys
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
var getDefaultOpenKeys = function getDefaultOpenKeys(data, key) {
|
|
90
|
-
return reduce(data, function (value, item) {
|
|
91
|
-
if (item.children) {
|
|
92
|
-
var keys = getDefaultOpenKeys(item.children, key);
|
|
93
|
-
return keys.length ? [].concat(_toConsumableArray(value), [item.value], _toConsumableArray(keys)) : value;
|
|
94
|
-
}
|
|
59
|
+
var locale = useLocale();
|
|
60
|
+
|
|
61
|
+
var getCurrentTopics = function getCurrentTopics() {
|
|
62
|
+
if (searchValue) {
|
|
63
|
+
var res = filterTreeNode({
|
|
64
|
+
id: 'FAKE_ID',
|
|
65
|
+
childrenKey: 'exampleTopics',
|
|
66
|
+
title: {
|
|
67
|
+
'zh': 'FAKE_TITLE',
|
|
68
|
+
'en': 'FAKE_TITLE'
|
|
69
|
+
},
|
|
70
|
+
exampleTopics: exampleTopics
|
|
71
|
+
}, searchValue, locale.id);
|
|
72
|
+
return (res === null || res === void 0 ? void 0 : res.exampleTopics) || [];
|
|
73
|
+
}
|
|
95
74
|
|
|
96
|
-
|
|
97
|
-
}, []);
|
|
75
|
+
return exampleTopics;
|
|
98
76
|
}; // 初始化菜单栏展开keys
|
|
99
77
|
|
|
100
78
|
|
|
@@ -142,7 +120,7 @@ export var ExampleSider = function ExampleSider(props) {
|
|
|
142
120
|
};
|
|
143
121
|
|
|
144
122
|
var renderSubMenu = function renderSubMenu() {
|
|
145
|
-
return
|
|
123
|
+
return getCurrentTopics().map(function (topic) {
|
|
146
124
|
return /*#__PURE__*/React.createElement(Menu.SubMenu, {
|
|
147
125
|
key: "TOPIC-".concat(topic.id),
|
|
148
126
|
title: /*#__PURE__*/React.createElement("div", null, topic.icon && /*#__PURE__*/React.createElement(MenuIcon, {
|
|
@@ -208,7 +186,7 @@ export var ExampleSider = function ExampleSider(props) {
|
|
|
208
186
|
style: {
|
|
209
187
|
width: '100%'
|
|
210
188
|
},
|
|
211
|
-
className: styles.
|
|
189
|
+
className: styles.sideBarMenu,
|
|
212
190
|
openKeys: openKeys,
|
|
213
191
|
selectedKeys: ["DEMO-".concat(currentDemo.id)],
|
|
214
192
|
onOpenChange: function onOpenChange(keys) {
|
|
@@ -3,6 +3,7 @@ import { Row, Col } from 'antd';
|
|
|
3
3
|
import cx from 'classnames';
|
|
4
4
|
import FeatureCard from "./FeatureCard";
|
|
5
5
|
import styles from "./index.module.less";
|
|
6
|
+
import { ic } from "../hooks";
|
|
6
7
|
export var Features = function Features(_ref) {
|
|
7
8
|
var title = _ref.title,
|
|
8
9
|
_ref$features = _ref.features,
|
|
@@ -15,7 +16,7 @@ export var Features = function Features(_ref) {
|
|
|
15
16
|
var children = features.map(function (card) {
|
|
16
17
|
return /*#__PURE__*/React.createElement(Col, {
|
|
17
18
|
className: styles.cardWrapper,
|
|
18
|
-
key: card.title,
|
|
19
|
+
key: ic(card.title),
|
|
19
20
|
md: 8,
|
|
20
21
|
xs: 24
|
|
21
22
|
}, /*#__PURE__*/React.createElement(FeatureCard, card));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["columns", "bottom", "theme", "language", "isDynamicFooter", "rootDomain"];
|
|
1
|
+
var _excluded = ["columns", "bottom", "theme", "language", "isDynamicFooter", "rootDomain", "className"];
|
|
2
2
|
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
|
|
@@ -31,6 +31,7 @@ export var Footer = function Footer(props) {
|
|
|
31
31
|
isDynamicFooter = props.isDynamicFooter,
|
|
32
32
|
_props$rootDomain = props.rootDomain,
|
|
33
33
|
rootDomain = _props$rootDomain === void 0 ? '' : _props$rootDomain,
|
|
34
|
+
className = props.className,
|
|
34
35
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
35
36
|
|
|
36
37
|
var locale = useLocale();
|
|
@@ -163,7 +164,7 @@ export var Footer = function Footer(props) {
|
|
|
163
164
|
maxColumnsPerRow: 5,
|
|
164
165
|
theme: theme,
|
|
165
166
|
columns: columns || getColumns(),
|
|
166
|
-
className: classnames(styles.footer, _defineProperty({}, styles.withMenu, isDynamicFooter)),
|
|
167
|
+
className: classnames(styles.footer, className, _defineProperty({}, styles.withMenu, isDynamicFooter)),
|
|
167
168
|
bottom: bottom || /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
168
169
|
className: styles.bottom
|
|
169
170
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("a", {
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
declare type dropdownItem = {
|
|
3
|
+
name: {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
};
|
|
6
|
+
url: string;
|
|
7
|
+
};
|
|
2
8
|
export declare type INav = {
|
|
3
|
-
slug
|
|
9
|
+
slug?: string;
|
|
4
10
|
order: number;
|
|
5
11
|
title: {
|
|
6
12
|
[key: string]: string;
|
|
7
13
|
};
|
|
8
14
|
target?: '_blank';
|
|
15
|
+
notPage?: boolean;
|
|
16
|
+
dropdownItems?: dropdownItem[];
|
|
9
17
|
};
|
|
10
18
|
export declare type NavProps = {
|
|
11
19
|
navs: INav[];
|
|
@@ -15,3 +23,4 @@ export declare type NavProps = {
|
|
|
15
23
|
* Header 中的导航菜单
|
|
16
24
|
*/
|
|
17
25
|
export declare const Navs: React.FC<NavProps>;
|
|
26
|
+
export {};
|
|
@@ -2,43 +2,60 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import cx from 'classnames';
|
|
5
|
-
import { isEqual } from 'lodash-es';
|
|
6
|
-
import { LinkOutlined } from '@ant-design/icons';
|
|
5
|
+
import { isEqual, size } from 'lodash-es';
|
|
7
6
|
import { Link, useLocale } from 'dumi';
|
|
7
|
+
import { Dropdown, Menu } from 'antd';
|
|
8
|
+
import { DownOutlined, LinkOutlined } from '@ant-design/icons';
|
|
8
9
|
import styles from "./index.module.less";
|
|
9
10
|
|
|
10
|
-
var getDocument = function getDocument(navs) {
|
|
11
|
-
var slug = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
12
|
-
return navs.find(function (doc) {
|
|
13
|
-
return doc.slug === slug;
|
|
14
|
-
}) || {
|
|
15
|
-
title: {}
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
11
|
/**
|
|
19
12
|
* Header 中的导航菜单
|
|
20
13
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
14
|
export var Navs = function Navs(_ref) {
|
|
24
15
|
var navs = _ref.navs,
|
|
25
16
|
path = _ref.path;
|
|
26
17
|
var locale = useLocale();
|
|
27
18
|
return /*#__PURE__*/React.createElement(React.Fragment, null, navs.map(function (nav) {
|
|
28
|
-
var
|
|
29
|
-
var
|
|
19
|
+
var title = nav.title[locale.id];
|
|
20
|
+
var href = '';
|
|
21
|
+
var className = '';
|
|
22
|
+
|
|
23
|
+
if (nav.slug) {
|
|
24
|
+
href = nav.slug.startsWith('http') ? nav.slug : "/".concat(nav.slug);
|
|
25
|
+
|
|
26
|
+
if (locale.id == 'en' && !href.startsWith('http')) {
|
|
27
|
+
href = "/en".concat(href);
|
|
28
|
+
} // 去除 docs 防止二次点击相同nav跳转出现04
|
|
30
29
|
|
|
31
|
-
|
|
32
|
-
href =
|
|
30
|
+
|
|
31
|
+
href = href.replace('/docs/', '/');
|
|
32
|
+
className = cx('header-menu-item-active', _defineProperty({}, styles.activeItem, path.startsWith(href) || isEqual(path.split('/').slice(0, 4), href.split('/').slice(0, 4))));
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
return size(nav.dropdownItems) ? /*#__PURE__*/React.createElement("li", {
|
|
36
|
+
key: title,
|
|
37
|
+
className: className
|
|
38
|
+
}, /*#__PURE__*/React.createElement(Dropdown, {
|
|
39
|
+
className: styles.ecoSystems,
|
|
40
|
+
placement: "bottom",
|
|
41
|
+
overlay: /*#__PURE__*/React.createElement(Menu, null, nav.dropdownItems.map(function (_ref2) {
|
|
42
|
+
var name = _ref2.name,
|
|
43
|
+
url = _ref2.url;
|
|
44
|
+
return /*#__PURE__*/React.createElement(Menu.Item, {
|
|
45
|
+
key: url
|
|
46
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
47
|
+
target: "_blank",
|
|
48
|
+
rel: "noreferrer",
|
|
49
|
+
href: url
|
|
50
|
+
}, name[locale.id], " ", /*#__PURE__*/React.createElement(LinkOutlined, null)));
|
|
51
|
+
}))
|
|
52
|
+
}, /*#__PURE__*/React.createElement("span", null, title, /*#__PURE__*/React.createElement(DownOutlined, null)))) : /*#__PURE__*/React.createElement("li", {
|
|
37
53
|
key: title,
|
|
38
54
|
className: className
|
|
39
55
|
}, nav.target === '_blank' || href.startsWith('http') ? /*#__PURE__*/React.createElement("a", {
|
|
40
56
|
href: href,
|
|
41
|
-
target: "_blank"
|
|
57
|
+
target: "_blank",
|
|
58
|
+
rel: "noreferrer"
|
|
42
59
|
}, title, /*#__PURE__*/React.createElement(LinkOutlined, null)) : /*#__PURE__*/React.createElement(Link, {
|
|
43
60
|
to: href
|
|
44
61
|
}, title));
|
|
@@ -22,7 +22,7 @@ import { useMedia } from 'react-use';
|
|
|
22
22
|
import { useNavigate } from "react-router-dom";
|
|
23
23
|
import cx from 'classnames';
|
|
24
24
|
import { useSiteData, useLocale } from 'dumi';
|
|
25
|
-
import { GithubOutlined, MenuOutlined, CaretDownFilled, DownOutlined, WechatOutlined,
|
|
25
|
+
import { GithubOutlined, MenuOutlined, CaretDownFilled, DownOutlined, WechatOutlined, LinkOutlined, CheckOutlined } from '@ant-design/icons';
|
|
26
26
|
import { Popover, Menu, Dropdown, Select } from 'antd';
|
|
27
27
|
import { map, size } from 'lodash-es';
|
|
28
28
|
import { Search } from "./Search";
|
|
@@ -173,12 +173,12 @@ var HeaderComponent = function HeaderComponent(_ref) {
|
|
|
173
173
|
className: cx(styles.menu, (_cx = {}, _defineProperty(_cx, styles.popup, !isWide), _defineProperty(_cx, styles.popupHidden, !popupMenuVisible), _cx))
|
|
174
174
|
},
|
|
175
175
|
/** 最左侧的菜单,一般是 教程、API、示例,或者其他自定义,有配置文件中的 `navs` 决定 */
|
|
176
|
-
size(navs)
|
|
176
|
+
size(navs) ? /*#__PURE__*/React.createElement(Navs, {
|
|
177
177
|
navs: navs,
|
|
178
178
|
path: window.location.pathname
|
|
179
|
-
}),
|
|
179
|
+
}) : null,
|
|
180
180
|
/** 生态产品 */
|
|
181
|
-
size(ecosystems)
|
|
181
|
+
size(ecosystems) ? /*#__PURE__*/React.createElement("li", null, /*#__PURE__*/React.createElement(Dropdown, {
|
|
182
182
|
className: styles.ecoSystems,
|
|
183
183
|
overlay: /*#__PURE__*/React.createElement(Menu, null, map(ecosystems, function (_ref2) {
|
|
184
184
|
var url = _ref2.url,
|
|
@@ -189,13 +189,13 @@ var HeaderComponent = function HeaderComponent(_ref) {
|
|
|
189
189
|
target: "_blank",
|
|
190
190
|
rel: "noreferrer",
|
|
191
191
|
href: url
|
|
192
|
-
}, ecosystemName === null || ecosystemName === void 0 ? void 0 : ecosystemName[lang], " ", /*#__PURE__*/React.createElement(
|
|
192
|
+
}, ecosystemName === null || ecosystemName === void 0 ? void 0 : ecosystemName[lang], " ", /*#__PURE__*/React.createElement(LinkOutlined, null)));
|
|
193
193
|
}))
|
|
194
194
|
}, /*#__PURE__*/React.createElement("span", null, useT('周边生态'), /*#__PURE__*/React.createElement(DownOutlined, {
|
|
195
195
|
style: {
|
|
196
196
|
marginLeft: '6px'
|
|
197
197
|
}
|
|
198
|
-
})))),
|
|
198
|
+
})))) : null,
|
|
199
199
|
/** 产品列表 */
|
|
200
200
|
showAntVProductsCard && /*#__PURE__*/React.createElement("li", productItemProps, /*#__PURE__*/React.createElement("a", null, useT('所有产品'), !isAntVHome ? /*#__PURE__*/React.createElement("img", {
|
|
201
201
|
src: "https://gw.alipayobjects.com/zos/antfincdn/FLrTNDvlna/antv.png",
|
|
@@ -312,7 +312,8 @@ var HeaderComponent = function HeaderComponent(_ref) {
|
|
|
312
312
|
className: styles.githubCorner
|
|
313
313
|
}, /*#__PURE__*/React.createElement("a", {
|
|
314
314
|
href: githubUrl,
|
|
315
|
-
target: "_blank"
|
|
315
|
+
target: "_blank",
|
|
316
|
+
rel: "noreferrer"
|
|
316
317
|
}, /*#__PURE__*/React.createElement(GithubOutlined, null))));
|
|
317
318
|
return /*#__PURE__*/React.createElement("header", {
|
|
318
319
|
className: cx(styles.header, (_cx4 = {}, _defineProperty(_cx4, styles.transparent, !!transparent && !productMenuVisible), _defineProperty(_cx4, styles.isHomePage, !!isHomePage && !isAntVHome), _defineProperty(_cx4, styles.lightTheme, !!isAntVHome && !productMenuVisible && isWide), _defineProperty(_cx4, styles.fixed, popupMenuVisible), _cx4))
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import styles from "./index.module.less";
|
|
3
|
+
/**
|
|
4
|
+
* Loading
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
var Loading = function Loading() {
|
|
3
8
|
return /*#__PURE__*/React.createElement("div", {
|
|
4
|
-
style: {
|
|
5
|
-
height: '100vh'
|
|
6
|
-
}
|
|
7
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
8
9
|
style: {
|
|
9
10
|
position: 'relative',
|
|
10
|
-
height: '100%'
|
|
11
|
+
height: '100%',
|
|
12
|
+
width: '100%'
|
|
11
13
|
}
|
|
12
14
|
}, /*#__PURE__*/React.createElement("div", {
|
|
13
|
-
className:
|
|
14
|
-
}, /*#__PURE__*/React.createElement("div",
|
|
15
|
+
className: styles.loading
|
|
16
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
className: "container"
|
|
18
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
15
19
|
className: "loader"
|
|
16
20
|
}, /*#__PURE__*/React.createElement("svg", {
|
|
17
21
|
viewBox: "0 0 80 80"
|
|
@@ -61,5 +65,15 @@ export var Loading = function Loading() {
|
|
|
61
65
|
stroke: "url(#gradient)"
|
|
62
66
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
63
67
|
className: "loading-text"
|
|
64
|
-
}, /*#__PURE__*/React.createElement("p", null, "Loading...")))))
|
|
65
|
-
};
|
|
68
|
+
}, /*#__PURE__*/React.createElement("p", null, "Loading...")))));
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
var PageLoading = function PageLoading() {
|
|
72
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
73
|
+
style: {
|
|
74
|
+
height: '100vh'
|
|
75
|
+
}
|
|
76
|
+
}, /*#__PURE__*/React.createElement(Loading, null));
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export { Loading, PageLoading };
|