@antv/dumi-theme-antv 0.7.10 → 0.8.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/builtins/Playground/index.js +1 -1
- package/dist/builtins/Playground/index.module.less +0 -1
- package/dist/common/styles/Common.js +1 -1
- package/dist/common/styles/theme.js +1 -1
- package/dist/components/AI/HomeDialog/AntVBanner/index.js +4 -0
- package/dist/components/AI/HomeDialog/AntVBanner/index.module.less +35 -0
- package/dist/components/AI/HomeDialog/ModeSelector/ModeSelectorDropdown.js +42 -0
- package/dist/components/AI/HomeDialog/ModeSelector/index.js +32 -0
- package/dist/components/AI/HomeDialog/ModeSelector/index.module.less +289 -0
- package/dist/components/AI/HomeDialog/PromptTextarea/ChooseLib/index.js +62 -0
- package/dist/components/AI/HomeDialog/PromptTextarea/ChooseLib/index.module.less +4 -0
- package/dist/components/AI/HomeDialog/PromptTextarea/DatasourceCard/index.js +25 -0
- package/dist/components/AI/HomeDialog/PromptTextarea/DatasourceCard/index.module.less +42 -0
- package/dist/components/AI/HomeDialog/PromptTextarea/SendButton.js +23 -0
- package/dist/components/AI/HomeDialog/PromptTextarea/SendButton.module.less +9 -0
- package/dist/components/AI/HomeDialog/PromptTextarea/Uploader/DataUploader.js +225 -0
- package/dist/components/AI/HomeDialog/PromptTextarea/index.js +172 -0
- package/dist/components/AI/HomeDialog/PromptTextarea/index.module.less +128 -0
- package/dist/components/AI/HomeDialog/RecommendCase/Card.js +80 -0
- package/dist/components/AI/HomeDialog/RecommendCase/card.module.less +131 -0
- package/dist/components/AI/HomeDialog/RecommendCase/index.js +130 -0
- package/dist/components/AI/HomeDialog/RecommendCase/index.module.less +45 -0
- package/dist/components/AI/HomeDialog/RecommendCase/recommend.json +66 -0
- package/dist/components/AI/HomeDialog/index.js +62 -0
- package/dist/components/AI/HomeDialog/index.module.less +3 -0
- package/dist/components/AI/constant.js +37 -0
- package/dist/components/AI/index.js +1 -0
- package/dist/components/AI/types.js +1 -0
- package/dist/components/AI/utils.js +38 -0
- package/dist/components/Login/Captcha/index.js +185 -0
- package/dist/components/Login/Captcha/index.less +91 -0
- package/dist/components/Login/CheckCode/index.js +244 -0
- package/dist/components/Login/CheckCode/index.less +137 -0
- package/dist/components/Login/CountDownButton/index.js +109 -0
- package/dist/components/Login/CountDownButton/index.less +8 -0
- package/dist/components/Login/LoginForm.js +239 -0
- package/dist/components/Login/LoginForm.less +408 -0
- package/dist/components/Login/index.js +24 -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/hooks/useProducts.js +39 -0
- package/dist/hooks/useStreamingText.js +139 -0
- package/dist/hooks/useTypewriter.js +69 -0
- package/dist/hooks/useVisionsnapSdk.js +159 -0
- package/dist/layouts/DocLayout.js +2 -2
- package/dist/layouts/GlobalLayout/index.js +22 -0
- package/dist/locales/en.json +132 -1
- package/dist/locales/zh.json +132 -1
- package/dist/model/AIChat.js +313 -0
- package/dist/model/auth.js +147 -0
- package/dist/pages/AIPlayground/components/ConversationsMenu/index.js +176 -0
- package/dist/pages/AIPlayground/components/ConversationsMenu/index.module.less +46 -0
- package/dist/pages/AIPlayground/components/MarkdownComponent/MarkdownCodeBlock.js +97 -0
- package/dist/pages/AIPlayground/components/MarkdownComponent/MarkdownCodeBlock.module.less +13 -0
- package/dist/pages/AIPlayground/components/MarkdownComponent/index.js +50 -0
- package/dist/pages/AIPlayground/components/MsgBox/index.js +407 -0
- package/dist/pages/AIPlayground/components/MsgBox/index.module.less +43 -0
- package/dist/pages/AIPlayground/components/MsgBox/useAutoScroll.js +46 -0
- package/dist/pages/AIPlayground/components/SessionLayout/index.js +62 -0
- package/dist/pages/AIPlayground/components/SessionLayout/index.module.less +37 -0
- package/dist/pages/AIPlayground/components/TaskBox/generateCode.js +230 -0
- package/dist/pages/AIPlayground/components/TaskBox/index.js +101 -0
- package/dist/pages/AIPlayground/components/TaskBox/index.module.less +9 -0
- package/dist/pages/AIPlayground/demo.js +34 -0
- package/dist/pages/AIPlayground/index.js +12 -0
- package/dist/pages/AIPlayground/index.module.less +5 -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/pages/Index/index.js +1 -1
- package/dist/plugin/index.js +14 -6
- package/dist/slots/Banner/Notification.module.less +8 -8
- package/dist/slots/Banner/index.module.less +10 -9
- package/dist/slots/CodeEditor/Toolbar.js +23 -27
- package/dist/slots/CodeEditor/Toolbar.module.less +7 -0
- package/dist/slots/CodeEditor/index.js +67 -5
- package/dist/slots/CodeEditor/index.module.less +24 -0
- package/dist/slots/CodeEditor/utils.js +2 -1
- package/dist/slots/CodePreview/index.module.less +0 -3
- package/dist/slots/CodeRunner/index.js +24 -11
- package/dist/slots/ContentTable/index.module.less +2 -1
- package/dist/{pages/Index/components → slots}/Detail/News.js +1 -1
- package/dist/{pages/Index/components → slots}/Detail/News.module.less +9 -9
- package/dist/{pages/Index/components → slots}/Detail/index.js +13 -29
- package/dist/{pages/Index/components → slots}/Detail/index.module.less +23 -20
- 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/Products/getProducts.js +20 -26
- package/dist/slots/Header/Products/index.js +20 -16
- package/dist/slots/Header/Search/SearchResult.js +53 -14
- package/dist/slots/Header/Search/SearchResult.module.less +1 -0
- package/dist/slots/Header/Search/index.js +2 -1
- package/dist/slots/Header/index.js +72 -30
- package/dist/slots/Header/index.module.less +14 -6
- package/dist/slots/LiveExample/index.js +1 -1
- 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/static/user.svg +3 -0
- package/dist/typings.d.ts +11 -0
- package/dist/utils/analytics.js +16 -0
- package/dist/utils/code.js +35 -0
- package/dist/utils/env.js +63 -0
- package/dist/utils/index.js +7 -0
- package/dist/utils/request.js +42 -0
- package/package.json +31 -15
|
@@ -0,0 +1,230 @@
|
|
|
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
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
8
|
+
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); }
|
|
9
|
+
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; }
|
|
10
|
+
/**
|
|
11
|
+
* 从代码字符串中提取依赖,并生成 package.json 的 dependencies 对象。
|
|
12
|
+
*
|
|
13
|
+
* @param {string} codeString 包含代码的字符串。
|
|
14
|
+
* @returns {object} 一个符合 package.json dependencies 格式的对象。
|
|
15
|
+
*/
|
|
16
|
+
export function generateDependencies() {
|
|
17
|
+
var codeString = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
18
|
+
var ext = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'js';
|
|
19
|
+
// 1. 初始化固定的依赖
|
|
20
|
+
var dependencies = {};
|
|
21
|
+
|
|
22
|
+
// 2. 定义正则表达式来匹配 import 语句的来源
|
|
23
|
+
// 这个正则表达式可以处理以下情况:
|
|
24
|
+
// - import defaultExport from 'package-name';
|
|
25
|
+
// - import { namedExport } from 'package-name';
|
|
26
|
+
// - import * as name from 'package-name';
|
|
27
|
+
// - import 'package-name'; (用于副作用)
|
|
28
|
+
// - import defaultExport from '@scoped/package-name/sub-path';
|
|
29
|
+
//
|
|
30
|
+
// 解析:
|
|
31
|
+
// - `import(?:.*from)?` : 匹配 "import" 关键字,以及可选的 "... from" 部分。
|
|
32
|
+
// - `\s+` : 匹配一个或多个空格。
|
|
33
|
+
// - `['"]` : 匹配单引号或双引号。
|
|
34
|
+
// - `([^'"]+)` : 核心捕获组。匹配引号内的所有字符,这就是我们需要的包路径。
|
|
35
|
+
// - `['"]` : 匹配结束的引号。
|
|
36
|
+
// - `/g` : 全局匹配,查找所有符合条件的导入。
|
|
37
|
+
var importRegex = /import(?:.*from)?\s+['"]([^'"]+)['"]/g;
|
|
38
|
+
|
|
39
|
+
// 使用 Set 来存储找到的包,可以自动去重
|
|
40
|
+
var foundPackages = new Set();
|
|
41
|
+
|
|
42
|
+
// 3. 遍历所有匹配项
|
|
43
|
+
var match;
|
|
44
|
+
while ((match = importRegex.exec(codeString)) !== null) {
|
|
45
|
+
// 捕获组 match[1] 包含了完整的导入路径,例如 '@antv/g2' 或 'react-dom/client'
|
|
46
|
+
var importPath = match[1];
|
|
47
|
+
|
|
48
|
+
// 4. 过滤掉相对路径和绝对路径
|
|
49
|
+
if (importPath.startsWith('.') || importPath.startsWith('/')) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// 5. 提取根包名
|
|
54
|
+
// 这可以处理像 'react-dom/client' 这样的深层导入,我们只需要 'react-dom'
|
|
55
|
+
// 或者像 '@antv/g2/es/chart',我们只需要 '@antv/g2'
|
|
56
|
+
var rootPackage = void 0;
|
|
57
|
+
var pathParts = importPath.split('/');
|
|
58
|
+
if (importPath.startsWith('@')) {
|
|
59
|
+
// 对于作用域包 (scoped package),例如 @antv/g2,根包名是前两部分
|
|
60
|
+
rootPackage = "".concat(pathParts[0], "/").concat(pathParts[1]);
|
|
61
|
+
} else {
|
|
62
|
+
// 对于普通包,根包名是第一部分
|
|
63
|
+
rootPackage = pathParts[0];
|
|
64
|
+
}
|
|
65
|
+
foundPackages.add(rootPackage);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// 6. 将找到的包添加到最终的依赖对象中
|
|
69
|
+
var _iterator = _createForOfIteratorHelper(foundPackages),
|
|
70
|
+
_step;
|
|
71
|
+
try {
|
|
72
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
73
|
+
var pkg = _step.value;
|
|
74
|
+
// 如果不是固定的依赖,就添加并设置为 'latest'
|
|
75
|
+
if (!Object.prototype.hasOwnProperty.call(dependencies, pkg)) {
|
|
76
|
+
dependencies[pkg] = "latest";
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// VisionSnap限制只要是jsx就必须装React。
|
|
81
|
+
} catch (err) {
|
|
82
|
+
_iterator.e(err);
|
|
83
|
+
} finally {
|
|
84
|
+
_iterator.f();
|
|
85
|
+
}
|
|
86
|
+
if (ext === 'jsx' || ext === 'tsx') {
|
|
87
|
+
dependencies["react"] = "^18";
|
|
88
|
+
dependencies["react-dom"] = "^18";
|
|
89
|
+
}
|
|
90
|
+
if (ext === 'vue') {
|
|
91
|
+
dependencies["vue"] = "^3";
|
|
92
|
+
}
|
|
93
|
+
if (dependencies['@antv/s2'] || dependencies['@antv/s2-react'] || dependencies['@antv/s2-react-components']) {
|
|
94
|
+
dependencies = _objectSpread(_objectSpread({}, dependencies), {}, {
|
|
95
|
+
"@ant-design/icons": "^6.1.0",
|
|
96
|
+
"@antv/s2": "^2.4.9",
|
|
97
|
+
"@antv/s2-react": "^2.2.3",
|
|
98
|
+
"@antv/s2-react-components": "^2.1.2",
|
|
99
|
+
"antd": "^5.27.6",
|
|
100
|
+
"insert-css": "^2.0.0",
|
|
101
|
+
"react": "^18.3.1",
|
|
102
|
+
"react-color": "^2.19.3",
|
|
103
|
+
"react-dom": "^18.3.1",
|
|
104
|
+
"@antv/g2": "^5.4.2"
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
return dependencies;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* 基于代码内容,启发式地判断其最合适的文件扩展名。
|
|
112
|
+
* @param {string} code - 要分析的前端代码字符串。
|
|
113
|
+
* @returns {'vue' | 'tsx' | 'jsx' | 'ts' | 'js'} - 推断出的文件扩展名(不含点)。
|
|
114
|
+
*/
|
|
115
|
+
export function getLanguageExtension(code) {
|
|
116
|
+
// --- 特征检测函数 ---
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* 检查代码是否包含 Vue 单文件组件 (SFC) 的特征。
|
|
120
|
+
* 这是最优先的检查,因为Vue的SFC结构非常独特。
|
|
121
|
+
*/
|
|
122
|
+
var containsVue = function containsVue(text) {
|
|
123
|
+
// 检查点 1: Vue 3 <script setup> 语法(最强信号)
|
|
124
|
+
// 匹配 <script setup> 或 <script lang="ts" setup>
|
|
125
|
+
var scriptSetupRegex = /<script\s+(?:lang="ts"\s+)?setup>/;
|
|
126
|
+
if (scriptSetupRegex.test(text)) {
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// 检查点 2: 顶层 <template> 块(非常强的信号)
|
|
131
|
+
// 使用 'm' (multiline) 标志,'^' 匹配每行的开头。
|
|
132
|
+
var templateRegex = /^\s*<template.*>/m;
|
|
133
|
+
if (templateRegex.test(text)) {
|
|
134
|
+
return true;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// 检查点 3: 导入 Vue 核心库(通用信号)
|
|
138
|
+
// 匹配 import ... from 'vue'
|
|
139
|
+
var vueImportRegex = /import\s+.*?\s+from\s*['"]vue['"]/;
|
|
140
|
+
if (vueImportRegex.test(text)) {
|
|
141
|
+
return true;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// 检查点 4: Vue 2 Options API 特征(辅助信号)
|
|
145
|
+
// 匹配 export default { ... data|methods|computed ... } 结构
|
|
146
|
+
var optionsApiRegex = /\bexport\s+default\s*{[\s\S]*?\b(data|methods|computed|watch)\b/;
|
|
147
|
+
if (optionsApiRegex.test(text)) {
|
|
148
|
+
return true;
|
|
149
|
+
}
|
|
150
|
+
return false;
|
|
151
|
+
};
|
|
152
|
+
var containsJsx = function containsJsx(text) {
|
|
153
|
+
var jsxRegex = /<(?![\s!=])([a-zA-Z][a-zA-Z0-9-]*|\/|)/;
|
|
154
|
+
return jsxRegex.test(text);
|
|
155
|
+
};
|
|
156
|
+
var containsTypeScript = function containsTypeScript(text) {
|
|
157
|
+
var typeDefinitionRegex = /\b(interface|type)\s+[A-Z][a-zA-Z0-9]*\b/;
|
|
158
|
+
if (typeDefinitionRegex.test(text)) return true;
|
|
159
|
+
var typeAnnotationRegex = /:\s*([A-Z][a-zA-Z0-9<>.]*|string|number|boolean|any\[?\]?)/;
|
|
160
|
+
if (typeAnnotationRegex.test(text)) return true;
|
|
161
|
+
var tsKeywordsRegex = /\b(as|implements|private|public|protected|readonly)\s+[a-zA-Z]/;
|
|
162
|
+
if (tsKeywordsRegex.test(text)) return true;
|
|
163
|
+
return false;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
// --- 决策逻辑(Vue优先) ---
|
|
167
|
+
|
|
168
|
+
if (containsVue(code)) {
|
|
169
|
+
return 'vue';
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// 如果不是Vue,则回退到原有的React/JS逻辑
|
|
173
|
+
if (containsJsx(code)) {
|
|
174
|
+
if (containsTypeScript(code)) {
|
|
175
|
+
return 'tsx';
|
|
176
|
+
}
|
|
177
|
+
return 'jsx';
|
|
178
|
+
} else {
|
|
179
|
+
if (containsTypeScript(code)) {
|
|
180
|
+
return 'ts';
|
|
181
|
+
}
|
|
182
|
+
return 'js';
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
export function wrap2VisionSnap() {
|
|
186
|
+
var codeBlock = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
187
|
+
var ext = getLanguageExtension(codeBlock);
|
|
188
|
+
var mainFile = ext === 'vue' ? "/src/index.js" : "/src/index.".concat(ext);
|
|
189
|
+
var appFile = "/src/App.".concat(ext);
|
|
190
|
+
var dependencies = generateDependencies(codeBlock, ext);
|
|
191
|
+
var rootElementType = dependencies['@antv/f2'] ? 'canvas' : 'div';
|
|
192
|
+
var dependenciesJSON = {
|
|
193
|
+
"name": "AntV-adapted-project",
|
|
194
|
+
"version": "1.0.0",
|
|
195
|
+
"main": mainFile,
|
|
196
|
+
"dependencies": dependencies
|
|
197
|
+
};
|
|
198
|
+
var mainFileCode = ext === 'vue' ? "import { createApp } from 'vue';\nimport App from './App.vue';\n\nconst app = createApp(App);\napp.mount('#app');\n" : "\n// --- Adapter Script ---\n\n// 1. \u627E\u5230\u7F16\u8F91\u5668\u73AF\u5883\u63D0\u4F9B\u7684\u6839\u8282\u70B9 #root\nconst rootElement = document.getElementById('root');\n\nif (rootElement) {\n // 2. \u5728 #root \u5185\u90E8\u521B\u5EFA\u4E00\u4E2A ".concat(rootElementType, "\n const containerElement = document.createElement('").concat(rootElementType, "');\n\n // 3. \u5C06\u8FD9\u4E2A div \u7684 id \u8BBE\u7F6E\u4E3A 'container'\uFF0C\u4EE5\u6EE1\u8DB3\u7528\u6237\u4EE3\u7801\u7684\u9700\u6C42\n containerElement.id = 'container';\n\n // 4. \u5C06\u5B83\u6DFB\u52A0\u5230 #root \u4E2D\n rootElement.appendChild(containerElement);\n\n // 5. \u73B0\u5728 DOM \u4E2D\u5DF2\u7ECF\u5B58\u5728 #container\uFF0C\u5B89\u5168\u5730\u5BFC\u5165\u5E76\u6267\u884C\u7528\u6237\u7684\u4EE3\u7801\n import('./App.").concat(ext, "');\n\n}\n ");
|
|
199
|
+
return {
|
|
200
|
+
modules: _defineProperty(_defineProperty({
|
|
201
|
+
'/package.json': {
|
|
202
|
+
fpath: '/package.json',
|
|
203
|
+
code: JSON.stringify(dependenciesJSON, null, 2)
|
|
204
|
+
}
|
|
205
|
+
}, mainFile, {
|
|
206
|
+
fpath: mainFile,
|
|
207
|
+
code: mainFileCode
|
|
208
|
+
}), appFile, {
|
|
209
|
+
fpath: appFile,
|
|
210
|
+
code: codeBlock
|
|
211
|
+
})
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
export function wrap2Sandpack() {
|
|
215
|
+
var codeBlock = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
216
|
+
// const regex = /^```[\w-]*\n([\s\S]*?)\n?```$/m;
|
|
217
|
+
// const match = codeBlock.match(regex);
|
|
218
|
+
// if (match) {
|
|
219
|
+
return {
|
|
220
|
+
"/package.json": {
|
|
221
|
+
code: "{\n \"name\": \"AntV-AI-Code\",\n \"version\": \"1.0.0\",\n \"main\": \"/index.tsx\",\n \"dependencies\": ".concat(JSON.stringify(generateDependencies(codeBlock), null, 2), "\n }")
|
|
222
|
+
},
|
|
223
|
+
"/index.tsx": {
|
|
224
|
+
code: codeBlock
|
|
225
|
+
},
|
|
226
|
+
"/index.html": {
|
|
227
|
+
code: "<!DOCTYPE html>\n<html>\n<head>\n <title>Vanilla JS Example</title>\n</head>\n<body>\n <div id=\"root\"></div>\n <div id=\"container\"></div>\n <script src=\"index.tsx\"></script>\n</body>\n</html>"
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { useSiteData } from 'dumi';
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
|
+
import { useSnapshot } from 'valtio';
|
|
4
|
+
import { AIChatStore } from "../../../../model/AIChat";
|
|
5
|
+
import CodeRunner from "dumi/theme/slots/CodeRunner";
|
|
6
|
+
import { wrap2VisionSnap } from "./generateCode";
|
|
7
|
+
import { requestProxy, useVisionsnapSdk } from "../../../../hooks/useVisionsnapSdk";
|
|
8
|
+
import { ErrorBoundary } from 'react-error-boundary';
|
|
9
|
+
import Loading from "dumi/theme/slots/Loading";
|
|
10
|
+
import { ErrorFallback } from "../../../../builtins/Playground";
|
|
11
|
+
import { useAntVConfig } from "../../../../hooks/useProducts";
|
|
12
|
+
function TaskBox() {
|
|
13
|
+
var _themeConfig$ai, _themeConfig$ai2;
|
|
14
|
+
var _useAntVConfig = useAntVConfig(),
|
|
15
|
+
_useAntVConfig$data = _useAntVConfig.data,
|
|
16
|
+
_useAntVConfig$data2 = _useAntVConfig$data === void 0 ? {
|
|
17
|
+
VisionSnapVersion: '3.5.12'
|
|
18
|
+
} : _useAntVConfig$data,
|
|
19
|
+
version = _useAntVConfig$data2.VisionSnapVersion;
|
|
20
|
+
var snap = useSnapshot(AIChatStore);
|
|
21
|
+
var _useSiteData = useSiteData(),
|
|
22
|
+
themeConfig = _useSiteData.themeConfig;
|
|
23
|
+
var demoId = useMemo(function () {
|
|
24
|
+
return crypto.randomUUID();
|
|
25
|
+
}, [snap.codeBlock]);
|
|
26
|
+
var exampleTopics = useMemo(function () {
|
|
27
|
+
return [{
|
|
28
|
+
icon: '',
|
|
29
|
+
title: {},
|
|
30
|
+
id: snap.anonymousUserId,
|
|
31
|
+
examples: [
|
|
32
|
+
// 这是一个 Example 对象
|
|
33
|
+
{
|
|
34
|
+
icon: '',
|
|
35
|
+
title: {},
|
|
36
|
+
id: snap.activeSessionId,
|
|
37
|
+
api: 'https://example.com/api/pie-chart',
|
|
38
|
+
// 必须的 api 属性
|
|
39
|
+
demos: [
|
|
40
|
+
// 这是一个 Demo 对象
|
|
41
|
+
{
|
|
42
|
+
id: demoId,
|
|
43
|
+
screenshot: '',
|
|
44
|
+
title: {},
|
|
45
|
+
filename: 'index.tsx',
|
|
46
|
+
// 必须的 filename 属性
|
|
47
|
+
source: snap.codeBlock
|
|
48
|
+
}]
|
|
49
|
+
}]
|
|
50
|
+
}];
|
|
51
|
+
}, [demoId, snap.activeSessionId, snap.anonymousUserId, snap.codeBlock]);
|
|
52
|
+
var _useVisionsnapSdk = useVisionsnapSdk(version),
|
|
53
|
+
sdk = _useVisionsnapSdk.sdk,
|
|
54
|
+
loading = _useVisionsnapSdk.loading;
|
|
55
|
+
if (loading) {
|
|
56
|
+
return /*#__PURE__*/React.createElement(Loading, null);
|
|
57
|
+
}
|
|
58
|
+
var wrappedVisionSnapCode = wrap2VisionSnap(snap.codeBlock);
|
|
59
|
+
var handleEsmLoadFailed = function handleEsmLoadFailed(err) {
|
|
60
|
+
var _err$data;
|
|
61
|
+
AIChatStore.errorMsg = ((_err$data = err.data) === null || _err$data === void 0 || (_err$data = _err$data.error) === null || _err$data === void 0 || (_err$data = _err$data.split('\n')) === null || _err$data === void 0 ? void 0 : _err$data[0]) || JSON.stringify(err) || err.message;
|
|
62
|
+
};
|
|
63
|
+
if (themeConfig.isAntVSite || ((_themeConfig$ai = themeConfig.ai) === null || _themeConfig$ai === void 0 ? void 0 : _themeConfig$ai.codeRunner) === "VisionSnap" || !((_themeConfig$ai2 = themeConfig.ai) !== null && _themeConfig$ai2 !== void 0 && _themeConfig$ai2.codeRunner) || !wrappedVisionSnapCode.modules["/package.json"].code.includes("@antv/f2")) {
|
|
64
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
65
|
+
FallbackComponent: ErrorFallback
|
|
66
|
+
}, /*#__PURE__*/React.createElement(sdk.VisionPreview, {
|
|
67
|
+
id: "visionIframe",
|
|
68
|
+
bizCode: "antv",
|
|
69
|
+
style: {
|
|
70
|
+
height: '100vh'
|
|
71
|
+
},
|
|
72
|
+
userId: "antv",
|
|
73
|
+
displayMode: "code-and-preview",
|
|
74
|
+
initialView: "preview",
|
|
75
|
+
theme: "light",
|
|
76
|
+
code: wrappedVisionSnapCode,
|
|
77
|
+
requestProxy: requestProxy,
|
|
78
|
+
isStreaming: false,
|
|
79
|
+
proxyOptions: {
|
|
80
|
+
isWAN: true
|
|
81
|
+
},
|
|
82
|
+
src: "https://www.weavefox.cn/_visionsnap_render".concat(wrappedVisionSnapCode.modules["/package.json"].code.includes("vue") ? '_vue' : '', "/index.html?version=").concat(version, "&enableInspector=1"),
|
|
83
|
+
onEsmLoadFailed: handleEsmLoadFailed,
|
|
84
|
+
previewZoomConfig: {
|
|
85
|
+
defaultZoomMode: 100
|
|
86
|
+
}
|
|
87
|
+
}));
|
|
88
|
+
} else {
|
|
89
|
+
return /*#__PURE__*/React.createElement(CodeRunner, {
|
|
90
|
+
isPlayground: true,
|
|
91
|
+
showAI: false,
|
|
92
|
+
showEditor: false,
|
|
93
|
+
size: 0.5,
|
|
94
|
+
topic: snap.anonymousUserId,
|
|
95
|
+
example: snap.activeSessionId,
|
|
96
|
+
demo: demoId,
|
|
97
|
+
exampleTopics: exampleTopics
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
export default TaskBox;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export var projectFiles = {
|
|
2
|
+
"/package.json": {
|
|
3
|
+
code: "{\n \"name\": \"antv-g2-example\",\n \"version\": \"1.0.0\",\n \"main\": \"/index.js\",\n \"dependencies\": {\n \"@antv/g2\": \"^5\"\n }\n }"
|
|
4
|
+
},
|
|
5
|
+
"/index.js": {
|
|
6
|
+
// 入口文件是纯 JS
|
|
7
|
+
code: "import { Chart } from '@antv/g2';\n\n const chart = new Chart({\n container: 'root',\n });\n\n chart.options({\n type: 'interval',\n autoFit: true,\n data: [\n { grade: '\u4E00\u5E74\u7EA7', count: 200 },\n { grade: '\u4E8C\u5E74\u7EA7', count: 250 },\n { grade: '\u4E09\u5E74\u7EA7', count: 300 },\n { grade: '\u56DB\u5E74\u7EA7', count: 350 },\n ],\n encode: { x: 'grade', y: 'count' },\n });\n\n chart.render();\n "
|
|
8
|
+
},
|
|
9
|
+
"/index.html": {
|
|
10
|
+
code: "<!DOCTYPE html>\n<html>\n<head>\n <title>Vanilla JS Example</title>\n</head>\n<body>\n <div id=\"root\"></div>\n <div id=\"container\"></div>\n <script src=\"index.js\"></script>\n</body>\n</html>"
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export var code = {
|
|
14
|
+
modules: {
|
|
15
|
+
// package.json 文件是必须要的,其中 name, version, main, dependencies 必填
|
|
16
|
+
'/package.json': {
|
|
17
|
+
fpath: '/package.json',
|
|
18
|
+
code: "{\n \"name\": \"dark-card-app\",\n \"version\": \"1.0.0\",\n \"private\": true,\n \"dependencies\": {\n \"@ant-design/icons\": \"^5.2.6\",\n \"@alipay/bigfish\": \"^4.3.0\"\n },\n\"main\": \"src/index.jsx\"\n}\n"
|
|
19
|
+
},
|
|
20
|
+
// 入口文件默认是 /src/index.tsx,也可以配合 package.json main 字段指定其他入口
|
|
21
|
+
'/src/index.jsx': {
|
|
22
|
+
fpath: '/src/index.jsx',
|
|
23
|
+
code: "import React from '@alipay/bigfish/react';\n import ReactDOM from '@alipay/bigfish/react-dom';\nimport { ConfigProvider, theme } from '@alipay/bigfish/antd';\nimport App from './App';\nReactDOM.createRoot(document.getElementById('root')).render(\n <React.StrictMode>\n <ConfigProvider\n theme={{\n algorithm: theme.darkAlgorithm,\n token: {\n colorBgContainer: '#141414',\n colorBorderSecondary: '#303030',\n }\n }}\n >\n <App />\n </ConfigProvider>\n </React.StrictMode>\n);\n"
|
|
24
|
+
},
|
|
25
|
+
'/src/App.jsx': {
|
|
26
|
+
fpath: '/src/App.jsx',
|
|
27
|
+
code: "import React from '@alipay/bigfish/react';\nimport { Card, Avatar, Typography, Space } from '@alipay/bigfish/antd';\nimport { UserOutlined, ClockCircleOutlined, HeartOutlined, MessageOutlined } from '@ant-design/icons';\nimport './App.less';\nimport {styled} from '@alipay/bigfish';\nconst Title = styled.div`\n color: palevioletred;\n`;\n\nconst { Text } = Typography;\n\nconst DarkCard = () => {\n return (\n <div className=\"dark-card-container\">\n <Card\n className=\"dark-card\"\n cover={\n <div className=\"card-cover\">\n <div className=\"cover-image-placeholder\" />\n </div>\n }\n actions={[\n <Space key=\"time\">\n <ClockCircleOutlined />\n <Text className=\"action-text\">2 hours ago</Text>\n </Space>,\n <Space key=\"likes\">\n <HeartOutlined />\n <Text className=\"action-text\">128</Text>\n </Space>,\n <Space key=\"comments\">\n <MessageOutlined />\n <Text className=\"action-text\">24</Text>\n </Space>\n ]}\n >\n <Card.Meta\n avatar={<Avatar size={40} icon={<UserOutlined />} />}\n title={<Title>Dark Theme Card</Title>}\n description={\n <Text className=\"card-description\">\n This is a dark themed card with modern design elements.\n Perfect for displaying content in low-light interfaces.\n </Text>\n }\n />\n </Card>\n </div>\n );\n};\n\nexport default DarkCard;\n"
|
|
28
|
+
},
|
|
29
|
+
'/src/App.less': {
|
|
30
|
+
fpath: '/src/App.less',
|
|
31
|
+
code: ".dark-card-container {\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 100vh;\n background-color: #0a0a0a;\n padding: 20px;\n}\n\n.dark-card {\n width: 100%;\n max-width: 400px;\n border-radius: 12px;\n overflow: hidden;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);\n\n .ant-card-head {\n border-bottom: 1px solid #303030;\n }\n\n .ant-card-actions {\n background: #1a1a1a;\n border-top: 1px solid #303030;\n\n > li {\n border-right: 1px solid #303030 !important;\n }\n }\n}\n\n.card-cover {\n height: 200px;\n background: linear-gradient(135deg, #2c2c2c, #1a1a1a);\n position: relative;\n overflow: hidden;\n\n .cover-image-placeholder {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background:\n radial-gradient(circle at center, #3a3a3a 0%, #1f1f1f 100%);\n }\n}\n\n.card-description {\n color: rgba(255, 255, 255, 0.65) !important;\n}\n\n.action-text {\n color: rgba(255, 255, 255, 0.45) !important;\n font-size: 12px;\n}\n"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SessionLayout } from "./components/SessionLayout";
|
|
3
|
+
import MsgBox from "./components/MsgBox";
|
|
4
|
+
import TaskBox from "./components/TaskBox";
|
|
5
|
+
import Header from "dumi/theme/slots/Header";
|
|
6
|
+
import styles from "./index.module.less";
|
|
7
|
+
function AIPlayground() {
|
|
8
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
9
|
+
className: styles.aiPlayground
|
|
10
|
+
}, /*#__PURE__*/React.createElement(Header, null), /*#__PURE__*/React.createElement(SessionLayout, null, /*#__PURE__*/React.createElement(MsgBox, null), /*#__PURE__*/React.createElement(TaskBox, null)));
|
|
11
|
+
}
|
|
12
|
+
export default AIPlayground;
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
pre[class*='language-'] {
|
|
80
|
-
background-color: rgba(0, 0, 0,
|
|
80
|
+
background-color: rgba(0, 0, 0, 3%);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
code[class*='language-'] {
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
table th {
|
|
156
156
|
color: #5c6b77;
|
|
157
157
|
font-weight: 500;
|
|
158
|
-
background: rgba(0, 0, 0,
|
|
158
|
+
background: rgba(0, 0, 0, 2%);
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
table th,
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
width: 20%;
|
|
175
175
|
font-weight: 500;
|
|
176
176
|
background: #fcfcfc;
|
|
177
|
-
color: rgba(0, 0, 0,
|
|
177
|
+
color: rgba(0, 0, 0, 85%);
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
blockquote {
|
|
@@ -197,15 +197,16 @@
|
|
|
197
197
|
|
|
198
198
|
.layout {
|
|
199
199
|
margin: 24px 0 32px;
|
|
200
|
+
|
|
200
201
|
:global {
|
|
201
202
|
.ant-layout-content {
|
|
202
|
-
background-color: #
|
|
203
|
+
background-color: #fff;
|
|
203
204
|
}
|
|
204
205
|
}
|
|
205
206
|
}
|
|
206
207
|
|
|
207
208
|
.main {
|
|
208
|
-
background-color: #
|
|
209
|
+
background-color: #fff;
|
|
209
210
|
width: calc(100% - @toc-width);
|
|
210
211
|
padding-left: 48px;
|
|
211
212
|
padding-right: 24px;
|
|
@@ -248,7 +249,6 @@
|
|
|
248
249
|
background: #fff;
|
|
249
250
|
max-height: 100vh;
|
|
250
251
|
overflow: hidden;
|
|
251
|
-
|
|
252
252
|
position: sticky;
|
|
253
253
|
top: 0;
|
|
254
254
|
padding: 8px 0;
|
|
@@ -288,6 +288,7 @@
|
|
|
288
288
|
|
|
289
289
|
.affix {
|
|
290
290
|
background-color: #fff;
|
|
291
|
+
|
|
291
292
|
& > div {
|
|
292
293
|
height: 100%;
|
|
293
294
|
}
|
|
@@ -325,7 +326,7 @@
|
|
|
325
326
|
justify-content: center;
|
|
326
327
|
align-items: center;
|
|
327
328
|
background: #fff;
|
|
328
|
-
box-shadow: 2px 0 8px rgba(0, 0, 0,
|
|
329
|
+
box-shadow: 2px 0 8px rgba(0, 0, 0, 15%);
|
|
329
330
|
border-radius: 0 4px 4px 0;
|
|
330
331
|
}
|
|
331
332
|
}
|
|
@@ -401,7 +402,7 @@
|
|
|
401
402
|
&:hover > div {
|
|
402
403
|
transform: translateY(-4px);
|
|
403
404
|
border-color: transparent;
|
|
404
|
-
box-shadow: 0 6px 16px rgba(107, 147, 224,
|
|
405
|
+
box-shadow: 0 6px 16px rgba(107, 147, 224, 14%);
|
|
405
406
|
}
|
|
406
407
|
|
|
407
408
|
h4 {
|
|
@@ -455,7 +456,7 @@
|
|
|
455
456
|
:global {
|
|
456
457
|
.SplitPane {
|
|
457
458
|
overflow: auto;
|
|
458
|
-
left:
|
|
459
|
+
left: 0;
|
|
459
460
|
height: calc(100vh - 64px) !important;
|
|
460
461
|
}
|
|
461
462
|
|
|
@@ -603,10 +604,9 @@
|
|
|
603
604
|
}
|
|
604
605
|
|
|
605
606
|
.backTop {
|
|
606
|
-
transition: color 0.3s;
|
|
607
607
|
color: #868484;
|
|
608
608
|
background-color: #fff;
|
|
609
|
-
box-shadow: 0 3px 6px -4px rgba(0, 0, 0,
|
|
609
|
+
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%);
|
|
610
610
|
transition: color 0.3s;
|
|
611
611
|
width: 44px;
|
|
612
612
|
height: 44px;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
position: relative;
|
|
7
7
|
padding: 0;
|
|
8
8
|
overflow: hidden;
|
|
9
|
-
background: rgba(250, 251, 252,
|
|
9
|
+
background: rgba(250, 251, 252, 100%);
|
|
10
10
|
|
|
11
11
|
.slider {
|
|
12
12
|
.container1440();
|
|
@@ -38,22 +38,22 @@
|
|
|
38
38
|
.appTitle {
|
|
39
39
|
font-size: 1.2857em;
|
|
40
40
|
font-weight: 500;
|
|
41
|
-
margin: 48px 0 0
|
|
41
|
+
margin: 48px 0 0;
|
|
42
42
|
position: relative;
|
|
43
43
|
height: min-content;
|
|
44
|
-
color: rgba(0, 0, 0,
|
|
44
|
+
color: rgba(0, 0, 0, 100%);
|
|
45
45
|
user-select: text;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
.appDescription {
|
|
49
|
-
color: rgba(105, 123, 140,
|
|
49
|
+
color: rgba(105, 123, 140, 60%);
|
|
50
50
|
font-size: 1em;
|
|
51
|
-
margin: 16px 0 0
|
|
51
|
+
margin: 16px 0 0;
|
|
52
52
|
user-select: text;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
.detailWrapper {
|
|
56
|
-
margin: 20px 0 0
|
|
56
|
+
margin: 20px 0 0;
|
|
57
57
|
|
|
58
58
|
.detail {
|
|
59
59
|
color: var(--primary-color);
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
|
|
82
82
|
&:hover {
|
|
83
83
|
border: 1px solid #ced4d9;
|
|
84
|
-
fill: #
|
|
84
|
+
fill: #000;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
&:hover :only-child {
|
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
bottom: 100px;
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
.slick-dots li.slick-active button
|
|
231
|
+
.slick-dots li.slick-active button::before {
|
|
232
232
|
opacity: 1;
|
|
233
233
|
color: #1890ff;
|
|
234
234
|
}
|
|
@@ -14,17 +14,18 @@
|
|
|
14
14
|
margin-bottom: 5%;
|
|
15
15
|
position: relative;
|
|
16
16
|
.container1440();
|
|
17
|
+
|
|
17
18
|
padding-left: 4.5%;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
.title {
|
|
21
22
|
font-size: 2.714em;
|
|
22
23
|
font-weight: 500;
|
|
23
|
-
margin: 118px 0 0
|
|
24
|
+
margin: 118px 0 0;
|
|
24
25
|
position: relative;
|
|
25
26
|
height: min-content;
|
|
26
27
|
text-align: center;
|
|
27
|
-
color: rgba(0, 0, 0,
|
|
28
|
+
color: rgba(0, 0, 0, 100%);
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
.companiesContainer {
|
|
@@ -73,7 +74,7 @@
|
|
|
73
74
|
.wrapper {
|
|
74
75
|
.title {
|
|
75
76
|
font-size: 1.9rem;
|
|
76
|
-
margin: 98px 0 0
|
|
77
|
+
margin: 98px 0 0;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
.content {
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
|
|
18
18
|
.title {
|
|
19
19
|
font-size: 1.714em;
|
|
20
|
-
color: #000;
|
|
21
20
|
margin-top: 28px;
|
|
22
21
|
margin-bottom: 11px;
|
|
23
22
|
font-family: AlibabaPuHuiTiM;
|
|
@@ -29,7 +28,7 @@
|
|
|
29
28
|
.description {
|
|
30
29
|
opacity: 0.6;
|
|
31
30
|
width: 100%;
|
|
32
|
-
color: rgba(105, 123, 140,
|
|
31
|
+
color: rgba(105, 123, 140, 100%);
|
|
33
32
|
font-size: 1em;
|
|
34
33
|
line-height: 1.8em;
|
|
35
34
|
margin-top: 11px;
|
|
@@ -42,7 +41,7 @@
|
|
|
42
41
|
.cards {
|
|
43
42
|
.cardWrapper {
|
|
44
43
|
.card {
|
|
45
|
-
margin: 84px 19px 80px
|
|
44
|
+
margin: 84px 19px 80px;
|
|
46
45
|
|
|
47
46
|
.content {
|
|
48
47
|
.icon {
|
|
@@ -56,8 +55,8 @@
|
|
|
56
55
|
|
|
57
56
|
.description {
|
|
58
57
|
font-size: 1em;
|
|
59
|
-
padding-bottom:
|
|
60
|
-
padding-top:
|
|
58
|
+
padding-bottom: 0;
|
|
59
|
+
padding-top: 0;
|
|
61
60
|
margin-top: 12px;
|
|
62
61
|
}
|
|
63
62
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
.title {
|
|
23
23
|
font-weight: 500;
|
|
24
|
-
margin: 17px 0 0
|
|
24
|
+
margin: 17px 0 0;
|
|
25
25
|
position: relative;
|
|
26
26
|
font-family: AlibabaPuHuiTiB;
|
|
27
27
|
font-size: 40px;
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
display: flex;
|
|
53
53
|
justify-content: center;
|
|
54
54
|
width: 100%;
|
|
55
|
-
background-color: #
|
|
55
|
+
background-color: #fff;
|
|
56
56
|
border: 1px solid #e5e8ef;
|
|
57
|
-
box-shadow: 0 8px 20px 0 rgba(0, 0, 0,
|
|
57
|
+
box-shadow: 0 8px 20px 0 rgba(0, 0, 0, 3%);
|
|
58
58
|
border-radius: 16px;
|
|
59
59
|
overflow: hidden;
|
|
60
60
|
}
|
|
@@ -77,12 +77,12 @@
|
|
|
77
77
|
|
|
78
78
|
.cardWrapper {
|
|
79
79
|
flex: none;
|
|
80
|
-
margin: 0 0 28px
|
|
80
|
+
margin: 0 0 28px;
|
|
81
81
|
width: 100%;
|
|
82
82
|
max-width: 100%;
|
|
83
83
|
|
|
84
84
|
&:last-child {
|
|
85
|
-
margin: 0 0 30px
|
|
85
|
+
margin: 0 0 30px;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
}
|