@antv/dumi-theme-antv 0.8.0-beta.3 → 0.8.0-beta.4
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.module.less +0 -1
- package/dist/components/AI/HomeDialog/AntVBanner/index.module.less +2 -2
- package/dist/components/AI/HomeDialog/ModeSelector/index.module.less +39 -22
- package/dist/components/AI/HomeDialog/PromptTextarea/DatasourceCard/index.module.less +3 -3
- package/dist/components/AI/HomeDialog/PromptTextarea/index.js +10 -23
- package/dist/components/AI/HomeDialog/PromptTextarea/index.module.less +8 -8
- package/dist/components/AI/HomeDialog/RecommendCase/card.module.less +1 -1
- package/dist/components/AI/HomeDialog/RecommendCase/index.module.less +2 -2
- package/dist/components/Login/Captcha/index.js +199 -0
- package/dist/components/Login/Captcha/index.less +91 -0
- package/dist/components/Login/CheckCode/index.js +262 -0
- package/dist/components/Login/CheckCode/index.less +137 -0
- package/dist/components/Login/CountDownButton/index.js +115 -0
- package/dist/components/Login/CountDownButton/index.less +8 -0
- package/dist/components/Login/LoginForm.js +245 -0
- package/dist/components/Login/LoginForm.less +409 -0
- package/dist/components/Login/index.js +20 -0
- package/dist/components/Login/openAuthWindow.js +54 -0
- package/dist/components/Login/types.js +5 -0
- package/dist/components/Login/utils.js +47 -0
- package/dist/layouts/DocLayout.js +2 -1
- package/dist/layouts/GlobalLayout/index.js +8 -4
- package/dist/locales/en.json +52 -1
- package/dist/locales/zh.json +52 -1
- package/dist/model/AIChat.js +2 -2
- package/dist/model/auth.js +89 -0
- package/dist/pages/AIPlayground/components/ConversationsMenu/index.module.less +2 -0
- package/dist/pages/AIPlayground/components/MarkdownComponent/MarkdownCodeBlock.js +7 -5
- package/dist/pages/AIPlayground/components/MarkdownComponent/MarkdownCodeBlock.module.less +1 -2
- package/dist/pages/AIPlayground/components/MsgBox/index.js +179 -140
- package/dist/pages/AIPlayground/components/MsgBox/index.module.less +3 -2
- package/dist/pages/AIPlayground/components/MsgBox/useAutoScroll.js +46 -0
- package/dist/pages/AIPlayground/components/SessionLayout/index.module.less +1 -1
- package/dist/pages/AIPlayground/components/TaskBox/generateCode.js +7 -1
- package/dist/pages/AIPlayground/components/TaskBox/index.js +31 -52
- package/dist/pages/AIPlayground/components/TaskBox/index.module.less +1 -0
- package/dist/pages/Examples/components/Accouncement/index.module.less +1 -1
- package/dist/pages/Examples/index.module.less +11 -11
- package/dist/pages/Index/components/Cases/index.module.less +8 -8
- package/dist/pages/Index/components/Companies/index.module.less +4 -3
- package/dist/pages/Index/components/Features/FeatureCard.module.less +4 -5
- package/dist/pages/Index/components/Features/index.module.less +5 -5
- package/dist/pages/Index/components/_.less +9 -9
- package/dist/slots/Banner/Notification.module.less +8 -8
- package/dist/slots/Banner/index.module.less +10 -9
- package/dist/slots/CodeEditor/index.module.less +3 -0
- package/dist/slots/CodePreview/index.module.less +0 -3
- package/dist/slots/ContentTable/index.module.less +2 -1
- package/dist/slots/Detail/News.module.less +9 -9
- package/dist/slots/Detail/index.module.less +11 -14
- package/dist/slots/ExampleSider/index.module.less +3 -4
- package/dist/slots/Footer/index.module.less +2 -2
- package/dist/slots/Header/Products/Product.module.less +2 -2
- package/dist/slots/Header/Search/SearchResult.js +7 -0
- package/dist/slots/Header/Search/SearchResult.module.less +1 -0
- package/dist/slots/Header/index.module.less +5 -5
- package/dist/slots/LiveExample/index.module.less +1 -1
- package/dist/slots/Loading/index.module.less +30 -28
- package/dist/slots/ManualContent/index.module.less +14 -17
- package/dist/slots/_.less +9 -9
- package/dist/utils/auth.js +10 -0
- package/dist/utils/env.js +24 -0
- package/dist/utils/request.js +104 -0
- package/package.json +7 -2
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
z-index: 1;
|
|
12
12
|
top: 0;
|
|
13
13
|
height: 100%;
|
|
14
|
-
box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0);
|
|
14
|
+
box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0%);
|
|
15
15
|
width: 1px;
|
|
16
16
|
transition: all 0.3s;
|
|
17
17
|
}
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
user-select: none;
|
|
46
46
|
background-color: #fff;
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
&::after {
|
|
49
49
|
transition: all 0.3s;
|
|
50
50
|
background-color: transparent;
|
|
51
51
|
border: 1px solid transparent;
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
&:hover {
|
|
61
61
|
border-color: var(--primary-color);
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
&::before {
|
|
64
64
|
transition: all 0.3s;
|
|
65
65
|
content: '';
|
|
66
66
|
position: absolute;
|
|
@@ -127,7 +127,6 @@
|
|
|
127
127
|
display: inline-block;
|
|
128
128
|
width: 100%;
|
|
129
129
|
vertical-align: bottom;
|
|
130
|
-
|
|
131
130
|
overflow: hidden;
|
|
132
131
|
text-overflow: ellipsis;
|
|
133
132
|
white-space: nowrap;
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
display: flex;
|
|
37
37
|
justify-content: center;
|
|
38
38
|
font-size: 14px;
|
|
39
|
-
border-bottom: 1px solid rgba(255, 255, 255,
|
|
39
|
+
border-bottom: 1px solid rgba(255, 255, 255, 25%);
|
|
40
40
|
margin-bottom: 16px;
|
|
41
41
|
box-sizing: border-box;
|
|
42
42
|
padding-bottom: 16px;
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
:global(.anticon),
|
|
73
73
|
a {
|
|
74
74
|
margin-right: 8px;
|
|
75
|
-
color: rgba(255, 255, 255,
|
|
75
|
+
color: rgba(255, 255, 255, 60%);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
&.light {
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
ul {
|
|
58
58
|
list-style: none;
|
|
59
59
|
padding: 0;
|
|
60
|
-
margin: 0 0 20px
|
|
60
|
+
margin: 0 0 20px;
|
|
61
61
|
|
|
62
62
|
&:last-child {
|
|
63
63
|
margin-bottom: 32px;
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
margin-bottom: 4px;
|
|
88
88
|
font-size: 14px;
|
|
89
89
|
line-height: 22px;
|
|
90
|
-
color: rgba(0, 0, 0,
|
|
90
|
+
color: rgba(0, 0, 0, 85%);
|
|
91
91
|
transition: all 0.3s;
|
|
92
92
|
|
|
93
93
|
&:hover {
|
|
@@ -3,6 +3,8 @@ import React from 'react';
|
|
|
3
3
|
import styles from "./SearchResult.module.less";
|
|
4
4
|
import classnames from "classnames";
|
|
5
5
|
import { createNewSession } from "../../../model/AIChat";
|
|
6
|
+
import { authStore, showLoginModal } from "../../../model/auth";
|
|
7
|
+
import { useSnapshot } from "valtio";
|
|
6
8
|
var getHighlightInfo = function getHighlightInfo(textSegments) {
|
|
7
9
|
return /*#__PURE__*/React.createElement(React.Fragment, null, textSegments.map(function (segment) {
|
|
8
10
|
return /*#__PURE__*/React.createElement("span", {
|
|
@@ -21,6 +23,7 @@ export var SearchResult = function SearchResult(_ref) {
|
|
|
21
23
|
var _useSiteData = useSiteData(),
|
|
22
24
|
themeConfig = _useSiteData.themeConfig;
|
|
23
25
|
var intl = useIntl();
|
|
26
|
+
var authSnap = useSnapshot(authStore);
|
|
24
27
|
return /*#__PURE__*/React.createElement("div", {
|
|
25
28
|
className: styles.searchResult
|
|
26
29
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -35,6 +38,10 @@ export var SearchResult = function SearchResult(_ref) {
|
|
|
35
38
|
}), /*#__PURE__*/React.createElement("a", {
|
|
36
39
|
className: styles.result,
|
|
37
40
|
onClick: function onClick() {
|
|
41
|
+
if (!authSnap.isAuthenticated) {
|
|
42
|
+
showLoginModal();
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
38
45
|
createNewSession({
|
|
39
46
|
promptText: keywords,
|
|
40
47
|
mode: "solve",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
.container {
|
|
66
66
|
max-width: 100%;
|
|
67
67
|
padding: 0 20px;
|
|
68
|
-
border-bottom: 1px solid rgba(0, 0, 0,
|
|
68
|
+
border-bottom: 1px solid rgba(0, 0, 0, 10%);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.nav {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
|
|
88
88
|
&:hover {
|
|
89
89
|
background: #fff;
|
|
90
|
-
box-shadow: 0 2px 5px 0 rgba(0, 0, 0,
|
|
90
|
+
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 10%);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
}
|
|
@@ -174,11 +174,11 @@
|
|
|
174
174
|
font-size: 18px;
|
|
175
175
|
|
|
176
176
|
a {
|
|
177
|
-
color: rgba(0, 0, 0,
|
|
177
|
+
color: rgba(0, 0, 0, 85%);
|
|
178
178
|
transition: all 0.3s;
|
|
179
179
|
|
|
180
180
|
&:hover {
|
|
181
|
-
color: rgba(0, 0, 0,
|
|
181
|
+
color: rgba(0, 0, 0, 100%);
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
}
|
|
@@ -400,7 +400,7 @@
|
|
|
400
400
|
}
|
|
401
401
|
|
|
402
402
|
.remindHref {
|
|
403
|
-
margin:
|
|
403
|
+
margin: 0 6px 0 5px;
|
|
404
404
|
}
|
|
405
405
|
|
|
406
406
|
.modalContent {
|
|
@@ -15,8 +15,10 @@
|
|
|
15
15
|
top: 50%;
|
|
16
16
|
margin: -50px 0 0 -120px;
|
|
17
17
|
}
|
|
18
|
+
|
|
18
19
|
.loader {
|
|
19
20
|
--duration: 3s;
|
|
21
|
+
|
|
20
22
|
width: 44px;
|
|
21
23
|
height: 44px;
|
|
22
24
|
position: relative;
|
|
@@ -24,7 +26,7 @@
|
|
|
24
26
|
margin: 0 16px;
|
|
25
27
|
}
|
|
26
28
|
|
|
27
|
-
.loader
|
|
29
|
+
.loader::before {
|
|
28
30
|
content: ' ';
|
|
29
31
|
width: 6px;
|
|
30
32
|
height: 6px;
|
|
@@ -34,9 +36,9 @@
|
|
|
34
36
|
background: #ff700a;
|
|
35
37
|
top: 37px;
|
|
36
38
|
left: 19px;
|
|
37
|
-
-webkit-transform: translate(-18px, -18px);
|
|
38
39
|
transform: translate(-18px, -18px);
|
|
39
|
-
|
|
40
|
+
transform: translate(-18px, -18px);
|
|
41
|
+
animation: dotRect var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
40
42
|
animation: dotRect var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
41
43
|
}
|
|
42
44
|
|
|
@@ -58,21 +60,21 @@
|
|
|
58
60
|
.loader svg polygon {
|
|
59
61
|
stroke-dasharray: 145 76 145 76;
|
|
60
62
|
stroke-dashoffset: 0;
|
|
61
|
-
|
|
63
|
+
animation: pathTriangle var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
62
64
|
animation: pathTriangle var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
.loader svg rect {
|
|
66
68
|
stroke-dasharray: 192 64 192 64;
|
|
67
69
|
stroke-dashoffset: 0;
|
|
68
|
-
|
|
70
|
+
animation: pathRect 3s cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
69
71
|
animation: pathRect 3s cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
70
72
|
}
|
|
71
73
|
|
|
72
74
|
.loader svg circle {
|
|
73
75
|
stroke-dasharray: 150 50 150 50;
|
|
74
76
|
stroke-dashoffset: 75;
|
|
75
|
-
|
|
77
|
+
animation: pathCircle var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
76
78
|
animation: pathCircle var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
77
79
|
}
|
|
78
80
|
|
|
@@ -80,11 +82,11 @@
|
|
|
80
82
|
width: 48px;
|
|
81
83
|
}
|
|
82
84
|
|
|
83
|
-
.loader.triangle
|
|
85
|
+
.loader.triangle::before {
|
|
84
86
|
left: 21px;
|
|
85
|
-
-webkit-transform: translate(-10px, -18px);
|
|
86
87
|
transform: translate(-10px, -18px);
|
|
87
|
-
|
|
88
|
+
transform: translate(-10px, -18px);
|
|
89
|
+
animation: dotTriangle var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
88
90
|
animation: dotTriangle var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
|
|
89
91
|
}
|
|
90
92
|
|
|
@@ -99,7 +101,7 @@
|
|
|
99
101
|
}
|
|
100
102
|
}
|
|
101
103
|
|
|
102
|
-
|
|
104
|
+
@keyframes ~":global(pathTriangle)" {
|
|
103
105
|
33% {
|
|
104
106
|
stroke-dashoffset: 74;
|
|
105
107
|
}
|
|
@@ -127,41 +129,41 @@
|
|
|
127
129
|
}
|
|
128
130
|
}
|
|
129
131
|
|
|
130
|
-
|
|
132
|
+
@keyframes ~":global(dotTriangle)" {
|
|
131
133
|
33% {
|
|
132
|
-
|
|
134
|
+
transform: translate(0, 0);
|
|
133
135
|
transform: translate(0, 0);
|
|
134
136
|
}
|
|
135
137
|
|
|
136
138
|
66% {
|
|
137
|
-
|
|
139
|
+
transform: translate(10px, -18px);
|
|
138
140
|
transform: translate(10px, -18px);
|
|
139
141
|
}
|
|
140
142
|
|
|
141
143
|
100% {
|
|
142
|
-
|
|
144
|
+
transform: translate(-10px, -18px);
|
|
143
145
|
transform: translate(-10px, -18px);
|
|
144
146
|
}
|
|
145
147
|
}
|
|
146
148
|
|
|
147
149
|
@keyframes ~":global(dotTriangle)" {
|
|
148
150
|
33% {
|
|
149
|
-
|
|
151
|
+
transform: translate(0, 0);
|
|
150
152
|
transform: translate(0, 0);
|
|
151
153
|
}
|
|
152
154
|
|
|
153
155
|
66% {
|
|
154
|
-
|
|
156
|
+
transform: translate(10px, -18px);
|
|
155
157
|
transform: translate(10px, -18px);
|
|
156
158
|
}
|
|
157
159
|
|
|
158
160
|
100% {
|
|
159
|
-
|
|
161
|
+
transform: translate(-10px, -18px);
|
|
160
162
|
transform: translate(-10px, -18px);
|
|
161
163
|
}
|
|
162
164
|
}
|
|
163
165
|
|
|
164
|
-
|
|
166
|
+
@keyframes ~":global(pathRect)" {
|
|
165
167
|
25% {
|
|
166
168
|
stroke-dashoffset: 64;
|
|
167
169
|
}
|
|
@@ -197,51 +199,51 @@
|
|
|
197
199
|
}
|
|
198
200
|
}
|
|
199
201
|
|
|
200
|
-
|
|
202
|
+
@keyframes ~":global(dotRect)" {
|
|
201
203
|
25% {
|
|
202
|
-
|
|
204
|
+
transform: translate(0, 0);
|
|
203
205
|
transform: translate(0, 0);
|
|
204
206
|
}
|
|
205
207
|
|
|
206
208
|
50% {
|
|
207
|
-
|
|
209
|
+
transform: translate(18px, -18px);
|
|
208
210
|
transform: translate(18px, -18px);
|
|
209
211
|
}
|
|
210
212
|
|
|
211
213
|
75% {
|
|
212
|
-
|
|
214
|
+
transform: translate(0, -36px);
|
|
213
215
|
transform: translate(0, -36px);
|
|
214
216
|
}
|
|
215
217
|
|
|
216
218
|
100% {
|
|
217
|
-
|
|
219
|
+
transform: translate(-18px, -18px);
|
|
218
220
|
transform: translate(-18px, -18px);
|
|
219
221
|
}
|
|
220
222
|
}
|
|
221
223
|
|
|
222
224
|
@keyframes ~":global(dotRect)" {
|
|
223
225
|
25% {
|
|
224
|
-
|
|
226
|
+
transform: translate(0, 0);
|
|
225
227
|
transform: translate(0, 0);
|
|
226
228
|
}
|
|
227
229
|
|
|
228
230
|
50% {
|
|
229
|
-
|
|
231
|
+
transform: translate(18px, -18px);
|
|
230
232
|
transform: translate(18px, -18px);
|
|
231
233
|
}
|
|
232
234
|
|
|
233
235
|
75% {
|
|
234
|
-
|
|
236
|
+
transform: translate(0, -36px);
|
|
235
237
|
transform: translate(0, -36px);
|
|
236
238
|
}
|
|
237
239
|
|
|
238
240
|
100% {
|
|
239
|
-
|
|
241
|
+
transform: translate(-18px, -18px);
|
|
240
242
|
transform: translate(-18px, -18px);
|
|
241
243
|
}
|
|
242
244
|
}
|
|
243
245
|
|
|
244
|
-
|
|
246
|
+
@keyframes ~":global(pathCircle)" {
|
|
245
247
|
25% {
|
|
246
248
|
stroke-dashoffset: 125;
|
|
247
249
|
}
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
pre[class*='language-'] {
|
|
90
|
-
background-color: rgba(0, 0, 0,
|
|
90
|
+
background-color: rgba(0, 0, 0, 3%);
|
|
91
91
|
width: 100%;
|
|
92
92
|
}
|
|
93
93
|
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
padding: 0.2em 0.4em;
|
|
96
96
|
margin: 0;
|
|
97
97
|
font-size: 85%;
|
|
98
|
-
background-color: rgba(175, 184, 193,
|
|
98
|
+
background-color: rgba(175, 184, 193, 20%);
|
|
99
99
|
border-radius: 6px;
|
|
100
100
|
}
|
|
101
101
|
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
table th {
|
|
175
175
|
color: #5c6b77;
|
|
176
176
|
font-weight: 500;
|
|
177
|
-
background: rgba(0, 0, 0,
|
|
177
|
+
background: rgba(0, 0, 0, 2%);
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
table th,
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
width: 20%;
|
|
194
194
|
font-weight: 500;
|
|
195
195
|
background: #fcfcfc;
|
|
196
|
-
color: rgba(0, 0, 0,
|
|
196
|
+
color: rgba(0, 0, 0, 85%);
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
blockquote {
|
|
@@ -256,7 +256,6 @@
|
|
|
256
256
|
background: #fff;
|
|
257
257
|
max-height: 100vh;
|
|
258
258
|
overflow: auto;
|
|
259
|
-
|
|
260
259
|
position: sticky;
|
|
261
260
|
top: 0;
|
|
262
261
|
|
|
@@ -281,8 +280,8 @@
|
|
|
281
280
|
margin-bottom: 20px;
|
|
282
281
|
font-weight: 500;
|
|
283
282
|
font-size: 30px;
|
|
284
|
-
font-family: Avenir, -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei,
|
|
285
|
-
Helvetica Neue, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
|
|
283
|
+
font-family: Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
|
|
284
|
+
"Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
|
286
285
|
line-height: 38px;
|
|
287
286
|
}
|
|
288
287
|
|
|
@@ -358,7 +357,7 @@
|
|
|
358
357
|
justify-content: center;
|
|
359
358
|
align-items: center;
|
|
360
359
|
background: #fff;
|
|
361
|
-
box-shadow: 2px 0 8px rgba(0, 0, 0,
|
|
360
|
+
box-shadow: 2px 0 8px rgba(0, 0, 0, 15%);
|
|
362
361
|
border-radius: 0 4px 4px 0;
|
|
363
362
|
}
|
|
364
363
|
}
|
|
@@ -428,7 +427,7 @@
|
|
|
428
427
|
&:hover > div {
|
|
429
428
|
transform: translateY(-4px);
|
|
430
429
|
border-color: transparent;
|
|
431
|
-
box-shadow: 0 6px 16px rgba(107, 147, 224,
|
|
430
|
+
box-shadow: 0 6px 16px rgba(107, 147, 224, 14%);
|
|
432
431
|
}
|
|
433
432
|
|
|
434
433
|
h4 {
|
|
@@ -482,7 +481,7 @@
|
|
|
482
481
|
:global {
|
|
483
482
|
.SplitPane {
|
|
484
483
|
overflow: auto;
|
|
485
|
-
left:
|
|
484
|
+
left: 0;
|
|
486
485
|
height: calc(100vh - 64px) !important;
|
|
487
486
|
}
|
|
488
487
|
|
|
@@ -623,10 +622,9 @@
|
|
|
623
622
|
}
|
|
624
623
|
|
|
625
624
|
.backTop {
|
|
626
|
-
transition: color 0.3s;
|
|
627
625
|
color: #868484;
|
|
628
626
|
background-color: #fff;
|
|
629
|
-
box-shadow: 0 3px 6px -4px rgba(0, 0, 0,
|
|
627
|
+
box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 12%), 0 6px 16px 0 rgba(0, 0, 0, 8%), 0 9px 28px 8px rgba(0, 0, 0, 5%);
|
|
630
628
|
transition: color 0.3s;
|
|
631
629
|
width: 44px;
|
|
632
630
|
height: 44px;
|
|
@@ -667,7 +665,7 @@
|
|
|
667
665
|
justify-content: center;
|
|
668
666
|
align-items: center;
|
|
669
667
|
background: #fff;
|
|
670
|
-
box-shadow: 2px 0 8px rgba(0, 0, 0,
|
|
668
|
+
box-shadow: 2px 0 8px rgba(0, 0, 0, 15%);
|
|
671
669
|
border-radius: 0 4px 4px 0;
|
|
672
670
|
}
|
|
673
671
|
|
|
@@ -677,9 +675,8 @@
|
|
|
677
675
|
|
|
678
676
|
.readtime {
|
|
679
677
|
color: #0d1a26;
|
|
680
|
-
line-height: 1.5715;
|
|
681
678
|
list-style: none;
|
|
682
|
-
|
|
679
|
+
font-feature-settings: 'tnum';
|
|
683
680
|
font-feature-settings: 'tnum';
|
|
684
681
|
display: inline-block;
|
|
685
682
|
height: auto;
|
|
@@ -694,6 +691,6 @@
|
|
|
694
691
|
opacity: 1;
|
|
695
692
|
transition: all 0.3s;
|
|
696
693
|
background-color: #fff;
|
|
697
|
-
font-family: Avenir, -apple-system, BlinkMacSystemFont, Segoe UI, PingFang SC, Hiragino Sans GB, Microsoft YaHei,
|
|
698
|
-
Helvetica Neue, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
|
|
694
|
+
font-family: Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
|
|
695
|
+
"Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
|
699
696
|
}
|
package/dist/slots/_.less
CHANGED
|
@@ -95,30 +95,30 @@ h6 {
|
|
|
95
95
|
width: 100%;
|
|
96
96
|
height: 11px;
|
|
97
97
|
margin: -5px 0;
|
|
98
|
-
border-top: 5px solid rgba(255, 255, 255, 0);
|
|
99
|
-
border-bottom: 5px solid rgba(255, 255, 255, 0);
|
|
98
|
+
border-top: 5px solid rgba(255, 255, 255, 0%);
|
|
99
|
+
border-bottom: 5px solid rgba(255, 255, 255, 0%);
|
|
100
100
|
cursor: row-resize;
|
|
101
101
|
|
|
102
102
|
&:hover {
|
|
103
|
-
border-top: 5px solid rgba(0, 0, 0,
|
|
104
|
-
border-bottom: 5px solid rgba(0, 0, 0,
|
|
103
|
+
border-top: 5px solid rgba(0, 0, 0, 50%);
|
|
104
|
+
border-bottom: 5px solid rgba(0, 0, 0, 50%);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
&.vertical {
|
|
109
109
|
width: 11px;
|
|
110
110
|
margin: 0 -5px;
|
|
111
|
-
border-right: 5px solid rgba(255, 255, 255, 0);
|
|
112
|
-
border-left: 5px solid rgba(255, 255, 255, 0);
|
|
111
|
+
border-right: 5px solid rgba(255, 255, 255, 0%);
|
|
112
|
+
border-left: 5px solid rgba(255, 255, 255, 0%);
|
|
113
113
|
cursor: col-resize;
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
pane2 {
|
|
116
116
|
border-left: 1px solid #e6e6e6;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
&:hover {
|
|
120
|
-
border-right: 5px solid rgba(0, 0, 0,
|
|
121
|
-
border-left: 5px solid rgba(0, 0, 0,
|
|
120
|
+
border-right: 5px solid rgba(0, 0, 0, 50%);
|
|
121
|
+
border-left: 5px solid rgba(0, 0, 0, 50%);
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
var TokenKey = 'My-App-Token';
|
|
2
|
+
export var getToken = function getToken() {
|
|
3
|
+
return localStorage.getItem(TokenKey);
|
|
4
|
+
};
|
|
5
|
+
export var setToken = function setToken(token) {
|
|
6
|
+
return localStorage.setItem(TokenKey, token);
|
|
7
|
+
};
|
|
8
|
+
export var removeToken = function removeToken() {
|
|
9
|
+
return localStorage.removeItem(TokenKey);
|
|
10
|
+
};
|
package/dist/utils/env.js
CHANGED
|
@@ -8,4 +8,28 @@ export var isBrowser = function isBrowser() {
|
|
|
8
8
|
export var safeWindow = function safeWindow(fn) {
|
|
9
9
|
if (isBrowser()) return fn(window);
|
|
10
10
|
return undefined;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* 根据当前窗口的域名动态获取 API 的 baseURL
|
|
15
|
+
* @returns {string} API 的 baseURL
|
|
16
|
+
*/
|
|
17
|
+
export var getBaseURL = function getBaseURL() {
|
|
18
|
+
var hostname = window.location.hostname;
|
|
19
|
+
|
|
20
|
+
// 生产环境
|
|
21
|
+
if (hostname.endsWith('antv.antgroup.com')) {
|
|
22
|
+
return 'https://www.weavefox.cn';
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// 预发环境
|
|
26
|
+
if (hostname.endsWith('-pre.alipay.com')) {
|
|
27
|
+
return 'https://prepub.weavefox.cn';
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// 本地环境
|
|
31
|
+
if (hostname.endsWith('.alipay.net')) {
|
|
32
|
+
return 'https://weavefox.alipay.net:8443';
|
|
33
|
+
}
|
|
34
|
+
return 'https://www.weavefox.cn';
|
|
11
35
|
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
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(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
import axios from 'axios';
|
|
8
|
+
import { message, Modal } from 'antd';
|
|
9
|
+
import { getBaseURL } from "./env";
|
|
10
|
+
import { getToken, removeToken } from "./auth";
|
|
11
|
+
var req = axios.create({
|
|
12
|
+
baseURL: getBaseURL(),
|
|
13
|
+
timeout: 60000
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
// 请求拦截器
|
|
17
|
+
req.interceptors.request.use(function (config) {
|
|
18
|
+
var token = getToken();
|
|
19
|
+
if (token && config.headers) {
|
|
20
|
+
config.headers.Authorization = "Bearer ".concat(token);
|
|
21
|
+
}
|
|
22
|
+
return config;
|
|
23
|
+
}, function (error) {
|
|
24
|
+
return Promise.reject(error);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
// 响应拦截器
|
|
28
|
+
req.interceptors.response.use(
|
|
29
|
+
// @ts-ignore - Temporarily ignore type mismatch if it occurs with custom ApiResponse
|
|
30
|
+
function (response) {
|
|
31
|
+
var res = response.data;
|
|
32
|
+
|
|
33
|
+
// 业务码非成功状态的统一处理
|
|
34
|
+
if (res.code !== 0 && res.code !== 200) {
|
|
35
|
+
message.error(res.message || 'Error');
|
|
36
|
+
if (res.code === 401) {
|
|
37
|
+
Modal.confirm({
|
|
38
|
+
title: '登录提醒',
|
|
39
|
+
content: '您的登录已过期,请重新登录。',
|
|
40
|
+
okText: '重新登录',
|
|
41
|
+
cancelText: '取消',
|
|
42
|
+
onOk: function onOk() {
|
|
43
|
+
removeToken();
|
|
44
|
+
window.location.href = '/login';
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return Promise.reject(new Error(res.message || 'Error'));
|
|
49
|
+
} else {
|
|
50
|
+
// 成功则直接返回核心业务数据
|
|
51
|
+
return res.data;
|
|
52
|
+
}
|
|
53
|
+
}, function (error) {
|
|
54
|
+
var errorMessage = error.message;
|
|
55
|
+
if (error.response) {
|
|
56
|
+
switch (error.response.status) {
|
|
57
|
+
case 400:
|
|
58
|
+
errorMessage = '请求参数错误 (400)';
|
|
59
|
+
break;
|
|
60
|
+
case 401:
|
|
61
|
+
errorMessage = '未授权,请重新登录 (401)';
|
|
62
|
+
break;
|
|
63
|
+
case 403:
|
|
64
|
+
errorMessage = '拒绝访问 (403)';
|
|
65
|
+
break;
|
|
66
|
+
case 404:
|
|
67
|
+
errorMessage = '请求地址不存在 (404)';
|
|
68
|
+
break;
|
|
69
|
+
case 500:
|
|
70
|
+
errorMessage = '服务器内部错误 (500)';
|
|
71
|
+
break;
|
|
72
|
+
default:
|
|
73
|
+
errorMessage = "\u8FDE\u63A5\u9519\u8BEF (".concat(error.response.status, ")!");
|
|
74
|
+
}
|
|
75
|
+
} else if (errorMessage.includes('timeout')) {
|
|
76
|
+
errorMessage = '请求超时,请检查网络连接!';
|
|
77
|
+
} else {
|
|
78
|
+
errorMessage = '网络连接异常!';
|
|
79
|
+
}
|
|
80
|
+
message.error(errorMessage);
|
|
81
|
+
return Promise.reject(error);
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* 封装通用请求方法
|
|
86
|
+
* @template T - 期望的响应数据类型 (后端返回的 data 字段)
|
|
87
|
+
*/
|
|
88
|
+
var request = {
|
|
89
|
+
get: function get(url, params, config) {
|
|
90
|
+
return req.get(url, _objectSpread({
|
|
91
|
+
params: params
|
|
92
|
+
}, config));
|
|
93
|
+
},
|
|
94
|
+
post: function post(url, data, config) {
|
|
95
|
+
return req.post(url, data, config);
|
|
96
|
+
},
|
|
97
|
+
put: function put(url, data, config) {
|
|
98
|
+
return req.put(url, data, config);
|
|
99
|
+
},
|
|
100
|
+
delete: function _delete(url, config) {
|
|
101
|
+
return req.delete(url, config);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
export default request;
|