release: v0.17.0
GitHub Pages / build (push) Canceled after 0s
GitHub Pages / deploy (push) Canceled after 0s
Docker image / meta (push) Successful in 24s
Docs Docker image / meta (push) Successful in 7s
Docker image / build (amd64, linux/amd64, ubuntu-latest) (push) Failing after 59s
Docs Docker image / build (amd64, linux/amd64, ubuntu-latest) (push) Failing after 30s
Docker image / merge (push) Canceled after 0s
Docs Docker image / merge (push) Canceled after 0s
Docker image / build (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
Docs Docker image / build (arm64, linux/arm64, ubuntu-24.04-arm) (push) Canceled after 0s
@@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "infinite-canvas-local",
|
|
||||||
"interface": {
|
|
||||||
"displayName": "Infinite Canvas"
|
|
||||||
},
|
|
||||||
"plugins": [
|
|
||||||
{
|
|
||||||
"name": "infinite-canvas",
|
|
||||||
"source": {
|
|
||||||
"source": "local",
|
|
||||||
"path": "./plugins/infinite-canvas"
|
|
||||||
},
|
|
||||||
"policy": {
|
|
||||||
"installation": "AVAILABLE",
|
|
||||||
"authentication": "ON_INSTALL"
|
|
||||||
},
|
|
||||||
"category": "Productivity"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
name: Publish Official Plugins
|
|
||||||
|
|
||||||
# 构建官方插件并把产物(bundle + 清单)强推到孤儿分支 plugins-dist。
|
|
||||||
# 与 github-pages.yml 一致,在打版本 tag 时触发 —— 发版时 web 与官方插件一起发布。
|
|
||||||
# 前端经 jsDelivr 从该分支远程拉取;构建产物不进 main、不进 git。
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags: ["v*"]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: publish-plugins
|
|
||||||
cancel-in-progress: false
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
publish:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 22
|
|
||||||
|
|
||||||
- name: Install build dependencies
|
|
||||||
working-directory: plugins/canvas/registry
|
|
||||||
run: npm install --no-audit --no-fund
|
|
||||||
|
|
||||||
- name: Build official plugins
|
|
||||||
working-directory: plugins/canvas/registry
|
|
||||||
run: npm run build
|
|
||||||
|
|
||||||
- name: Publish to plugins-dist branch
|
|
||||||
working-directory: plugins/canvas/registry/dist
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
git init -q
|
|
||||||
git config user.name "github-actions[bot]"
|
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
||||||
git checkout -q -b plugins-dist
|
|
||||||
git add -A
|
|
||||||
git commit -q -m "publish official plugins @ ${GITHUB_SHA::7}"
|
|
||||||
git push -f "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" plugins-dist
|
|
||||||
@@ -2,6 +2,15 @@
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
## v0.17.0
|
||||||
|
|
||||||
|
+ [新增] 拉取 TDesign React 后台模板至 `admin/`,通过统一的 3000 端口提供前台 `/` 和后台 `/admin/`,并补充一体化开发与构建脚本。
|
||||||
|
+ [调整] 移除右上角 GitHub 入口及其前端组件代码。
|
||||||
|
+ [调整] 项目品牌统一为 MiragenFlow / 元境幻生,同步更新前端标题、配置与导出标识、WebDAV 默认目录、本地存储命名空间和内部插件 SDK scope。
|
||||||
|
+ [调整] 收缩产品范围,移除独立图片/视频工作台、全部视频能力、远程提示词、Local Agent/Codex/MCP/Skill、Codex App 与远程插件市场,保留首页、项目库、无限画布、资产库、图文音生成、图片工具、WebDAV 和内部插件 SDK。
|
||||||
|
+ [优化] 同步收缩后的文档导航、插件 SDK 说明和前端依赖,移除已下线功能的死链与构建依赖。
|
||||||
|
+ [修复] 统一开发启动时强制重建后台 Vite 依赖缓存,避免后台入口因过期预构建依赖返回 504 进入白屏。
|
||||||
|
|
||||||
## v0.16.0 - 2026-08-18
|
## v0.16.0 - 2026-08-18
|
||||||
|
|
||||||
+ [新增] 提示词来源新增 Freestylefly GPT Image 2 内置来源。
|
+ [新增] 提示词来源新增 Freestylefly GPT Image 2 内置来源。
|
||||||
|
|||||||
@@ -9,10 +9,20 @@ COPY CHANGELOG.md /app/CHANGELOG.md
|
|||||||
COPY web ./
|
COPY web ./
|
||||||
RUN bun run build
|
RUN bun run build
|
||||||
|
|
||||||
|
# 构建后台管理端。它最终与前台一起由同一个 Nginx 端口提供服务。
|
||||||
|
FROM oven/bun:1.3.13 AS admin-build
|
||||||
|
|
||||||
|
WORKDIR /app/admin
|
||||||
|
COPY admin/package.json admin/package-lock.json ./
|
||||||
|
RUN npm ci --ignore-scripts
|
||||||
|
COPY admin ./
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
# 运行镜像:只启动静态前端,AI 请求由浏览器前台直连用户自己的接口。
|
# 运行镜像:只启动静态前端,AI 请求由浏览器前台直连用户自己的接口。
|
||||||
FROM nginx:1.27-alpine
|
FROM nginx:1.27-alpine
|
||||||
|
|
||||||
COPY --from=web-build /app/web/dist /usr/share/nginx/html
|
COPY --from=web-build /app/web/dist /usr/share/nginx/html
|
||||||
|
COPY --from=admin-build /app/admin/dist /usr/share/nginx/html/admin
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
COPY web/docker-entrypoint.sh /docker-entrypoint.d/40-runtime-config.sh
|
COPY web/docker-entrypoint.sh /docker-entrypoint.d/40-runtime-config.sh
|
||||||
RUN chmod +x /docker-entrypoint.d/40-runtime-config.sh
|
RUN chmod +x /docker-entrypoint.d/40-runtime-config.sh
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<img src="web/public/logo.svg" width="96" alt="infinite-canvas logo">
|
<img src="web/public/logo.svg" width="96" alt="MiragenFlow logo">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1 align="center">无限画布 (infinite-canvas)</h1>
|
<h1 align="center">元境幻生 (MiragenFlow)</h1>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://linux.do/"><img src="https://img.shields.io/badge/Linux.do-Community-2b6de8?style=flat-square" alt="Linux.do"></a>
|
<a href="https://linux.do/"><img src="https://img.shields.io/badge/Linux.do-Community-2b6de8?style=flat-square" alt="Linux.do"></a>
|
||||||
@@ -19,10 +19,10 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="docs/content/docs/overview/quick-start.mdx">快速开始</a> · <a href="docs/content/docs/overview/features.mdx">功能介绍</a> · <a href="docs/content/docs/overview/render.mdx">Render 部署</a> · <a href="docs/content/docs/overview/docker.mdx">Docker 部署</a> · <a href="docs/content/docs/canvas/canvas-node-manual.mdx">画布节点操作手册</a> · <a href="docs/content/docs/canvas/canvas-shortcuts.mdx">画布快捷键</a> · <a href="SECURITY.md">漏洞提交</a> · <a href="docs/content/docs/progress/todo.mdx">待办事项</a> · <a href="canvas-agent/README.md">本地 Canvas Agent</a> · <a href="plugins/infinite-canvas">Codex app 插件</a>
|
<a href="docs/content/docs/overview/quick-start.mdx">快速开始</a> · <a href="docs/content/docs/overview/features.mdx">功能介绍</a> · <a href="docs/content/docs/overview/render.mdx">Render 部署</a> · <a href="docs/content/docs/overview/docker.mdx">Docker 部署</a> · <a href="docs/content/docs/canvas/canvas-node-manual.mdx">画布节点操作手册</a> · <a href="docs/content/docs/canvas/canvas-shortcuts.mdx">画布快捷键</a> · <a href="SECURITY.md">漏洞提交</a> · <a href="docs/content/docs/progress/todo.mdx">待办事项</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
无限画布是一款面向图片创作的开源工作台。它把画布编排、AI 图片生成、参考图编辑、对话助手、提示词库和素材沉淀放在同一个界面里,适合用来探索视觉方案并连续迭代图片结果。
|
元境幻生是一款面向图片、文本和音频创作的开源工作台。它把无限画布编排、AI 生成、图片编辑和资产沉淀放在同一个界面里,适合连续探索视觉方案并管理生成结果。
|
||||||
|
|
||||||
> [!CAUTION]
|
> [!CAUTION]
|
||||||
> 项目目前处于开发阶段,不保证历史数据兼容。各种本地存储格式都可能直接调整,欢迎关注后续更新。
|
> 项目目前处于开发阶段,不保证历史数据兼容。各种本地存储格式都可能直接调整,欢迎关注后续更新。
|
||||||
@@ -34,10 +34,10 @@
|
|||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="190" align="center">
|
<td width="190" align="center">
|
||||||
<a href="https://www.atlascloud.ai/zh?utm_source=github&utm_medium=link&utm_campaign=infinite-canvas" target="_blank" rel="noopener noreferrer"><img src="assets/atlascloud.svg" width="163" alt="Atlas Cloud"></a>
|
<a href="https://www.atlascloud.ai/zh?utm_source=github&utm_medium=link&utm_campaign=miragenflow" target="_blank" rel="noopener noreferrer"><img src="assets/atlascloud.svg" width="163" alt="Atlas Cloud"></a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="https://www.atlascloud.ai/zh?utm_source=github&utm_medium=link&utm_campaign=infinite-canvas" target="_blank" rel="noopener noreferrer">Atlas Cloud</a> is a full-modal AI inference platform that gives developers a single AI API to access video generation, image generation, and LLM APIs. Instead of managing multiple vendor integrations, you connect once and get unified access to 300+ curated models across all modalities. Check out <a href="https://www.atlascloud.ai/console/coding-plan" target="_blank" rel="noopener noreferrer">Atlas Cloud's new coding plan promotion</a> for more budget-friendly API access.
|
<a href="https://www.atlascloud.ai/zh?utm_source=github&utm_medium=link&utm_campaign=miragenflow" target="_blank" rel="noopener noreferrer">Atlas Cloud</a> provides a unified AI API for image, text, and other model services. Instead of managing multiple vendor integrations, you connect once to access a broad model catalog. Check out <a href="https://www.atlascloud.ai/console/coding-plan" target="_blank" rel="noopener noreferrer">Atlas Cloud's coding plan</a> for budget-friendly API access.
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
<a href="https://metaso.cn/minimax-h3/?s=inf" target="_blank" rel="noopener noreferrer"><img src="assets/metaso.jpg" width="163" alt="秘塔科技"></a>
|
<a href="https://metaso.cn/minimax-h3/?s=inf" target="_blank" rel="noopener noreferrer"><img src="assets/metaso.jpg" width="163" alt="秘塔科技"></a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<strong>MiniMax H3 视频生成 API|秘塔科技</strong> 秘塔科技提供高性价比的 MiniMax H3 视频生成服务:<strong>768P 仅 0.09 元/秒,2K 仅 0.15 元/秒</strong>。支持原生 2K、音画同步,API 兼容 <strong>OpenAI 协议</strong>,同时支持 <strong>ComfyUI</strong>,无需自行部署 GPU。 🎁 通过 <a href="https://metaso.cn/minimax-h3/?s=inf" target="_blank" rel="noopener noreferrer">无限画布专属链接注册</a>,即可领取赠送额度及专属优惠。
|
<strong>AI API 服务|秘塔科技</strong> 提供兼容 <strong>OpenAI 协议</strong> 的模型 API 服务,适合接入图片、文本和音频创作流程。通过 <a href="https://metaso.cn/minimax-h3/?s=inf" target="_blank" rel="noopener noreferrer">专属链接</a> 注册可领取优惠。
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -53,21 +53,20 @@
|
|||||||
<a href="https://infistar.ai/register?aff=4X3V9NA9&ref_source=link" target="_blank" rel="noopener noreferrer"><img src="assets/infistar.png" width="163" alt="Infistar.ai 无限星河"></a>
|
<a href="https://infistar.ai/register?aff=4X3V9NA9&ref_source=link" target="_blank" rel="noopener noreferrer"><img src="assets/infistar.png" width="163" alt="Infistar.ai 无限星河"></a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<strong>无限画布 × Infistar.ai 无限星河|内置原生画布 · 全能多模态 API</strong> 💡 原生集成,即点即用: Infistar.ai 已原生上架无限画布!同时提供低至官方 1 折的稳定 API 中转服务,模型倍率与调用明细全程透明。 🎨 多模态生图/生视频: 完美适配 Seedance、FLUX、Midjourney、Sora、Runway、Luma、可灵(Kling)等顶级图片与视频大模型。 🧠 全系语言模型: 覆盖 OpenAI、Claude、Gemini、Grok、DeepSeek、Qwen、GLM 等国内外主流模型,兼容 OpenAI 标准接口。 ⚡ 动态调度: 多路供应保障高可用,拒绝断连。 🎁 专属福利: 通过 <a href="https://infistar.ai/register?aff=4X3V9NA9&ref_source=link" target="_blank" rel="noopener noreferrer">专属链接</a> 注册,立享赠送额度/专属折扣/首充权益!
|
<strong>元境幻生 × Infistar.ai 无限星河|多模态 API</strong> 💡 提供兼容 OpenAI 标准接口的图片、文本和音频模型服务,支持透明的模型倍率与调用明细。通过 <a href="https://infistar.ai/register?aff=4X3V9NA9&ref_source=link" target="_blank" rel="noopener noreferrer">专属链接</a> 注册可享优惠。
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
## 核心功能
|
## 核心功能
|
||||||
|
|
||||||
- 无限画布:多画布项目、节点拖拽缩放、连线、小地图、撤销重做、导入导出。
|
- 首页与项目库:保留网站首页、多画布项目管理、导入导出和项目删除。
|
||||||
- AI 创作:浏览器前台直连你配置的 OpenAI 兼容接口,支持文生图、图生图、参考图编辑、文本问答、音频和视频生成。
|
- 无限画布:节点拖拽缩放、连线、分组、小地图、撤销重做和多种画布背景。
|
||||||
- 画布助手:围绕选中节点和上游节点对话、生图,并把结果插回画布。
|
- AI 创作:浏览器直连用户配置的接口,支持图片、文本和音频生成以及参考图编辑。
|
||||||
- 本地 Agent:通过本机 Canvas Agent 连接 Codex / Claude Code,让 Agent 通过 MCP 操作当前画布;
|
- 图片工具:反推提示词、多角度生成、裁剪、遮罩编辑、切分和本地放大。
|
||||||
- Codex App 插件:提供 Codex app 插件,安装后会自动注册 MCP 并尝试拉起本地 Agent。
|
- 资产与同步:本地资产库支持文本和图片;WebDAV 可同步画布、资产及图片/音频文件。
|
||||||
- 插件系统:支持通过 URL 动态安装 / 启用 / 更新 / 卸载远程节点插件,并提供 TypeScript SDK 自行开发画布节点插件。
|
- 模型配置:支持多渠道、默认模型、配置导入导出,以及图片、文本和音频自定义调用脚本。
|
||||||
- 自定义接口调用:可自定义生图 / 视频接口的调用方式,灵活适配各类中转站与自建服务。
|
- 内部插件能力:保留画布节点注册、运行时和 TypeScript SDK,供项目内部构建扩展节点。
|
||||||
- 提示词库:浏览器前端直连多个 GitHub 开源项目,并缓存到 IndexedDB。
|
|
||||||
|
|
||||||
完整功能说明见 [功能介绍](docs/content/docs/overview/features.mdx)。
|
完整功能说明见 [功能介绍](docs/content/docs/overview/features.mdx)。
|
||||||
|
|
||||||
@@ -75,18 +74,21 @@
|
|||||||
|
|
||||||
## 快速开始
|
## 快速开始
|
||||||
|
|
||||||
AI API Key、Base URL、画布、素材和生成记录默认保存在浏览器本地。
|
AI API Key、Base URL、画布和资产默认保存在浏览器本地,也可以使用 WebDAV 保存画布资产文件。
|
||||||
|
|
||||||
### 本地开发
|
### 本地开发
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone git@github.com:basketikun/infinite-canvas.git
|
git clone git@github.com:basketikun/infinite-canvas.git
|
||||||
cd infinite-canvas
|
cd infinite-canvas
|
||||||
|
npm --prefix admin install --ignore-scripts
|
||||||
cd web
|
cd web
|
||||||
bun install
|
bun install
|
||||||
bun run dev
|
bun run dev:all
|
||||||
```
|
```
|
||||||
|
|
||||||
|
统一入口为 `http://localhost:3000`:前台访问 `/`,后台管理台访问 `/admin/`。
|
||||||
|
|
||||||
### Docker 运行
|
### Docker 运行
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -95,11 +97,11 @@ cd infinite-canvas
|
|||||||
docker compose up -d
|
docker compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
运行后默认端口3000,可访问 `http://localhost:3000`。
|
运行后默认只使用 3000 端口,可访问 `http://localhost:3000`;后台管理台位于 `http://localhost:3000/admin/`。
|
||||||
|
|
||||||
首次打开后进入右上角配置,填入自己的 OpenAI 兼容 `Base URL` 和 `API Key`。
|
首次打开后进入右上角配置,填入自己的 OpenAI 兼容 `Base URL` 和 `API Key`。
|
||||||
|
|
||||||
如果默认的OpenAI接口调用方式与您的API不同,可自定义生图/视频脚本调用。
|
如果默认的 OpenAI 接口调用方式与您的 API 不同,可自定义图片、文本或音频脚本调用。
|
||||||
|
|
||||||
## 效果展示
|
## 效果展示
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Supported Versions
|
## Supported Versions
|
||||||
|
|
||||||
infinite-canvas is in active development. Security fixes are accepted for the
|
MiragenFlow is in active development. Security fixes are accepted for the
|
||||||
`main` branch and the latest tagged release. Older versions may be handled on a
|
`main` branch and the latest tagged release. Older versions may be handled on a
|
||||||
best-effort basis.
|
best-effort basis.
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ Preferred reporting channels:
|
|||||||
1. Use GitHub private vulnerability reporting or a GitHub Security Advisory for
|
1. Use GitHub private vulnerability reporting or a GitHub Security Advisory for
|
||||||
this repository, if available.
|
this repository, if available.
|
||||||
2. If a private GitHub report is not available, email `1844025705@qq.com` with
|
2. If a private GitHub report is not available, email `1844025705@qq.com` with
|
||||||
the subject `[infinite-canvas security]`.
|
the subject `[MiragenFlow security]`.
|
||||||
3. If neither private channel is available, open a public issue that asks for a
|
3. If neither private channel is available, open a public issue that asks for a
|
||||||
private contact channel and does not include technical exploit details.
|
private contact channel and does not include technical exploit details.
|
||||||
|
|
||||||
@@ -77,4 +77,3 @@ this community project.
|
|||||||
|
|
||||||
Please allow time for investigation and remediation before publishing details.
|
Please allow time for investigation and remediation before publishing details.
|
||||||
Credit will be given on request unless you prefer to remain anonymous.
|
Credit will be given on request unless you prefer to remain anonymous.
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# indicate this is the root of the project
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
VITE_BASE_URL=/admin/
|
||||||
|
NODE_ENV=development
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
build
|
||||||
|
mock
|
||||||
|
config
|
||||||
|
public
|
||||||
|
scripts
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
extends: [
|
||||||
|
'airbnb-base',
|
||||||
|
'prettier',
|
||||||
|
'plugin:react/recommended',
|
||||||
|
'plugin:import/typescript',
|
||||||
|
'plugin:@typescript-eslint/recommended',
|
||||||
|
],
|
||||||
|
plugins: ['eslint-plugin-prettier'],
|
||||||
|
parser: '@typescript-eslint/parser',
|
||||||
|
env: {
|
||||||
|
jest: true,
|
||||||
|
},
|
||||||
|
settings: {
|
||||||
|
react: {
|
||||||
|
version: 'detect',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
'no-shadow': 'off',
|
||||||
|
'no-param-reassign': ['error', { props: false }],
|
||||||
|
'no-console': 'off',
|
||||||
|
'no-plusplus': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
allowForLoopAfterthoughts: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'react/display-name': 'off',
|
||||||
|
// jsx 单引号
|
||||||
|
'jsx-quotes': [2, 'prefer-single'],
|
||||||
|
'import/no-cycle': 'off', // TODO: remove
|
||||||
|
'import/extensions': 'off',
|
||||||
|
'import/no-unresolved': 'off',
|
||||||
|
'import/order': 'off',
|
||||||
|
'import/prefer-default-export': 'off',
|
||||||
|
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
|
||||||
|
// 关闭variable必须全部大写规则
|
||||||
|
'@typescript-eslint/naming-convention': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
selector: 'variable',
|
||||||
|
modifiers: ['const'],
|
||||||
|
format: null,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'@typescript-eslint/no-empty-function': 'off',
|
||||||
|
'@typescript-eslint/no-explicit-any': 'off',
|
||||||
|
'@typescript-eslint/ban-types': 'off',
|
||||||
|
// 统一eslint prettier配置
|
||||||
|
'prettier/prettier': [
|
||||||
|
'warn',
|
||||||
|
{},
|
||||||
|
{
|
||||||
|
usePrettierrc: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
name: 反馈 Bug
|
||||||
|
description: 通过 github 模板进行 Bug 反馈。
|
||||||
|
title: "[组件名称] 描述问题的标题"
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
# 欢迎你的参与
|
||||||
|
tdesign-react-starter 的 Issue 列表接受 bug 报告或是新功能请求。也可加入官方社区:<img width="80px" src="https://user-images.githubusercontent.com/15634204/157386871-bf84c2ea-a02f-4c1c-b6fd-577450cdbcf7.png" />
|
||||||
|
|
||||||
|
在发布一个 Issue 前,请确保:
|
||||||
|
- 在 [常见问题](https://tdesign.tencent.com/about/faq)、[更新日志](https://tdesign.tencent.com/about/release) 和 [旧Issue列表](https://github.com/Tencent/tdesign-react-starter/issues?q=is%3Aissue) 中搜索过你的问题。(你的问题可能已有人提出,也可能已在最新版本中被修正)
|
||||||
|
- 如果你发现一个已经关闭的旧 Issue 在最新版本中仍然存在,不要在旧 Issue 下面留言,请建一个新的 issue。
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: version
|
||||||
|
attributes:
|
||||||
|
label: tdesign-react-starter 版本
|
||||||
|
description: 请检查在最新项目版本中能否重现此 issue。
|
||||||
|
placeholder: 请填写
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: reproduce
|
||||||
|
attributes:
|
||||||
|
label: 重现链接
|
||||||
|
description: 请提供尽可能精简的 CodePen、CodeSandbox 或 GitHub 仓库的链接。请不要填无关链接,否则你的 Issue 将被关闭。
|
||||||
|
placeholder: 请填写
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: reproduceSteps
|
||||||
|
attributes:
|
||||||
|
label: 重现步骤
|
||||||
|
description: 请清晰的描述重现该 Issue 的步骤,这能帮助我们快速定位问题。没有清晰重现步骤将不会被修复,标有 'need reproduction' 的 Issue 在 7 天内不提供相关步骤,将被关闭。
|
||||||
|
placeholder: 请填写
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: expect
|
||||||
|
attributes:
|
||||||
|
label: 期望结果
|
||||||
|
placeholder: 请填写
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: actual
|
||||||
|
attributes:
|
||||||
|
label: 实际结果
|
||||||
|
placeholder: 请填写
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: frameworkVersion
|
||||||
|
attributes:
|
||||||
|
label: 框架版本
|
||||||
|
placeholder: Vue(3.2.0)
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: browsersVersion
|
||||||
|
attributes:
|
||||||
|
label: 浏览器版本
|
||||||
|
placeholder: Chrome(8.213.231.123)
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: systemVersion
|
||||||
|
attributes:
|
||||||
|
label: 系统版本
|
||||||
|
placeholder: MacOS(11.2.3)
|
||||||
|
|
||||||
|
- type: input
|
||||||
|
id: nodeVersion
|
||||||
|
attributes:
|
||||||
|
label: Node版本
|
||||||
|
placeholder: 请填写
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: remarks
|
||||||
|
attributes:
|
||||||
|
label: 补充说明
|
||||||
|
description: 可以是遇到这个 bug 的业务场景、上下文等信息。
|
||||||
|
placeholder: 请填写
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
blank_issues_enabled: true
|
||||||
|
contact_links:
|
||||||
|
- name: 使用 issue-helper 新建
|
||||||
|
url: https://Tencent.github.io/tdesign/issue-helper/?lang=zh-CN&repo=Tencent/tdesign
|
||||||
|
about: 使用 https://Tencent.github.io/tdesign/issue-helper/ 创建 issue,其中包含 bug 和 feature,表单提交更加严格。
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
name: 反馈新功能
|
||||||
|
description: 通过 github 模板进行新功能反馈。
|
||||||
|
title: "[组件名称] 描述问题的标题"
|
||||||
|
body:
|
||||||
|
- type: markdown
|
||||||
|
attributes:
|
||||||
|
value: |
|
||||||
|
# 欢迎你的参与
|
||||||
|
tdesign-react-starter 的 Issue 列表接受 bug 报告或是新功能请求。也可加入官方社区:<img width="80px" src="https://user-images.githubusercontent.com/15634204/157386871-bf84c2ea-a02f-4c1c-b6fd-577450cdbcf7.png" />
|
||||||
|
|
||||||
|
在发布一个 Issue 前,请确保:
|
||||||
|
- 在 [常见问题](https://tdesign.tencent.com/about/faq)、[更新日志](https://tdesign.tencent.com/about/release) 和 [旧Issue列表](https://github.com/Tencent/tdesign-react-starter/issues?q=is%3Aissue) 中搜索过你的问题。(你的问题可能已有人提出,也可能已在最新版本中被修正)
|
||||||
|
- 如果你发现一个已经关闭的旧 Issue 在最新版本中仍然存在,不要在旧 Issue 下面留言,请建一个新的 issue。
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: functionContent
|
||||||
|
attributes:
|
||||||
|
label: 这个功能解决了什么问题
|
||||||
|
description: 请详尽说明这个需求的用例和场景。最重要的是:解释清楚是怎样的用户体验需求催生了这个功能上的需求。我们将考虑添加在现有 API 无法轻松实现的功能。新功能的用例也应当足够常见。
|
||||||
|
placeholder: 请填写
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
|
|
||||||
|
- type: textarea
|
||||||
|
id: functionalExpectations
|
||||||
|
attributes:
|
||||||
|
label: 你建议的方案是什么
|
||||||
|
placeholder: 请填写
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
<!--
|
||||||
|
首先,感谢你的贡献!😄
|
||||||
|
请阅读并遵循 [TDesign 贡献指南](https://github.com/Tencent/tdesign/blob/main/docs/contributing.md),填写以下 pull request 的信息。
|
||||||
|
PR 在维护者审核通过后会合并,谢谢!
|
||||||
|
-->
|
||||||
|
|
||||||
|
### 🤔 这个 PR 的性质是?
|
||||||
|
|
||||||
|
- [ ] 日常 bug 修复
|
||||||
|
- [ ] 新特性提交
|
||||||
|
- [ ] 文档改进
|
||||||
|
- [ ] 演示代码改进
|
||||||
|
- [ ] 组件样式/交互改进
|
||||||
|
- [ ] CI/CD 改进
|
||||||
|
- [ ] 重构
|
||||||
|
- [ ] 代码风格优化
|
||||||
|
- [ ] 测试用例
|
||||||
|
- [ ] 分支合并
|
||||||
|
- [ ] 其他
|
||||||
|
|
||||||
|
### 🔗 相关 Issue
|
||||||
|
|
||||||
|
<!--
|
||||||
|
1. 描述相关需求的来源,如相关的 issue 讨论链接。
|
||||||
|
-->
|
||||||
|
|
||||||
|
### 💡 需求背景和解决方案
|
||||||
|
|
||||||
|
<!--
|
||||||
|
1. 要解决的具体问题。
|
||||||
|
2. 列出最终的 API 实现和用法。
|
||||||
|
3. 涉及UI/交互变动需要有截图或 GIF。
|
||||||
|
-->
|
||||||
|
|
||||||
|
### 📝 更新日志
|
||||||
|
|
||||||
|
<!--
|
||||||
|
从用户角度描述具体变化,以及可能的 breaking change 和其他风险。
|
||||||
|
-->
|
||||||
|
|
||||||
|
- fix(组件名称): 处理问题或特性描述 ...
|
||||||
|
|
||||||
|
- [ ] 本条 PR 不需要纳入 Changelog
|
||||||
|
|
||||||
|
### ☑️ 请求合并前的自查清单
|
||||||
|
|
||||||
|
⚠️ 请自检并全部**勾选全部选项**。⚠️
|
||||||
|
|
||||||
|
- [ ] 文档已补充或无须补充
|
||||||
|
- [ ] 代码演示已提供或无须提供
|
||||||
|
- [ ] TypeScript 定义已补充或无须补充
|
||||||
|
- [ ] Changelog 已提供或无须提供
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
files.extend-exclude = [
|
||||||
|
"package-lock.json",
|
||||||
|
"src/configs/color.ts"
|
||||||
|
]
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
# Basic dependabot.yml file with
|
||||||
|
# minimum configuration for two package managers
|
||||||
|
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
# Enable version updates for npm
|
||||||
|
- package-ecosystem: "npm"
|
||||||
|
# Look for `package.json` and `lock` files in the `root` directory
|
||||||
|
directory: "/"
|
||||||
|
# Check the npm registry for updates every day (weekdays)
|
||||||
|
schedule:
|
||||||
|
interval: "monthly"
|
||||||
|
|
||||||
|
# Enable version updates for Docker
|
||||||
|
- package-ecosystem: "docker"
|
||||||
|
# Look for a `Dockerfile` in the `root` directory
|
||||||
|
directory: "/"
|
||||||
|
# Check for updates once a week
|
||||||
|
schedule:
|
||||||
|
interval: "monthly"
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
# force copy from tencent/tdesign
|
||||||
|
name: Issue Add Assigness
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [opened, edited]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
mark-duplicate:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: wow-actions/auto-comment@v1
|
||||||
|
with:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
issuesOpened: |
|
||||||
|
👋 @{{ author }},感谢给 TDesign 提出了 issue。
|
||||||
|
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。
|
||||||
|
|
||||||
|
# https://docs.github.com/cn/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#issues
|
||||||
|
- uses: 94dreamer/issue-assignees@main
|
||||||
|
id: assignees
|
||||||
|
with:
|
||||||
|
project_name: ${{github.event.repository.name}}
|
||||||
|
issue_title: ${{github.event.issue.title}}
|
||||||
|
|
||||||
|
- run: echo ${{ steps.assignees.outputs.contributors }}
|
||||||
|
- name: Add assigness
|
||||||
|
if: steps.assignees.outputs.contributors != ''
|
||||||
|
uses: actions-cool/issues-helper@v3
|
||||||
|
with:
|
||||||
|
actions: 'add-assignees'
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
issue-number: ${{ github.event.issue.number }}
|
||||||
|
assignees: ${{ steps.assignees.outputs.contributors }}
|
||||||
|
|
||||||
|
- run: |
|
||||||
|
contributors=${{ steps.assignees.outputs.contributors }}
|
||||||
|
contributorstring=${contributors//,/ @}
|
||||||
|
echo "::set-output name=string::@$contributorstring"
|
||||||
|
id: contributors
|
||||||
|
|
||||||
|
- name: 通知贡献者
|
||||||
|
if: steps.assignees.outputs.contributors != ''
|
||||||
|
uses: TDesignOteam/workflows/actions/maintain-one-comment@main
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
body: |
|
||||||
|
♥️ 有劳 ${{ steps.contributors.outputs.string }} 尽快确认问题。
|
||||||
|
确认有效后将下一步计划和可能需要的时间回复给 @${{ github.event.issue.user.login }} 。
|
||||||
|
<!-- AUTO_ASSIGENEES_NOTIFY_HOOK -->
|
||||||
|
number: ${{ github.event.issue.number }}
|
||||||
|
body-include: "<!-- AUTO_ASSIGENEES_NOTIFY_HOOK -->"
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
# force copy from tencent/tdesign
|
||||||
|
name: Issue Help wanted
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types:
|
||||||
|
- labeled
|
||||||
|
jobs:
|
||||||
|
add-comment:
|
||||||
|
if: github.event.label.name == 'help wanted'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
steps:
|
||||||
|
- name: Add comment
|
||||||
|
uses: peter-evans/create-or-update-comment@v1
|
||||||
|
with:
|
||||||
|
issue-number: ${{ github.event.issue.number }}
|
||||||
|
body: |
|
||||||
|
任何人都可以处理此问题。
|
||||||
|
**请务必在您的 `pull request` 中引用此问题。** :sparkles:
|
||||||
|
感谢你的贡献! :sparkles:
|
||||||
|
reactions: heart
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# force copy from tencent/tdesign
|
||||||
|
# 当在 issue 的 comment 回复类似 `Duplicate of #111` 这样的话,issue 将被自动打上 重复提交标签 并且 cloese
|
||||||
|
name: Issue Mark Duplicate
|
||||||
|
|
||||||
|
on:
|
||||||
|
issue_comment:
|
||||||
|
types: [created, edited]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
mark-duplicate:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: mark-duplicate
|
||||||
|
uses: actions-cool/issues-helper@v2
|
||||||
|
with:
|
||||||
|
actions: "mark-duplicate"
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
duplicate-labels: "duplicate"
|
||||||
|
close-issue: true
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
# force copy from tencent/tdesign
|
||||||
|
# 当被打上 Need Reproduce 标签时候,自动提示需要重现实例
|
||||||
|
|
||||||
|
name: ISSUE_REPLY
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [labeled]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
issue-reply:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Need Reproduce
|
||||||
|
if: github.event.label.name == 'Need Reproduce'
|
||||||
|
uses: actions-cool/issues-helper@v2
|
||||||
|
with:
|
||||||
|
actions: 'create-comment'
|
||||||
|
issue-number: ${{ github.event.issue.number }}
|
||||||
|
body: |
|
||||||
|
你好 @${{ github.event.issue.user.login }}, 我们需要你提供一个在线的重现实例以便于我们帮你排查问题。你可以通过点击 [此处](https://codesandbox.io/) 创建一个 codesandbox 或者提供一个最小化的 GitHub 仓库。请确保选择准确的版本。
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# force copy from tencent/tdesign
|
||||||
|
name: pr-spell-check
|
||||||
|
on: [pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run:
|
||||||
|
name: Spell Check with Typos
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Check spelling
|
||||||
|
uses: crate-ci/typos@master
|
||||||
|
with:
|
||||||
|
config: .github/configs/typos_config.toml
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# 文件名建议统一为 preview-publish
|
||||||
|
# 应用 preview.yml 的 demo
|
||||||
|
name: PREVIEW_PUBLISH
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: ["MAIN_PULL_REQUEST"]
|
||||||
|
types:
|
||||||
|
- completed
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
call-preview:
|
||||||
|
uses: TDesignOteam/workflows/.github/workflows/reusable-pr-preview.yml@main
|
||||||
|
secrets:
|
||||||
|
TDESIGN_SURGE_TOKEN: ${{ secrets.TDESIGN_SURGE_TOKEN }}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# 文件名建议统一为 pull-request.yml
|
||||||
|
# 应用 test-build.yml 的 demo
|
||||||
|
# 要求 package.json 提供 lint test site:preview
|
||||||
|
|
||||||
|
name: MAIN_PULL_REQUEST
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [develop, main, site]
|
||||||
|
types: [opened, synchronize, reopened]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
call-test-build:
|
||||||
|
uses: TDesignOteam/workflows/.github/workflows/reusable-unit-test.yml@main
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
/node_modules
|
||||||
|
/coverage
|
||||||
|
|
||||||
|
# production
|
||||||
|
/dist
|
||||||
|
|
||||||
|
# misc
|
||||||
|
.DS_Store
|
||||||
|
.idea
|
||||||
|
.VSCodeCounter
|
||||||
|
|
||||||
|
# log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
|
||||||
|
# lock 文件 请根据自身项目或团队需求选择具体的包管理工具 并移除具体的ignore的lock文件
|
||||||
|
yarn.lock
|
||||||
|
pnpm-lock.yaml
|
||||||
|
|
||||||
|
# code editor setting
|
||||||
|
/.vscode
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
|
if [[ `uname` == 'Darwin' ]]; then
|
||||||
|
PATH="/usr/local/bin:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
npm run lint:fix
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
module.exports = {
|
||||||
|
printWidth: 120,
|
||||||
|
tabWidth: 2,
|
||||||
|
useTabs: false,
|
||||||
|
semi: true,
|
||||||
|
singleQuote: true,
|
||||||
|
quoteProps: 'as-needed',
|
||||||
|
jsxSingleQuote: true,
|
||||||
|
trailingComma: 'all',
|
||||||
|
bracketSpacing: true,
|
||||||
|
jsxBracketSameLine: false,
|
||||||
|
arrowParens: 'always',
|
||||||
|
rangeStart: 0,
|
||||||
|
rangeEnd: null,
|
||||||
|
requirePragma: false,
|
||||||
|
insertPragma: false,
|
||||||
|
proseWrap: 'preserve',
|
||||||
|
htmlWhitespaceSensitivity: 'css',
|
||||||
|
vueIndentScriptAndStyle: false,
|
||||||
|
endOfLine: 'lf',
|
||||||
|
embeddedLanguageFormatting: 'auto',
|
||||||
|
};
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
|
||||||
|
# Changelog
|
||||||
|
|
||||||
|
## 0.3.1
|
||||||
|
### 🚀 Features
|
||||||
|
|
||||||
|
- 移除所有内置主题色相关代码,全部通过 tvision-color 计算获取 by @uyarn #144
|
||||||
|
|
||||||
|
- 卡片统一默认样式为无边框 by @uyarn #144
|
||||||
|
|
||||||
|
**Full Changelog**: https://github.com/Tencent/tdesign-react-starter/compare/0.3.0...0.3.1
|
||||||
|
|
||||||
|
## 0.3.0
|
||||||
|
❗ Breaking Changes
|
||||||
|
|
||||||
|
- 统一使用`.env`文件区分环境 生产环境改为`release` by @uyarn in https://github.com/Tencent/tdesign-react-starter/pull/136
|
||||||
|
|
||||||
|
🚀 Features
|
||||||
|
|
||||||
|
- 默认路由模式改为`history`路由 by @uyarn in https://github.com/Tencent/tdesign-react-starter/pull/136
|
||||||
|
|
||||||
|
**Full Changelog**: https://github.com/Tencent/tdesign-react-starter/compare/0.2.0...0.3.0
|
||||||
|
|
||||||
|
## 0.2.0
|
||||||
|
### ❗ Breaking Changes
|
||||||
|
|
||||||
|
- 升级组件库依赖至 0.43+ 更新主题色配色方案 by @uyarn in https://github.com/Tencent/tdesign-react-starter/pull/129
|
||||||
|
|
||||||
|
### 🚀 Features
|
||||||
|
|
||||||
|
- 新增自定义颜色面板选择 by @uyarn in https://github.com/Tencent/tdesign-react-starter/pull/129
|
||||||
|
|
||||||
|
### 🐞 Bug Fixes
|
||||||
|
|
||||||
|
- 修复卡片面板的标题丢失的问题 by @uyarn https://github.com/Tencent/tdesign-react-starter/pull/129
|
||||||
|
|
||||||
|
**Full Changelog**: https://github.com/Tencent/tdesign-react-starter/compare/0.1.6...0.2.0
|
||||||
|
|
||||||
|
## 0.1.6
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- 升级组件库依赖至0.42+ 版本
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- 修复部分页面样式展示的缺陷
|
||||||
|
|
||||||
|
- 优化顶部菜单布局
|
||||||
|
|
||||||
|
## 0.1.5
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- 新增卡片列表页 by @xucz in https://github.com/Tencent/tdesign-react-starter/pull/91
|
||||||
|
|
||||||
|
- 菜单路由配置`hidden`和`single`功能 by @xucz in https://github.com/Tencent/tdesign-react-starter/pull/95
|
||||||
|
|
||||||
|
## Bug Fixes
|
||||||
|
|
||||||
|
- 同步DatePicker组件升级的改动 by @uyarn in https://github.com/Tencent/tdesign-react-starter/pull/87
|
||||||
|
|
||||||
|
**Full Changelog**: https://github.com/Tencent/tdesign-react-starter/compare/0.1.4...0.1.5
|
||||||
|
|
||||||
|
## 0.1.4
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- 增加面包屑导航
|
||||||
|
|
||||||
|
- 搜索框样式优化
|
||||||
|
|
||||||
|
- Layout组件命名语义化
|
||||||
|
|
||||||
|
- 图表主题功能优化
|
||||||
|
|
||||||
|
## 0.1.3
|
||||||
|
1. 升级tdesign-react
|
||||||
|
|
||||||
|
2. 替换为tdesign-react Card 组件
|
||||||
|
|
||||||
|
3. table样式优化
|
||||||
|
|
||||||
|
## 0.1.2
|
||||||
|
- 升级axios、tdesign @xucz
|
||||||
|
|
||||||
|
- fix: loss css token @uyarn
|
||||||
|
|
||||||
|
- 修复图表文字重叠 @xucz
|
||||||
|
|
||||||
|
## 0.1.1
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- 新增登录页 #42 by @uyarn
|
||||||
|
|
||||||
|
- Logo点击跳转首页 #45 by @aouos
|
||||||
|
|
||||||
|
## 0.1.0
|
||||||
|
## Bug Fixes
|
||||||
|
|
||||||
|
- 修复页面主题色 by @xucz
|
||||||
|
|
||||||
|
- 修复页面布局
|
||||||
|
|
||||||
|
- 修复版本图表渲染问题
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
- 增加数据Mock by @xucz
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2021-present TDesign
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
<p style="display:flex; justify-content: center">
|
||||||
|
|
||||||
|
</p>
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://tdesign.tencent.com/starter/react/#/dashboard/base" target="_blank">
|
||||||
|
<img alt="TDesign Logo" width="200" src="https://tdesign.gtimg.com/starter/brand-logo.svg">
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://nodejs.org/en/about/releases/"><img src="https://img.shields.io/node/v/vite.svg" alt="node compatibility"></a>
|
||||||
|
<a href="https://github.com/Tencent/tdesign-react-starter/blob/develop/LICENSE">
|
||||||
|
<img src="https://img.shields.io/npm/l/tdesign-react.svg?sanitize=true" alt="License">
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
简体中文 | [English](./README.md)
|
||||||
|
|
||||||
|
### 项目简介
|
||||||
|
|
||||||
|
TDesign React Starter 是一个基于 tdesign-react,使用 `React`、`Vite2`开发,可进行个性化主题配置,旨在提供项目开箱即用的、配置式的中后台项目。
|
||||||
|
|
||||||
|
<img src="docs/docs-starter.png">
|
||||||
|
|
||||||
|
### 特性
|
||||||
|
|
||||||
|
- 内置多种常用的中后台页面
|
||||||
|
- 完善的目录结构
|
||||||
|
- 完善的代码规范配置
|
||||||
|
- 支持暗黑模式
|
||||||
|
- 自定义主题颜色
|
||||||
|
- 多种空间布局
|
||||||
|
- 内置 Mock 数据方案
|
||||||
|
|
||||||
|
### 开发
|
||||||
|
|
||||||
|
```bash
|
||||||
|
## 安装依赖
|
||||||
|
npm install
|
||||||
|
|
||||||
|
## 启动项目
|
||||||
|
npm run dev
|
||||||
|
|
||||||
|
## mock方式启动项目
|
||||||
|
npm run dev:mock
|
||||||
|
```
|
||||||
|
|
||||||
|
### 构建
|
||||||
|
|
||||||
|
```bash
|
||||||
|
## 构建正式环境
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
## 构建测试环境
|
||||||
|
npm run build:test
|
||||||
|
```
|
||||||
|
|
||||||
|
### 其他
|
||||||
|
|
||||||
|
```bash
|
||||||
|
## 预览构建产物
|
||||||
|
npm run preview
|
||||||
|
|
||||||
|
## 代码格式检查
|
||||||
|
npm run lint
|
||||||
|
|
||||||
|
## 代码格式检查与自动修复
|
||||||
|
npm run lint:fix
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### 如何贡献
|
||||||
|
|
||||||
|
非常欢迎您的贡献!提交您的 [Issue](https://github.com/tencent/tdesign-react-starter/issues/new/choose) 或者提交 [Pull Request](https://github.com/Tencent/tdesign-react-starter/pulls)。
|
||||||
|
|
||||||
|
#### Pull Request
|
||||||
|
|
||||||
|
1. Fork 代码!
|
||||||
|
2. 创建自己的分支: `git checkout -b feat/xxxx`
|
||||||
|
3. 提交你的修改: `git commit -a 'feat(project): describe'`
|
||||||
|
4. 推送您的分支: `git push origin feat/xxxx`
|
||||||
|
5. 提交 `pull request`
|
||||||
|
|
||||||
|
#### 贡献提交规范
|
||||||
|
|
||||||
|
- [Angular Convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular)
|
||||||
|
|
||||||
|
### 兼容性
|
||||||
|
|
||||||
|
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br> IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| Edge >=84 | Firefox >=83 | Chrome >=84 | Safari >=14.1 |
|
||||||
|
|
||||||
|
### 开源协议
|
||||||
|
|
||||||
|
TDesign 遵循 [MIT 协议](https://github.com/Tencent/tdesign-react-starter/LICENSE)。
|
||||||
|
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
<p style="display:flex; justify-content: center">
|
||||||
|
|
||||||
|
</p>
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://tdesign.tencent.com/starter/react/#/dashboard/base" target="_blank">
|
||||||
|
<img alt="TDesign Logo" width="200" src="https://tdesign.gtimg.com/starter/brand-logo.svg">
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://nodejs.org/en/about/releases/"><img src="https://img.shields.io/node/v/vite.svg" alt="node compatibility"></a>
|
||||||
|
<a href="https://github.com/Tencent/tdesign-react/blob/develop/LICENSE">
|
||||||
|
<img src="https://img.shields.io/npm/l/tdesign-react.svg?sanitize=true" alt="License">
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
English | [简体中文](./README-zh_CN.md)
|
||||||
|
### Introduction
|
||||||
|
|
||||||
|
TDesign React Starter is a TDesign-based project developed with `React`, `Vite`. It can be customized theme configuration, and aims to provide project out-of-the-box, configuration-style middle and background projects.
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<a href="http://tdesign.tencent.com/starter/react/">Live Preview</a>
|
||||||
|
·
|
||||||
|
<a href="https://tdesign.tencent.com/starter/docs/react/get-started">Documentation</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<img src="docs/docs-starter.png">
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- Various provided pages for develop
|
||||||
|
- Complete directory structure for develop
|
||||||
|
- Code specification configuration
|
||||||
|
- Support dark mode
|
||||||
|
- Custom theme colors
|
||||||
|
- Various space layouts
|
||||||
|
- Mock data scheme
|
||||||
|
|
||||||
|
### Usage
|
||||||
|
|
||||||
|
> Initialize project with our CLI tool `tdesign-starter-cli`
|
||||||
|
|
||||||
|
```bash
|
||||||
|
## install tdesign-starter-cli
|
||||||
|
npm i tdesign-starter-cli@latest -g
|
||||||
|
|
||||||
|
## create project
|
||||||
|
td-starter init
|
||||||
|
```
|
||||||
|
|
||||||
|
### Develop
|
||||||
|
|
||||||
|
```bash
|
||||||
|
## install dependencies
|
||||||
|
npm install
|
||||||
|
|
||||||
|
## set up
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
### Build
|
||||||
|
|
||||||
|
```bash
|
||||||
|
## build
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
## build for test
|
||||||
|
npm run build:test
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Contributing Guide
|
||||||
|
|
||||||
|
We welcome contributions to our project. Create your [Issue](https://github.com/tencent/tdesign-react-starter/issues/new/choose) or Submit your [Pull Request](https://github.com/Tencent/tdesign-react-starter/pulls).
|
||||||
|
|
||||||
|
#### Pull Request
|
||||||
|
|
||||||
|
1. Fork it!
|
||||||
|
2. Create your branch: `git checkout -b feat/xxxx`
|
||||||
|
3. Commit: `git commit -a 'feat(project): describe'`
|
||||||
|
4. Push: `git push origin feat/xxxx`
|
||||||
|
5. New Pull Request `pull request`
|
||||||
|
|
||||||
|
#### Commit Specification
|
||||||
|
|
||||||
|
- [Angular Convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular)
|
||||||
|
|
||||||
|
### Compatibility
|
||||||
|
|
||||||
|
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br> IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
|
||||||
|
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| Edge >=84 | Firefox >=83 | Chrome >=84 | Safari >=14.1 |
|
||||||
|
|
||||||
|
### License
|
||||||
|
|
||||||
|
The MIT License. Please see [the license file](LICENSE) for more information.
|
||||||
|
After Width: | Height: | Size: 85 KiB |
@@ -0,0 +1,38 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>元境幻生管理台</title>
|
||||||
|
<meta name="description" content="元境幻生后台管理台" />
|
||||||
|
<meta name="theme-color" content="#ffffff" />
|
||||||
|
<link rel="icon" href="/favicon.ico" />
|
||||||
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180" />
|
||||||
|
<meta name="msapplication-TileColor" content="#FFFFFF" />
|
||||||
|
<link rel="mask-icon" href="/favicon.svg" color="#FFFFFF" />
|
||||||
|
<!--[if IE]>
|
||||||
|
<style>
|
||||||
|
#app {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<![endif]-->
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<!--[if IE]>
|
||||||
|
<h1 style="position: absolute; width: 100%; text-align: center; top: 45%">
|
||||||
|
建议使用 <a href="https://www.google.cn/chrome/">Chrome</a>
|
||||||
|
</h1>
|
||||||
|
<![endif]-->
|
||||||
|
<td-horizon></td-horizon>
|
||||||
|
<td-aegis></td-aegis>
|
||||||
|
<div id="app"></div>
|
||||||
|
<script type="module" src="/src/main.tsx"></script>
|
||||||
|
<script>
|
||||||
|
if (window.Cypress) {
|
||||||
|
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
const Mock = require('mockjs');
|
||||||
|
export default {
|
||||||
|
url: '/api/get-list',
|
||||||
|
method: 'get',
|
||||||
|
response: () => {
|
||||||
|
return {
|
||||||
|
code: 0,
|
||||||
|
msg: 'ok',
|
||||||
|
data: {
|
||||||
|
...Mock.mock({
|
||||||
|
'list|100': [
|
||||||
|
{
|
||||||
|
'index|+1': 1,
|
||||||
|
'status|1': '@natural(0, 4)',
|
||||||
|
no: 'BH00@natural(01, 100)',
|
||||||
|
name: '@city()办公用品采购项目',
|
||||||
|
'paymentType|1': '@natural(0, 1)',
|
||||||
|
'contractType|1': '@natural(0, 2)',
|
||||||
|
updateTime: '2020-05-30 @date("HH:mm:ss")',
|
||||||
|
amount: '@natural(10, 500),000,000',
|
||||||
|
adminName: '@cname()',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
import getList from './api/getList';
|
||||||
|
|
||||||
|
export default [getList];
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
{
|
||||||
|
"name": "@tencent/tdesign-react-starter",
|
||||||
|
"version": "0.3.1",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"dev:mock": "vite --open --mode mock",
|
||||||
|
"dev": "vite --open --mode development",
|
||||||
|
"dev:linux": "vite --mode development",
|
||||||
|
"build:test": "vite build --mode test",
|
||||||
|
"build": "vite build --mode release",
|
||||||
|
"build:site": "vite build --mode site",
|
||||||
|
"site:preview": "npm run build && cp -r dist _site",
|
||||||
|
"preview": "vite preview --mode test",
|
||||||
|
"test": "echo \"no test specified,work in process\"",
|
||||||
|
"test:coverage": "echo \"no test specified,work in process\"",
|
||||||
|
"lint": "eslint ./src --ext ts,tsx",
|
||||||
|
"lint:fix": "eslint ./src --ext ts,tsx --fix",
|
||||||
|
"prepare": "husky install"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@honkhonk/vite-plugin-svgr": "^1.1.0",
|
||||||
|
"@types/echarts": "^4.9.13",
|
||||||
|
"@types/lodash": "^4.14.178",
|
||||||
|
"@types/mockjs": "^1.0.6",
|
||||||
|
"@types/node": "^20.2.5",
|
||||||
|
"@types/react": "^18.2.0",
|
||||||
|
"@types/react-dom": "^18.2.0",
|
||||||
|
"@types/react-router-dom": "^5.3.3",
|
||||||
|
"@vitejs/plugin-react": "^1.3.2",
|
||||||
|
"eslint": "^8.3.0",
|
||||||
|
"eslint-config-airbnb-base": "^15.0.0",
|
||||||
|
"eslint-config-prettier": "^8.4.0",
|
||||||
|
"eslint-config-react-app": "^7.0.0",
|
||||||
|
"eslint-plugin-import": "^2.25.4",
|
||||||
|
"eslint-plugin-prettier": "^4.0.0",
|
||||||
|
"eslint-plugin-react": "^7.28.0",
|
||||||
|
"husky": "^8.0.1",
|
||||||
|
"less": "^4.1.3",
|
||||||
|
"prettier": "^2.5.1",
|
||||||
|
"typescript": "^4.8.4",
|
||||||
|
"vite": "^2.9.15",
|
||||||
|
"vite-plugin-mock": "^2.9.6"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@reduxjs/toolkit": "^1.8.5",
|
||||||
|
"axios": "^1.2.0",
|
||||||
|
"axios-jsonp": "^1.0.4",
|
||||||
|
"classnames": "^2.3.1",
|
||||||
|
"dayjs": "^1.10.7",
|
||||||
|
"echarts": "^5.3.0",
|
||||||
|
"echarts-for-react": "^3.0.2",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
|
"mockjs": "^1.1.0",
|
||||||
|
"react": "^18.2.0",
|
||||||
|
"react-dom": "^18.2.0",
|
||||||
|
"react-redux": "^7.2.4",
|
||||||
|
"react-router-dom": "^6.3.0",
|
||||||
|
"tdesign-icons-react": "^0.6.0",
|
||||||
|
"tdesign-react": "^1.15.0",
|
||||||
|
"tvision-color": "^1.5.0"
|
||||||
|
},
|
||||||
|
"browserslist": {
|
||||||
|
"production": [
|
||||||
|
">0.2%",
|
||||||
|
"not dead",
|
||||||
|
"not op_mini all"
|
||||||
|
],
|
||||||
|
"development": [
|
||||||
|
"last 1 chrome version",
|
||||||
|
"last 1 firefox version",
|
||||||
|
"last 1 safari version"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 17 KiB |
@@ -0,0 +1,3 @@
|
|||||||
|
# https://www.robotstxt.org/robotstxt.html
|
||||||
|
User-agent: *
|
||||||
|
Disallow:
|
||||||
|
After Width: | Height: | Size: 789 KiB |
|
After Width: | Height: | Size: 972 KiB |
@@ -0,0 +1,73 @@
|
|||||||
|
<svg width="184" height="32" viewBox="0 0 188 26" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M77.7301 8.34426H80.6699L78.3234 21.7922H75.3799L77.7301 8.34426Z" fill="currentcolor"/>
|
||||||
|
<path d="M78.5992 3.09961H81.6221L81.0742 6.12246H78.0513L78.5992 3.09961Z" fill="currentcolor"/>
|
||||||
|
<path
|
||||||
|
d="M32.5765 6.46921H36.937L37.4131 3.82422H25.4615L24.9854 6.46921H29.3723L26.6706 21.7913H29.8559L32.5765 6.46921Z"
|
||||||
|
fill="currentcolor"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||||
|
d="M51.4051 11.4275C51.5998 10.4187 51.7035 9.39434 51.7149 8.3669C51.7149 4.97375 50.007 3.8364 45.4765 3.84774H39.2381L36.083 21.8035H43.3908C48.1329 21.8035 49.8181 20.5906 50.8836 14.4504L51.4051 11.4275ZM45.0004 6.47006C47.5623 6.47006 48.5372 6.80258 48.5372 8.83922C48.5177 9.70444 48.4254 10.5665 48.2613 11.4162L47.7399 14.4391C47.0522 18.4481 46.3191 19.1585 42.7597 19.1585H39.7369L41.9473 6.47006H45.0004Z"
|
||||||
|
fill="currentcolor"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||||
|
d="M63.863 10.8329C63.8629 11.1826 63.8313 11.5317 63.7685 11.8758L63.436 13.765C63.0582 15.8735 62.276 16.6103 60.3074 16.6103H55.0816L54.9607 17.3471C54.8956 17.6913 54.8564 18.0399 54.8436 18.39C54.8436 19.2175 55.2705 19.4102 56.6459 19.4102H61.4145L60.4396 21.8058H56.0754C52.9958 21.8058 51.9189 21.0199 51.9189 19.1004C51.9308 18.5439 51.9864 17.9893 52.0852 17.4416L53.011 12.1289C53.5777 8.85291 54.9531 8.19166 58.4407 8.19166H60.0542C62.5292 8.17654 63.863 8.83779 63.863 10.8329ZM60.9006 11.2599C60.9006 10.6893 60.5454 10.5457 59.4534 10.5457H57.7682C56.6762 10.5457 56.1547 10.6893 55.8789 12.1138L55.501 14.294H59.5327C59.6593 14.3151 59.7889 14.3081 59.9124 14.2735C60.036 14.239 60.1504 14.1778 60.2477 14.0942C60.345 14.0106 60.4228 13.9066 60.4755 13.7897C60.5283 13.6728 60.5547 13.5457 60.553 13.4174L60.8137 11.8758C60.8561 11.6728 60.8826 11.4669 60.893 11.2599H60.9006Z"
|
||||||
|
fill="currentcolor"/>
|
||||||
|
<path
|
||||||
|
d="M69.644 19.3964H64.0215L64.4485 21.8185H69.644C72.4477 21.8185 73.1543 21.486 73.5813 19.0186L73.842 17.5072C73.9744 16.8585 74.0527 16.2001 74.0762 15.5385C74.0762 14.1896 73.3885 13.7853 71.3028 13.7853H68.4575C67.9096 13.7853 67.7471 13.7361 67.7471 13.4301C67.754 13.2471 67.7768 13.065 67.8152 12.886L68.0079 11.8166C68.1741 10.8909 68.3366 10.7511 69.2624 10.7511H74.269L75.2627 8.35547H69.2624C66.5834 8.35547 65.873 8.6502 65.3969 11.3783L65.208 12.4477C65.073 13.0947 64.9933 13.752 64.9699 14.4125C64.9699 15.7652 65.6576 16.1695 67.7471 16.1695H70.4715C71.0194 16.1695 71.1856 16.2187 71.1856 16.5247C71.1769 16.7078 71.1529 16.8898 71.1139 17.0688L70.8985 18.3271C70.7322 19.2529 70.566 19.3964 69.644 19.3964Z"
|
||||||
|
fill="currentcolor"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||||
|
d="M93.2642 13.8225C93.4341 12.9856 93.5377 12.1366 93.5741 11.2833C93.5741 9.00486 92.3158 8.17735 89.3194 8.16602H87.6833C83.7196 8.16602 82.843 9.03509 82.1553 12.8137L81.8001 14.7823C81.6298 15.6192 81.5262 16.4682 81.4902 17.3215C81.4902 19.5962 82.7372 20.4275 85.76 20.4275H89.1607L88.9945 21.3532C88.6393 23.439 88.2841 23.5826 86.4326 23.5826H81.5469L81.9739 26.0008H87.0976C89.8258 26.0008 91.2238 25.3585 91.7944 22.1354L93.2642 13.8225ZM90.3132 13.7961L89.5877 18.0432L86.4931 18.0318C84.9287 18.0318 84.43 17.8429 84.43 16.8227C84.475 16.1366 84.5697 15.4547 84.7133 14.7823L85.0723 12.8137C85.3784 11.0944 85.6618 10.5465 87.4641 10.5465H88.5335C90.0751 10.5465 90.5966 10.7392 90.5966 11.7557C90.5573 12.4423 90.4625 13.1247 90.3132 13.7961Z"
|
||||||
|
fill="currentcolor"/>
|
||||||
|
<path
|
||||||
|
d="M107.112 10.7615C107.059 11.7344 106.933 12.7019 106.735 13.6559L105.31 21.7911H102.37L103.818 13.6559C103.946 13.0334 104.026 12.4016 104.056 11.7666C104.056 10.9353 103.7 10.7691 102.586 10.7691H99.1208L97.2013 21.776H94.2578L96.6081 8.32812H103.13C106.183 8.34324 107.112 9.06872 107.112 10.7615Z"
|
||||||
|
fill="currentcolor"/>
|
||||||
|
<path
|
||||||
|
d="M112.333 21.9715H117.879C121.093 21.9715 122.473 21.5668 123.045 18.3532L123.473 15.9727C123.568 15.4728 123.783 14.0683 123.783 13.4017C123.783 11.6164 122.497 11.3307 120.474 11.3307H117.427C116.76 11.3307 116.427 11.2117 116.427 10.807C116.427 10.5928 116.498 10.1167 116.617 9.49773L116.903 8.02182C117.141 6.80777 117.332 6.56972 118.427 6.56972H124.211L125.306 3.95117H118.26C115.284 3.95117 114.356 4.61771 113.856 7.47431L113.404 9.99763C113.285 10.688 113.19 11.3069 113.19 11.8306C113.19 13.3303 113.832 14.0683 115.76 14.0683H119.307C120.164 14.0683 120.498 14.1159 120.498 14.6396C120.498 14.9015 120.45 15.4252 120.283 16.2583L120.045 17.4962C119.736 19.1625 119.498 19.3292 117.927 19.3292H111.856L112.333 21.9715Z"
|
||||||
|
fill="currentcolor"/>
|
||||||
|
<path
|
||||||
|
d="M130.124 10.8784H133.909L134.337 8.47411H130.552L131.266 4.47488H128.314L127.6 8.47411H125.815L125.41 10.8784H127.172L126.101 16.9487C125.958 17.7104 125.839 18.5436 125.839 19.1625C125.839 21.2574 127.172 21.9715 129.838 21.9715H131.576L132.599 19.5672H130.981C129.433 19.5672 128.838 19.5434 128.838 18.5912C128.838 18.2103 128.933 17.5914 129.052 16.9487L130.124 10.8784Z"
|
||||||
|
fill="currentcolor"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||||
|
d="M136.155 8.47411H142.344C145.034 8.47411 146.081 9.21207 146.081 10.926C146.081 11.4973 145.915 12.4495 145.772 13.2589L144.248 21.9715H137.107C134.798 21.9715 134.084 21.1384 134.084 19.5672C134.084 18.9959 134.179 18.377 134.298 17.6628L134.441 16.8535C135.012 13.6636 136.059 13.4732 139.297 13.4732H142.868L142.939 13.0447C143.034 12.5448 143.106 12.1639 143.106 11.8306C143.106 11.1165 142.701 10.8784 141.344 10.8784H136.559L136.155 8.47411ZM137.059 18.8531C137.059 19.4244 137.297 19.5672 137.94 19.5672H141.796L142.463 15.7584H138.749C137.75 15.7584 137.512 15.9727 137.345 16.9487L137.154 18.0199C137.083 18.4008 137.059 18.6626 137.059 18.8531Z"
|
||||||
|
fill="currentcolor"/>
|
||||||
|
<path
|
||||||
|
d="M146.66 21.9715H149.636L151.231 12.9971C151.54 11.2117 151.897 10.926 153.611 10.926H155.778L156.801 8.47411H153.516C149.779 8.47411 148.922 9.14065 148.279 12.8304L146.66 21.9715Z"
|
||||||
|
fill="currentcolor"/>
|
||||||
|
<path
|
||||||
|
d="M165.098 10.8784H161.313L160.242 16.9487C160.123 17.5914 160.028 18.2103 160.028 18.5912C160.028 19.5434 160.623 19.5672 162.17 19.5672H163.789L162.765 21.9715H161.027C158.361 21.9715 157.028 21.2574 157.028 19.1625C157.028 18.5436 157.147 17.7104 157.29 16.9487L158.361 10.8784H156.6L157.004 8.47411H158.79L159.504 4.47488H162.456L161.742 8.47411H165.527L165.098 10.8784Z"
|
||||||
|
fill="currentcolor"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||||
|
d="M173.343 8.30748H171.724C168.225 8.30748 166.844 8.97402 166.273 12.2591L165.345 17.5914C165.249 18.1627 165.178 18.7579 165.178 19.2578C165.178 21.186 166.273 21.9715 169.368 21.9715H173.748L174.724 19.5672H169.939C168.558 19.5672 168.13 19.3768 168.13 18.5436C168.13 18.2818 168.177 17.9009 168.249 17.4962L168.368 16.7582H173.605C175.581 16.7582 176.366 16.0203 176.747 13.9016L177.08 12.0211C177.152 11.6402 177.176 11.2593 177.176 10.9736C177.176 8.97402 175.843 8.30748 173.343 8.30748ZM174.129 12.0211L173.867 13.5684C173.772 14.1873 173.51 14.4492 172.843 14.4492H168.796L169.177 12.2591C169.439 10.8308 169.963 10.688 171.058 10.688H172.748C173.843 10.688 174.2 10.8308 174.2 11.4021C174.2 11.5688 174.176 11.7354 174.129 12.0211Z"
|
||||||
|
fill="currentcolor"/>
|
||||||
|
<path
|
||||||
|
d="M179.919 21.9715H176.943L178.562 12.8304C179.205 9.14065 180.062 8.47411 183.799 8.47411H187.084L186.06 10.926H183.894C182.18 10.926 181.823 11.2117 181.514 12.9971L179.919 21.9715Z"
|
||||||
|
fill="currentcolor"/>
|
||||||
|
<path
|
||||||
|
d="M5.21231 5.28999H0.481548C0.412498 5.29078 0.344103 5.27654 0.281107 5.24826C0.21811 5.21998 0.162019 5.17833 0.116725 5.12621C0.0714314 5.07408 0.0380182 5.01273 0.0188032 4.9464C-0.000411771 4.88008 -0.00496858 4.81036 0.00544886 4.7421L0.783833 0.377856C0.80328 0.271783 0.8593 0.175885 0.942146 0.106846C1.02499 0.0378082 1.12942 0 1.23726 0L6.14939 0L5.21231 5.28999Z"
|
||||||
|
fill="#0064FF"/>
|
||||||
|
<path d="M8.52984 16.5117H3.22852L5.21226 5.29688H10.5136L8.52984 16.5117Z" fill="url(#paint0_linear_18110_34031)"/>
|
||||||
|
<path
|
||||||
|
d="M7.20647 21.8093H2.85735C2.78839 21.8085 2.72041 21.7929 2.65803 21.7635C2.59565 21.7341 2.54035 21.6915 2.49589 21.6388C2.45142 21.5861 2.41884 21.5244 2.40036 21.458C2.38188 21.3916 2.37794 21.3219 2.38881 21.2538L3.23142 16.5117H8.52142L7.65235 21.4239C7.63472 21.53 7.58048 21.6267 7.49905 21.6971C7.41761 21.7675 7.3141 21.8072 7.20647 21.8093V21.8093Z"
|
||||||
|
fill="#009BFF"/>
|
||||||
|
<path
|
||||||
|
d="M20.0919 5.28999H5.21191L6.149 0H20.8476C20.9168 0.00013044 20.9851 0.0153276 21.0478 0.0445343C21.1105 0.0737409 21.166 0.116256 21.2106 0.169121C21.2552 0.221986 21.2878 0.283932 21.306 0.35065C21.3242 0.417368 21.3277 0.487255 21.3162 0.555449L20.5416 4.91213C20.5236 5.01823 20.4685 5.11448 20.3862 5.1837C20.3038 5.25293 20.1995 5.2906 20.0919 5.28999V5.28999Z"
|
||||||
|
fill="url(#paint1_linear_18110_34031)"/>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="paint0_linear_18110_34031" x1="7.81543" y1="4.88815" x2="7.92589" y2="15.4398"
|
||||||
|
gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#009BFF"/>
|
||||||
|
<stop offset="0.35" stop-color="#0081FE"/>
|
||||||
|
<stop offset="0.75" stop-color="#006AFD"/>
|
||||||
|
<stop offset="1" stop-color="#0062FD"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="paint1_linear_18110_34031" x1="5.68577" y1="2.65136" x2="20.3785" y2="5.41299"
|
||||||
|
gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0.03" stop-color="#E9FFFF"/>
|
||||||
|
<stop offset="0.17" stop-color="#C4FAC9"/>
|
||||||
|
<stop offset="0.33" stop-color="#A0F694"/>
|
||||||
|
<stop offset="0.48" stop-color="#82F269"/>
|
||||||
|
<stop offset="0.63" stop-color="#6AEF47"/>
|
||||||
|
<stop offset="0.76" stop-color="#5AED2F"/>
|
||||||
|
<stop offset="0.89" stop-color="#4FEB20"/>
|
||||||
|
<stop offset="1" stop-color="#4CEB1B"/>
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 9.6 KiB |
@@ -0,0 +1,5 @@
|
|||||||
|
<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect x="0.5" y="0.5" width="49" height="49" rx="24.5" fill="#0052D9" stroke="none"/>
|
||||||
|
<path d="M23.9219 31H26.0859L22.0781 19.7266H19.8125L15.8125 31H17.8516L18.8203 28.1172H22.9688L23.9219 31ZM20.8359 21.875H20.9688L22.5 26.5234H19.2891L20.8359 21.875ZM30.6328 29.6172C29.7734 29.6172 29.1562 29.1875 29.1562 28.4688C29.1562 27.7734 29.6641 27.3828 30.75 27.3125L32.6797 27.1875V27.8672C32.6797 28.8594 31.8047 29.6172 30.6328 29.6172ZM30.0625 31.1406C31.1797 31.1406 32.1172 30.6562 32.5938 29.8281H32.7266V31H34.5938V25.1641C34.5938 23.3516 33.3594 22.2812 31.1641 22.2812C29.1328 22.2812 27.7188 23.2422 27.5625 24.75H29.3906C29.5703 24.1719 30.1797 23.8594 31.0703 23.8594C32.1172 23.8594 32.6797 24.3281 32.6797 25.1641V25.8828L30.4766 26.0156C28.3984 26.1406 27.2344 27.0312 27.2344 28.5781C27.2344 30.1406 28.4141 31.1406 30.0625 31.1406Z" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
After Width: | Height: | Size: 979 B |
@@ -0,0 +1,5 @@
|
|||||||
|
<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect x="0.5" y="0.5" width="49" height="49" rx="24.5" fill="#0594FA" stroke="none"/>
|
||||||
|
<path d="M20.6641 31C23.0703 31 24.5391 29.7734 24.5391 27.7969C24.5391 26.3281 23.4922 25.2344 21.9766 25.0938V24.9531C23.1094 24.7734 23.9844 23.7266 23.9844 22.5391C23.9844 20.8047 22.6953 19.7266 20.5547 19.7266H15.8438V31H20.6641ZM17.8594 21.3281H20.0625C21.2812 21.3281 21.9922 21.9062 21.9922 22.8984C21.9922 23.9141 21.2344 24.4688 19.8047 24.4688H17.8594V21.3281ZM17.8594 29.3984V25.9219H20.125C21.6641 25.9219 22.4766 26.5156 22.4766 27.6406C22.4766 28.7891 21.6875 29.3984 20.2031 29.3984H17.8594ZM31.2812 31.1406C33.4375 31.1406 34.7891 29.4453 34.7891 26.7266C34.7891 23.9922 33.4453 22.3125 31.2812 22.3125C30.1094 22.3125 29.125 22.8828 28.6797 23.8125H28.5469V19.1484H26.6094V31H28.4766V29.6484H28.6094C29.0938 30.5859 30.0859 31.1406 31.2812 31.1406ZM30.6719 23.9609C31.9922 23.9609 32.7969 25.0078 32.7969 26.7266C32.7969 28.4453 32 29.4922 30.6719 29.4922C29.3438 29.4922 28.5156 28.4297 28.5156 26.7266C28.5156 25.0234 29.3516 23.9609 30.6719 23.9609Z" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,5 @@
|
|||||||
|
<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect x="0.5" y="0.5" width="49" height="49" rx="24.5" fill="#7587DB" stroke="none"/>
|
||||||
|
<path d="M21.1172 31.2812C23.7188 31.2812 25.625 29.7266 25.8906 27.4219H23.9062C23.6328 28.6875 22.5469 29.4844 21.1172 29.4844C19.1953 29.4844 18 27.9062 18 25.3594C18 22.8203 19.1953 21.2422 21.1094 21.2422C22.5312 21.2422 23.6172 22.1172 23.8984 23.4688H25.8828C25.6484 21.1172 23.6719 19.4453 21.1094 19.4453C17.9141 19.4453 15.9375 21.7031 15.9375 25.3672C15.9375 29.0156 17.9219 31.2812 21.1172 31.2812ZM35.3125 25.3281C35.1094 23.5312 33.7812 22.2812 31.5859 22.2812C29.0156 22.2812 27.5078 23.9297 27.5078 26.7031C27.5078 29.5156 29.0234 31.1719 31.5938 31.1719C33.7578 31.1719 35.1016 29.9688 35.3125 28.1797H33.4688C33.2656 29.0703 32.5938 29.5469 31.5859 29.5469C30.2656 29.5469 29.4688 28.5 29.4688 26.7031C29.4688 24.9297 30.2578 23.9062 31.5859 23.9062C32.6484 23.9062 33.2891 24.5 33.4688 25.3281H35.3125Z" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
After Width: | Height: | Size: 1.0 KiB |
@@ -0,0 +1,5 @@
|
|||||||
|
<svg width="50" height="50" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect x="0.5" y="0.5" width="49" height="49" rx="24.5" fill="#00A870" stroke="none"/>
|
||||||
|
<path d="M15.875 19.7266V31H20.1016C23.4766 31 25.4062 28.9297 25.4062 25.3125C25.4062 21.7734 23.4531 19.7266 20.1016 19.7266H15.875ZM17.8906 21.4688H19.8359C22.0469 21.4688 23.3516 22.8828 23.3516 25.3438C23.3516 27.8594 22.0781 29.2578 19.8359 29.2578H17.8906V21.4688ZM30.5938 31.1406C31.7812 31.1406 32.7656 30.5859 33.25 29.6484H33.3828V31H35.2578V19.1484H33.3203V23.8125H33.1875C32.7344 22.875 31.7656 22.3125 30.5938 22.3125C28.4375 22.3125 27.0781 24.0156 27.0781 26.7188C27.0781 29.4375 28.4297 31.1406 30.5938 31.1406ZM31.1953 23.9609C32.5234 23.9609 33.3438 25.0234 33.3438 26.7266C33.3438 28.4453 32.5312 29.4922 31.1953 29.4922C29.8672 29.4922 29.0625 28.4531 29.0625 26.7266C29.0625 25.0078 29.875 23.9609 31.1953 23.9609Z" fill="white"/>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
After Width: | Height: | Size: 958 B |
@@ -0,0 +1,32 @@
|
|||||||
|
<svg width="200" height="140" viewBox="0 0 200 140" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g mask="url(#mask0_17_619)">
|
||||||
|
<path d="M30 62H118V122H30V62Z" fill="#97A3B7" />
|
||||||
|
<g filter="url(#filter0_f_17_619)">
|
||||||
|
<rect x="12" y="84" width="80" height="60" fill="#E3E6EB" />
|
||||||
|
</g>
|
||||||
|
<g filter="url(#filter1_f_17_619)">
|
||||||
|
<rect x="80" y="54" width="80" height="60" fill="#E3E6EB" />
|
||||||
|
</g>
|
||||||
|
<rect x="46" y="105" width="32" height="2" fill="white" />
|
||||||
|
<rect x="46" y="98" width="32" height="2" fill="white" />
|
||||||
|
<rect x="46" y="88" width="16" height="2" fill="white" />
|
||||||
|
</g>
|
||||||
|
<path opacity="0.9" d="M63 20H151V30H63V20Z" fill="currentcolor" />
|
||||||
|
<mask id="mask1_17_619" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="63" y="30" width="88" height="50">
|
||||||
|
<path d="M63 30H151V80H63V30Z" fill="currentcolor" />
|
||||||
|
</mask>
|
||||||
|
<g mask="url(#mask1_17_619)">
|
||||||
|
<path d="M63 30H151V80H63V30Z" fill="currentcolor" />
|
||||||
|
<g opacity="0.3" filter="url(#filter2_f_17_619)">
|
||||||
|
<path d="M30 62H118V122H30V62Z" fill="#97A3B7" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||||
|
d="M95.6863 40.8577L105.964 51.1345C106.295 51.0466 106.642 50.9998 107 50.9998C109.213 50.9998 111 52.7865 111 54.9998C111 55.3574 110.953 55.7038 110.866 56.0333L121.142 66.3135L118.314 69.1419L113.716 64.5448C111.653 65.423 109.384 65.9089 107 65.9089C99.7273 65.9089 93.5164 61.3853 91 54.9998C92.1785 52.0093 94.1673 49.4271 96.6961 47.5268L92.8579 43.6861L95.6863 40.8577ZM99 54.9998C99 59.4158 102.584 62.9998 107 62.9998C108.483 62.9998 109.872 62.5957 111.063 61.8917L108.034 58.8657C107.704 58.9532 107.358 58.9998 107 58.9998C104.787 58.9998 103 57.2131 103 54.9998C103 54.6423 103.047 54.2958 103.134 53.9663L100.107 50.9389C99.4037 52.1295 99 53.5178 99 54.9998ZM107 44.0907C114.273 44.0907 120.484 48.6143 123 54.9998C122.071 57.3574 120.638 59.4612 118.834 61.1773L114.729 57.0717C114.906 56.4108 115 55.7162 115 54.9998C115 50.5838 111.416 46.9998 107 46.9998C106.284 46.9998 105.589 47.0941 104.928 47.2711L102.378 44.7205C103.848 44.3101 105.398 44.0907 107 44.0907Z"
|
||||||
|
fill="white" />
|
||||||
|
<rect x="68" y="24" width="2" height="2" fill="white" />
|
||||||
|
<rect x="74" y="24" width="2" height="2" fill="white" />
|
||||||
|
<rect x="80" y="24" width="66" height="2" fill="white" />
|
||||||
|
<path d="M157 53.9998L181.249 95.9998H132.751L157 53.9998Z" fill="white" stroke="black" />
|
||||||
|
<path d="M157 88.9998L157 70.9998" stroke="black" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.4 KiB |
@@ -0,0 +1,36 @@
|
|||||||
|
<svg width="200" height="140" viewBox="0 0 200 140" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g mask="url(#mask0_16559_24301)">
|
||||||
|
<path d="M30 62H118V122H30V62Z" fill="#97A3B7" />
|
||||||
|
<g filter="url(#filter0_f_16559_24301)">
|
||||||
|
<rect x="12" y="84" width="80" height="60" fill="#E3E6EB" />
|
||||||
|
</g>
|
||||||
|
<g filter="url(#filter1_f_16559_24301)">
|
||||||
|
<rect x="80" y="54" width="80" height="60" fill="#E3E6EB" />
|
||||||
|
</g>
|
||||||
|
<path d="M49 93L42 100L49 107" stroke="white" stroke-width="2" />
|
||||||
|
<path d="M69 107L76 100L69 93" stroke="white" stroke-width="2" />
|
||||||
|
<path d="M62.3647 87.4431L55.6355 112.557" stroke="white" stroke-width="2" />
|
||||||
|
</g>
|
||||||
|
<path opacity="0.9" d="M63 20H151V30H63V20Z" fill="currentcolor" />
|
||||||
|
<mask id="mask1_16559_24301" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="63" y="30" width="88" height="50">
|
||||||
|
<path d="M63 30H151V80H63V30Z" fill="currentcolor" />
|
||||||
|
</mask>
|
||||||
|
<g mask="url(#mask1_16559_24301)">
|
||||||
|
<path d="M63 30H151V80H63V30Z" fill="currentcolor" />
|
||||||
|
<g opacity="0.3" filter="url(#filter2_f_16559_24301)">
|
||||||
|
<path d="M30 62H118V122H30V62Z" fill="#97A3B7" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||||
|
d="M105.25 41C112.015 41 117.5 46.4845 117.5 53.25C117.5 55.6827 116.791 57.9498 115.568 59.8558L121 65.2877L117.288 69L111.856 63.5681C109.95 64.7909 107.683 65.5 105.25 65.5C98.4845 65.5 93 60.0155 93 53.25C93 46.4845 98.4845 41 105.25 41ZM105.25 44.5C100.418 44.5 96.5 48.4175 96.5 53.25C96.5 58.0825 100.418 62 105.25 62C110.082 62 114 58.0825 114 53.25C114 48.4175 110.082 44.5 105.25 44.5Z"
|
||||||
|
fill="white" />
|
||||||
|
<rect x="68" y="24" width="2" height="2" fill="white" />
|
||||||
|
<rect x="74" y="24" width="2" height="2" fill="white" />
|
||||||
|
<rect x="80" y="24" width="66" height="2" fill="white" />
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||||
|
d="M153 56C140.85 56 131 65.8497 131 78C131 82.6039 132.414 86.8776 134.832 90.4102L127 98.5L139.495 95.3681C143.222 98.2709 147.909 100 153 100C165.15 100 175 90.1503 175 78C175 65.8497 165.15 56 153 56Z"
|
||||||
|
fill="white" />
|
||||||
|
<path
|
||||||
|
d="M131 78L131.5 78V78L131 78ZM134.832 90.4102L135.191 90.758L135.475 90.4647L135.245 90.1278L134.832 90.4102ZM127 98.5L126.641 98.1522L125.422 99.411L127.122 98.985L127 98.5ZM139.495 95.3681L139.802 94.9736L139.61 94.8238L139.373 94.8831L139.495 95.3681ZM153 100L153 100.5L153 100.5L153 100ZM175 78L174.5 78L174.5 78L175 78ZM131.5 78C131.5 66.1259 141.126 56.5 153 56.5V55.5C140.574 55.5 130.5 65.5736 130.5 78L131.5 78ZM135.245 90.1278C132.882 86.6757 131.5 82.5 131.5 78H130.5C130.5 82.7079 131.946 87.0794 134.419 90.6926L135.245 90.1278ZM134.473 90.0624L126.641 98.1522L127.359 98.8478L135.191 90.758L134.473 90.0624ZM127.122 98.985L139.616 95.8531L139.373 94.8831L126.878 98.015L127.122 98.985ZM153 99.5C148.024 99.5 143.445 97.8105 139.802 94.9736L139.187 95.7626C143 98.7314 147.794 100.5 153 100.5V99.5ZM174.5 78C174.5 89.8741 164.874 99.5 153 99.5L153 100.5C165.426 100.5 175.5 90.4264 175.5 78L174.5 78ZM153 56.5C164.874 56.5 174.5 66.1259 174.5 78H175.5C175.5 65.5736 165.426 55.5 153 55.5V56.5Z"
|
||||||
|
fill="black" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.0 KiB |
@@ -0,0 +1,32 @@
|
|||||||
|
<svg width="200" height="140" viewBox="0 0 200 140" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g mask="url(#mask0_16559_24251)">
|
||||||
|
<path d="M68 48L106.105 70V114L68 136L29.8949 114V70L68 48Z" fill="#97A3B7" />
|
||||||
|
<g filter="url(#filter0_f_16559_24251)">
|
||||||
|
<rect x="46.3911" y="92" width="80" height="60" fill="#E3E6EB" />
|
||||||
|
</g>
|
||||||
|
<g filter="url(#filter1_f_16559_24251)">
|
||||||
|
<rect y="23" width="80" height="60" fill="#E3E6EB" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<mask id="mask1_16559_24251" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="80" y="9" width="78" height="88">
|
||||||
|
<path d="M119 9L157.105 31V75L119 97L80.8949 75V31L119 9Z" fill="currentcolor" />
|
||||||
|
</mask>
|
||||||
|
<g mask="url(#mask1_16559_24251)">
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M80.895 31V75L119 97L157.105 75V31L119 53L80.895 31Z"
|
||||||
|
fill="currentcolor" />
|
||||||
|
<path opacity="0.9" d="M119 -35L157.105 -13L157.105 31.5L119 53.5L80.8952 31.5L80.895 -13L119 -35Z"
|
||||||
|
fill="currentcolor" />
|
||||||
|
<g opacity="0.3" filter="url(#filter2_f_16559_24251)">
|
||||||
|
<path d="M68 48L106.105 70V114L68 136L29.8949 114V70L68 48Z" fill="#97A3B7" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<path
|
||||||
|
d="M143 68.822L147.867 85.875L148 86.3405L148.469 86.2228L165.671 81.911L153.336 94.6522L152.999 95L153.336 95.3478L165.671 108.089L148.469 103.777L148 103.659L147.867 104.125L143 121.178L138.133 104.125L138 103.659L137.531 103.777L120.329 108.089L132.664 95.3478L133.001 95L132.664 94.6522L120.329 81.911L137.531 86.2228L138 86.3405L138.133 85.875L143 68.822Z"
|
||||||
|
fill="white" stroke="black" />
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||||
|
d="M123.243 35.0821L126.071 33.4493L123.243 31.8164L120.414 33.4493L123.243 35.0821ZM119 32.6329L121.828 31L114.757 26.9179L111.929 28.5507L119 32.6329ZM127.485 35.8986C122.806 38.6001 115.194 38.6001 110.515 35.8986C105.835 33.197 105.835 28.803 110.515 26.1014C115.194 23.3999 122.806 23.3999 127.485 26.1014C132.165 28.803 132.165 33.197 127.485 35.8986ZM107.686 24.4686C101.438 28.0756 101.438 33.9244 107.686 37.5314C113.934 41.1384 124.066 41.1384 130.314 37.5314C136.562 33.9244 136.562 28.0756 130.314 24.4686C124.066 20.8616 113.934 20.8616 107.686 24.4686Z"
|
||||||
|
fill="white" />
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||||
|
d="M41.8989 86.2863L44.7272 87.9193L44.7275 94.4512L41.8992 92.8181L41.8989 86.2863ZM53.9194 93.2269L56.7477 94.86L56.7479 101.392L53.9196 99.7587L53.9194 93.2269ZM44.7281 107.515L41.8999 105.882L41.9 109.148L44.7283 110.781L44.7282 107.515L53.92 112.822L53.9201 116.088L56.7484 117.721L56.7483 114.455L53.9201 112.822L53.92 109.556L44.728 104.249L44.7281 107.515Z"
|
||||||
|
fill="white" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.6 KiB |
@@ -0,0 +1,33 @@
|
|||||||
|
<svg width="200" height="140" viewBox="0 0 200 140" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g mask="url(#mask0_22_990)">
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||||
|
d="M144.569 105.61L96.5692 133.322L48.5693 105.61V83.7121L96.569 55.9995L144.569 83.7122V105.61Z"
|
||||||
|
fill="#97A3B7" />
|
||||||
|
<g filter="url(#filter0_f_22_990)">
|
||||||
|
<rect x="-3" y="33.9995" width="80" height="60" fill="#E3E6EB" />
|
||||||
|
</g>
|
||||||
|
<g filter="url(#filter1_f_22_990)">
|
||||||
|
<rect x="97" y="97.9995" width="80" height="60" fill="#E3E6EB" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<mask id="mask1_22_990" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="53" y="16" width="86" height="69">
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||||
|
d="M113.357 42.715L129.829 33.2059C128.859 32.4995 127.789 31.823 126.643 31.1615C121.268 28.0584 114.723 26.0153 107.758 25.023C103.549 19.4606 97.5775 16.1248 90.4344 16.1945C83.6788 16.2821 74.9482 21.9412 68.9271 30.5602C68.096 30.975 67.2847 31.4099 66.4949 31.8659C52.1168 40.1664 49.5542 52.6155 59.0218 61.9309C57.9871 56.1259 58.712 51.0657 62.1231 45.7161C62.0653 46.3482 61.9127 50.143 61.8906 50.7834C61.2209 69.6969 76.9107 84.8409 88.03 84.7113C96.4806 84.6119 103.595 79.6976 108.349 72.0797C114.563 70.8487 120.438 68.786 125.443 65.8968C138.919 58.1167 142.01 46.7146 134.547 37.629L117.948 47.2113C119.71 50.8655 117.997 55.034 112.87 57.9936C107.744 60.9532 100.523 61.9424 94.1928 60.9252C91.3499 60.4563 88.6706 59.5834 86.4524 58.3029L86.4042 58.275L113.357 42.715ZM78.6546 53.7727C72.5285 49.7965 72.9717 43.5469 79.8498 39.5762C86.7276 35.6056 97.5532 35.3496 104.441 38.8864L78.6546 53.7727ZM93.5561 18.1703C98.1657 18.1302 102.284 20.5752 105.496 24.7401C97.0486 23.8219 88.1122 24.4143 79.9732 26.5054C83.672 21.3809 88.444 18.2301 93.5561 18.1703ZM91.3238 81.6169C85.471 81.685 80.3525 77.691 76.9473 71.2848C85.7921 73.6267 95.8719 74.0599 105.374 72.6022C101.618 78.1222 96.6601 81.5531 91.3238 81.6169Z"
|
||||||
|
fill="currentcolor" />
|
||||||
|
</mask>
|
||||||
|
<g mask="url(#mask1_22_990)">
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||||
|
d="M113.357 42.715L129.829 33.2059C128.859 32.4995 127.789 31.823 126.643 31.1615C121.268 28.0584 114.723 26.0153 107.758 25.023C103.549 19.4606 97.5775 16.1248 90.4344 16.1945C83.6788 16.2821 74.9482 21.9412 68.9271 30.5602C68.096 30.975 67.2847 31.4099 66.4949 31.8659C52.1168 40.1664 49.5542 52.6155 59.0218 61.9309C57.9871 56.1259 58.712 51.0657 62.1231 45.7161C62.0653 46.3482 61.9127 50.143 61.8906 50.7834C61.2209 69.6969 76.9107 84.8409 88.03 84.7113C96.4806 84.6119 103.595 79.6976 108.349 72.0797C114.563 70.8487 120.438 68.786 125.443 65.8968C138.919 58.1167 142.01 46.7146 134.547 37.629L117.948 47.2113C119.71 50.8655 117.997 55.034 112.87 57.9936C107.744 60.9532 100.523 61.9424 94.1928 60.9252C91.3499 60.4563 88.6706 59.5834 86.4524 58.3029L86.4042 58.275L113.357 42.715ZM78.6546 53.7727C72.5285 49.7965 72.9717 43.5469 79.8498 39.5762C86.7276 35.6056 97.5532 35.3496 104.441 38.8864L78.6546 53.7727ZM93.5561 18.1703C98.1657 18.1302 102.284 20.5752 105.496 24.7401C97.0486 23.8219 88.1122 24.4143 79.9732 26.5054C83.672 21.3809 88.444 18.2301 93.5561 18.1703ZM91.3238 81.6169C85.471 81.685 80.3525 77.691 76.9473 71.2848C85.7921 73.6267 95.8719 74.0599 105.374 72.6022C101.618 78.1222 96.6601 81.5531 91.3238 81.6169Z"
|
||||||
|
fill="currentcolor" />
|
||||||
|
<g opacity="0.3" filter="url(#filter2_f_22_990)">
|
||||||
|
<path d="M96.569 55.9995L144.569 83.7122V139.138L96.569 166.85L48.5692 139.138V83.7122L96.569 55.9995Z"
|
||||||
|
fill="#97A3B7" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<ellipse cx="155" cy="78" rx="22" ry="22" transform="rotate(180 155 78)" fill="white" stroke="black" />
|
||||||
|
<path d="M155 83L155 65" stroke="black" />
|
||||||
|
<rect x="155" y="87" width="0.00390625" height="0.00390625" fill="#C4C4C4" stroke="black" stroke-width="2"
|
||||||
|
stroke-linejoin="round" />
|
||||||
|
<path d="M96.5693 112L96.5693 87.9995" stroke="white" stroke-width="2" />
|
||||||
|
<path d="M86.5693 97.9995L96.5693 87.9995L106.569 97.9995" stroke="white" stroke-width="2" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.9 KiB |
@@ -0,0 +1,49 @@
|
|||||||
|
<svg width="200" height="140" viewBox="0 0 200 140" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<mask id="mask0_216_313" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="80" y="9" width="78" height="88">
|
||||||
|
<path d="M119 9L157.105 31V75L119 97L80.8949 75V31L119 9Z" fill="currentColor"/>
|
||||||
|
</mask>
|
||||||
|
<g mask="url(#mask0_216_313)">
|
||||||
|
<path d="M119 9L157.105 31V75L119 97L80.8949 75V31L119 9Z" fill="currentColor"/>
|
||||||
|
<path opacity="0.9" d="M119 -35L157.105 -13V31L119 53L80.8949 31V-13L119 -35Z" fill="currentColor" />
|
||||||
|
<g opacity="0.3" filter="url(#filter0_f_216_313)">
|
||||||
|
<path d="M68 48L106.105 70V114L68 136L29.8949 114V70L68 48Z" fill="#97A3B7"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<mask id="mask1_216_313" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="29" y="48" width="78" height="88">
|
||||||
|
<path d="M68 48L106.105 70V114L68 136L29.8949 114V70L68 48Z" fill="#97A3B7"/>
|
||||||
|
</mask>
|
||||||
|
<g mask="url(#mask1_216_313)">
|
||||||
|
<path d="M68 48L106.105 70V114L68 136L29.8949 114V70L68 48Z" fill="#97A3B7"/>
|
||||||
|
<g filter="url(#filter1_f_216_313)">
|
||||||
|
<rect x="46.3906" y="92" width="80" height="60" fill="#E3E6EB"/>
|
||||||
|
</g>
|
||||||
|
<g filter="url(#filter2_f_216_313)">
|
||||||
|
<rect y="23" width="80" height="60" fill="#E3E6EB"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<path d="M41.8984 86.2866L44.7267 87.9197L44.727 94.4515L41.8987 92.8185L41.8984 86.2866Z" fill="white"/>
|
||||||
|
<path d="M53.9189 93.2273L56.7472 94.8603L56.7474 101.392L53.9191 99.7591L53.9189 93.2273Z" fill="white"/>
|
||||||
|
<path d="M44.7276 107.515L41.8994 105.882L41.8995 109.148L44.7278 110.781L44.7276 107.515L53.9195 112.823L53.9196 116.088L56.7479 117.721L56.7478 114.455L53.9195 112.823L53.9195 109.557L44.7275 104.249L44.7276 107.515Z" fill="white"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M108.348 23.4792C106.188 25.9904 106.535 29.3829 109.395 31.5604C112.66 34.0461 117.963 34.007 121.24 31.4731C124.516 28.9392 124.526 24.8699 121.261 22.3841C118.401 20.2066 113.977 19.9666 110.721 21.6439L115.923 25.6047L113.55 27.4399L108.348 23.4792Z" fill="white"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M120.865 33.0087L129.83 39.8346L132.203 37.9994L123.238 31.1735C122.917 31.521 122.554 31.8531 122.149 32.1657C121.745 32.4784 121.315 32.7594 120.865 33.0087ZM119.662 32.0932C120.123 31.8557 120.561 31.5798 120.967 31.2655C121.373 30.9513 121.73 30.6134 122.035 30.2579L122.035 30.2579C121.73 30.6134 121.373 30.9513 120.967 31.2655C120.561 31.5798 120.123 31.8557 119.662 32.0931L119.662 32.0932Z" fill="white"/>
|
||||||
|
<path d="M144 70L168.249 112H119.751L144 70Z" fill="white" stroke="#181818"/>
|
||||||
|
<path d="M144 100L144 82" stroke="#181818"/>
|
||||||
|
<path d="M144 105H144.004V105.004H144V105Z" stroke="#181818" stroke-width="2" stroke-linejoin="round"/>
|
||||||
|
<defs>
|
||||||
|
<filter id="filter0_f_216_313" x="23.8949" y="42" width="88.2102" height="100" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||||
|
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||||
|
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
||||||
|
<feGaussianBlur stdDeviation="3" result="effect1_foregroundBlur_216_313"/>
|
||||||
|
</filter>
|
||||||
|
<filter id="filter1_f_216_313" x="-3.60938" y="42" width="180" height="160" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||||
|
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||||
|
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
||||||
|
<feGaussianBlur stdDeviation="25" result="effect1_foregroundBlur_216_313"/>
|
||||||
|
</filter>
|
||||||
|
<filter id="filter2_f_216_313" x="-50" y="-27" width="180" height="160" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
||||||
|
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
||||||
|
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
|
||||||
|
<feGaussianBlur stdDeviation="25" result="effect1_foregroundBlur_216_313"/>
|
||||||
|
</filter>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.7 KiB |
@@ -0,0 +1,23 @@
|
|||||||
|
<svg width="200" height="140" viewBox="0 0 200 140" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g mask="url(#mask0_21_716)">
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||||
|
d="M33 46.843L96.3214 119L159.643 46.843C142.742 31.9998 120.583 23 96.3214 23C72.0601 23 49.9009 31.9998 33 46.843Z"
|
||||||
|
fill="#97A3B7" />
|
||||||
|
<g filter="url(#filter0_f_21_716)">
|
||||||
|
<rect x="95" y="21" width="80" height="60" fill="#E3E6EB" />
|
||||||
|
</g>
|
||||||
|
<g filter="url(#filter1_f_21_716)">
|
||||||
|
<rect x="-7" y="43" width="80" height="60" fill="#E3E6EB" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<path
|
||||||
|
d="M72.8122 63.6882L69.6548 66.8455L75.9009 73.0916C71.2469 75.1648 66.9663 77.925 63.188 81.2433L96.3213 119L108.234 105.425L114.647 111.837L117.804 108.68L80.4504 71.3261C80.4505 71.3261 80.4503 71.3261 80.4504 71.3261L72.8122 63.6882Z"
|
||||||
|
fill="currentcolor" />
|
||||||
|
<path
|
||||||
|
d="M129.455 81.2433L114.137 98.6982L85.3974 69.9585C88.9142 69.1786 92.5697 68.7674 96.3213 68.7674C109.016 68.7674 120.611 73.4766 129.455 81.2433Z"
|
||||||
|
fill="currentcolor" />
|
||||||
|
<path
|
||||||
|
d="M152 21.822L156.867 38.875L157 39.3405L157.469 39.2228L174.671 34.911L162.336 47.6522L161.999 48L162.336 48.3478L174.671 61.089L157.469 56.7772L157 56.6595L156.867 57.125L152 74.178L147.133 57.125L147 56.6595L146.531 56.7772L129.329 61.089L141.664 48.3478L142.001 48L141.664 47.6522L129.329 34.911L146.531 39.2228L147 39.3405L147.133 38.875L152 21.822Z"
|
||||||
|
fill="white" stroke="black" />
|
||||||
|
<path d="M101 31L90 42L101 53L93 61" stroke="white" stroke-width="2" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -0,0 +1,13 @@
|
|||||||
|
<svg width="88" height="48" viewBox="0 0 88 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M0 0H88V48H0V0Z" fill="var(--td-component-border)"/>
|
||||||
|
<path d="M42.8627 14.0518V16.7601H44.4877V14.0518H42.8627Z" fill="var(--td-text-color-primary)"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M38.3488 23.9824C38.3488 21.0407 40.7335 18.656 43.6752 18.656C46.6168 18.656 49.0015 21.0407 49.0015 23.9824C49.0015 26.9241 46.6168 29.3088 43.6752 29.3088C40.7335 29.3088 38.3488 26.9241 38.3488 23.9824ZM43.6752 20.281C41.6309 20.281 39.9738 21.9382 39.9738 23.9824C39.9738 26.0266 41.6309 27.6838 43.6752 27.6838C45.7194 27.6838 47.3766 26.0266 47.3766 23.9824C47.3766 21.9382 45.7194 20.281 43.6752 20.281Z" fill="var(--td-text-color-primary)"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M52.208 26.781H49.5867L47.5262 33.48L49.0794 33.9577L49.5903 32.2968H52.2045L52.7154 33.9577L54.2686 33.48L52.208 26.781ZM51.7047 30.6718L51.0077 28.406H50.787L50.0901 30.6718H51.7047Z" fill="var(--td-text-color-primary)"/>
|
||||||
|
<path d="M48.2077 18.3009L50.1225 16.3861L51.2715 17.5351L49.3567 19.4499L48.2077 18.3009Z" fill="var(--td-text-color-primary)"/>
|
||||||
|
<path d="M53.6057 23.1699H50.8974V24.7949H53.6057V23.1699Z" fill="var(--td-text-color-primary)"/>
|
||||||
|
<path d="M44.4877 31.2045V33.9129H42.8627V31.2045H44.4877Z" fill="var(--td-text-color-primary)"/>
|
||||||
|
<path d="M37.2279 31.5786L39.1427 29.6638L37.9936 28.5147L36.0788 30.4295L37.2279 31.5786Z" fill="var(--td-text-color-primary)"/>
|
||||||
|
<path d="M36.453 24.7949H33.7446V23.1699H36.453V24.7949Z" fill="var(--td-text-color-primary)"/>
|
||||||
|
<path d="M36.0788 17.5351L37.9936 19.4499L39.1427 18.3009L37.2279 16.3861L36.0788 17.5351Z" fill="var(--td-text-color-primary)"/>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,5 @@
|
|||||||
|
<svg width="88" height="48" viewBox="0 0 88 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path d="M0 0H88V48H0V0Z" fill="#13161B"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M52.5327 26.8699C52.0346 26.9554 51.5225 26.9999 51 26.9999C46.0294 26.9999 42 22.9705 42 17.9999C42 16.9964 42.1642 16.0313 42.4673 15.1299C38.2268 15.8574 35 19.5518 35 23.9999C35 28.9705 39.0294 32.9999 44 32.9999C47.9671 32.9999 51.3346 30.4332 52.5327 26.8699Z" fill="#949EAA"/>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
After Width: | Height: | Size: 495 B |
@@ -0,0 +1,13 @@
|
|||||||
|
<svg width="88" height="48" viewBox="0 0 88 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect width="88" height="48" fill="var(--td-component-border)"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M43.9999 20.583C42.1129 20.583 40.5832 22.1127 40.5832 23.9997C40.5832 25.8867 42.1129 27.4163 43.9999 27.4163C45.8869 27.4163 47.4166 25.8867 47.4166 23.9997C47.4166 22.1127 45.8869 20.583 43.9999 20.583ZM39.0832 23.9997C39.0832 21.2843 41.2845 19.083 43.9999 19.083C46.7153 19.083 48.9166 21.2843 48.9166 23.9997C48.9166 26.7151 46.7153 28.9163 43.9999 28.9163C41.2845 28.9163 39.0832 26.7151 39.0832 23.9997Z" fill="var(--td-text-color-primary)"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M43.2499 17.333V14.833H44.7499V17.333H43.2499Z" fill="var(--td-text-color-primary)"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M48.1838 18.7552L49.9513 16.9877L51.0119 18.0483L49.2444 19.8158L48.1838 18.7552Z" fill="var(--td-text-color-primary)"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M50.6666 23.2497H53.1666V24.7497H50.6666V23.2497Z" fill="var(--td-text-color-primary)"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M49.2444 28.1835L51.0119 29.951L49.9513 31.0117L48.1838 29.2442L49.2444 28.1835Z" fill="var(--td-text-color-primary)"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M44.7499 30.6663V33.1663H43.2499V30.6663H44.7499Z" fill="var(--td-text-color-primary)"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M39.8162 29.2442L38.0487 31.0117L36.988 29.951L38.7555 28.1835L39.8162 29.2442Z" fill="var(--td-text-color-primary)"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M37.3333 24.7497H34.8333V23.2497H37.3333V24.7497Z" fill="var(--td-text-color-primary)"/>
|
||||||
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M38.7555 19.8158L36.988 18.0483L38.0487 16.9877L39.8162 18.7552L38.7555 19.8158Z" fill="var(--td-text-color-primary)"/>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
After Width: | Height: | Size: 1.9 KiB |
@@ -0,0 +1,51 @@
|
|||||||
|
<svg width="28" height="28" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g clip-path="url(#clip0_2557_23660)">
|
||||||
|
<path
|
||||||
|
d="M9.14038 8.25177H3.53919C3.45719 8.25173 3.37619 8.23372 3.30188 8.19901C3.22758 8.16431 3.16179 8.11375 3.10912 8.05089C3.05646 7.98803 3.01819 7.91439 2.99703 7.83516C2.97587 7.75593 2.97234 7.67303 2.98665 7.59228L3.87785 2.44561C3.90079 2.32052 3.96685 2.20742 4.06455 2.12601C4.16225 2.04459 4.2854 2.00001 4.41258 2.00001H10.2054L9.14038 8.25177Z"
|
||||||
|
fill="url(#paint0_linear_2557_23660)"/>
|
||||||
|
<path d="M13.0301 21.4727H6.77832L9.11772 8.2473H15.3695L13.0301 21.4727Z" fill="url(#paint1_linear_2557_23660)"/>
|
||||||
|
<path
|
||||||
|
d="M11.4707 27.7245H6.34183C6.26051 27.7236 6.18034 27.7051 6.10678 27.6704C6.03322 27.6358 5.96801 27.5856 5.91557 27.5235C5.86313 27.4613 5.82471 27.3886 5.80292 27.3102C5.78113 27.2319 5.77648 27.1497 5.78929 27.0694L6.78297 21.4861H13.0214L11.9965 27.2789C11.9738 27.4025 11.9091 27.5144 11.8132 27.5956C11.7174 27.6769 11.5963 27.7224 11.4707 27.7245Z"
|
||||||
|
fill="url(#paint2_linear_2557_23660)"/>
|
||||||
|
<path
|
||||||
|
d="M26.666 8.25176H9.14062L10.2457 2.01337H27.5795C27.6613 2.01417 27.7419 2.03268 27.8158 2.06763C27.8898 2.10258 27.9552 2.15313 28.0077 2.21581C28.0603 2.27849 28.0986 2.35179 28.12 2.43069C28.1415 2.50959 28.1456 2.59221 28.1321 2.67285L27.2186 7.81953C27.1941 7.94607 27.1246 8.0595 27.0231 8.13892C26.9216 8.21834 26.7948 8.25841 26.666 8.25176V8.25176Z"
|
||||||
|
fill="url(#paint3_linear_2557_23660)"/>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<linearGradient id="paint0_linear_2557_23660" x1="2.71742" y1="5.12812" x2="10.0624" y2="4.98122"
|
||||||
|
gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#0062FF"/>
|
||||||
|
<stop offset="0.26" stop-color="#006AFF"/>
|
||||||
|
<stop offset="0.68" stop-color="#0081FF"/>
|
||||||
|
<stop offset="1" stop-color="#0097FF"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="paint1_linear_2557_23660" x1="12.383" y1="7.62346" x2="9.12269" y2="22.0419"
|
||||||
|
gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#0097FF"/>
|
||||||
|
<stop offset="0.32" stop-color="#0081FF"/>
|
||||||
|
<stop offset="0.74" stop-color="#006AFF"/>
|
||||||
|
<stop offset="1" stop-color="#0062FF"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="paint2_linear_2557_23660" x1="5.63057" y1="27.3635" x2="12.8582" y2="21.4727"
|
||||||
|
gradientUnits="userSpaceOnUse">
|
||||||
|
<stop stop-color="#009EFF"/>
|
||||||
|
<stop offset="0.31" stop-color="#00A3FF"/>
|
||||||
|
<stop offset="0.71" stop-color="#00B3FF"/>
|
||||||
|
<stop offset="1" stop-color="#00C3FF"/>
|
||||||
|
</linearGradient>
|
||||||
|
<linearGradient id="paint3_linear_2557_23660" x1="8.84911" y1="5.12811" x2="27.9399" y2="4.74629"
|
||||||
|
gradientUnits="userSpaceOnUse">
|
||||||
|
<stop offset="0.03" stop-color="#ECFFFE"/>
|
||||||
|
<stop offset="0.19" stop-color="#AFF1D9"/>
|
||||||
|
<stop offset="0.34" stop-color="#79E5B9"/>
|
||||||
|
<stop offset="0.49" stop-color="#4EDB9F"/>
|
||||||
|
<stop offset="0.63" stop-color="#2CD48A"/>
|
||||||
|
<stop offset="0.77" stop-color="#14CE7C"/>
|
||||||
|
<stop offset="0.89" stop-color="#05CB73"/>
|
||||||
|
<stop offset="1" stop-color="#00CA70"/>
|
||||||
|
</linearGradient>
|
||||||
|
<clipPath id="clip0_2557_23660">
|
||||||
|
<rect width="25.1407" height="25.72" fill="white" transform="translate(2.97754 2)"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 3.2 KiB |
@@ -0,0 +1,86 @@
|
|||||||
|
.boardPanelDark {
|
||||||
|
background: var(--td-brand-color) !important;
|
||||||
|
.boardTitle,
|
||||||
|
.boardItemLeft,
|
||||||
|
.boardItemDesc,
|
||||||
|
.trendColorUp,
|
||||||
|
.trendColorDown,
|
||||||
|
.boardItemBottom {
|
||||||
|
color: var(--td-text-color-anti);
|
||||||
|
}
|
||||||
|
.trendIconUp,
|
||||||
|
.trendIconDown {
|
||||||
|
background: var(--td-brand-color-5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.boardPanel {
|
||||||
|
:global {
|
||||||
|
.t-card__body {
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.boardTitle {
|
||||||
|
line-height: 22px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: var(--td-text-color-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.boardItem {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boardItemLeft {
|
||||||
|
display: inline-block;
|
||||||
|
color: var(--td-text-color-primary);
|
||||||
|
font-size: 27px;
|
||||||
|
line-height: 44px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boardItemBottom {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boardItemIcon {
|
||||||
|
opacity: 0.6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boardItemDesc {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
line-height: 22px;
|
||||||
|
color: var(--td-text-color-placeholder);
|
||||||
|
}
|
||||||
|
|
||||||
|
.trendIcon {
|
||||||
|
border-radius: 50%;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
margin-left: 8px;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.trendIconUp {
|
||||||
|
background: var(--td-error-color-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.trendIconDown {
|
||||||
|
background: var(--td-success-color-2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.trendColorUp {
|
||||||
|
color: #e34d59;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.trendColorDown {
|
||||||
|
color: #00a870;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { ChevronRightIcon } from 'tdesign-icons-react';
|
||||||
|
import { Card } from 'tdesign-react';
|
||||||
|
import classnames from 'classnames';
|
||||||
|
import Style from './index.module.less';
|
||||||
|
|
||||||
|
export enum ETrend {
|
||||||
|
up,
|
||||||
|
down,
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IBoardProps extends React.HTMLAttributes<HTMLElement> {
|
||||||
|
title?: string;
|
||||||
|
count?: string;
|
||||||
|
Icon?: React.ReactElement;
|
||||||
|
desc?: string;
|
||||||
|
trend?: ETrend;
|
||||||
|
trendNum?: string;
|
||||||
|
dark?: boolean;
|
||||||
|
border?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export const TrendIcon = ({ trend, trendNum }: { trend?: ETrend; trendNum?: string | number }) => (
|
||||||
|
<div
|
||||||
|
className={classnames({
|
||||||
|
[Style.trendColorUp]: trend === ETrend.up,
|
||||||
|
[Style.trendColorDown]: trend === ETrend.down,
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className={classnames(Style.trendIcon, {
|
||||||
|
[Style.trendIconUp]: trend === ETrend.up,
|
||||||
|
[Style.trendIconDown]: trend === ETrend.down,
|
||||||
|
})}
|
||||||
|
>
|
||||||
|
{trend === ETrend.up ? (
|
||||||
|
<svg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'>
|
||||||
|
<path d='M4.5 8L8 4.5L11.5 8' stroke='currentColor' strokeWidth='1.5' />
|
||||||
|
<path d='M8 5V12' stroke='currentColor' strokeWidth='1.5' />
|
||||||
|
</svg>
|
||||||
|
) : (
|
||||||
|
<svg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'>
|
||||||
|
<path d='M11.5 8L8 11.5L4.5 8' stroke='currentColor' strokeWidth='1.5' />
|
||||||
|
<path d='M8 11L8 4' stroke='currentColor' strokeWidth='1.5' />
|
||||||
|
</svg>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
{trendNum}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
|
||||||
|
const Board = ({ title, count, desc, trend, trendNum, Icon, dark, border = false }: IBoardProps) => (
|
||||||
|
<Card
|
||||||
|
title={<span className={Style.boardTitle}>{title}</span>}
|
||||||
|
className={classnames({
|
||||||
|
[Style.boardPanelDark]: dark,
|
||||||
|
[Style.boardPanel]: true,
|
||||||
|
})}
|
||||||
|
bordered={border}
|
||||||
|
footer={
|
||||||
|
<div className={Style.boardItemBottom}>
|
||||||
|
<div className={Style.boardItemDesc}>
|
||||||
|
{desc}
|
||||||
|
<TrendIcon trend={trend} trendNum={trendNum} />
|
||||||
|
</div>
|
||||||
|
<ChevronRightIcon className={Style.boardItemIcon} />
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<div className={Style.boardItem}>
|
||||||
|
<div className={Style.boardItemLeft}>{count}</div>
|
||||||
|
<div className={Style.boardItemRight}>{Icon}</div>
|
||||||
|
</div>
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default React.memo(Board);
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { DateRangePicker, DateRangeValue } from 'tdesign-react';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
|
||||||
|
const RECENT_7_DAYS: DateRangeValue = [
|
||||||
|
dayjs().subtract(7, 'day').format('YYYY-MM-DD'),
|
||||||
|
dayjs().subtract(1, 'day').format('YYYY-MM-DD'),
|
||||||
|
];
|
||||||
|
|
||||||
|
const LastWeekDatePicker = (onChange: (value: DateRangeValue) => void) => (
|
||||||
|
<DateRangePicker
|
||||||
|
mode='date'
|
||||||
|
placeholder={['开始时间', '结束时间']}
|
||||||
|
value={RECENT_7_DAYS}
|
||||||
|
format='YYYY-MM-DD'
|
||||||
|
onChange={(value) => onChange(value)}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default LastWeekDatePicker;
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
.errorBox {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
height: 75vh;
|
||||||
|
padding: 24px;
|
||||||
|
min-height: 400px;
|
||||||
|
color: var(--td-brand-color);
|
||||||
|
img {
|
||||||
|
width: 200px;
|
||||||
|
height: 140px;
|
||||||
|
color: var(--td-brand-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 28px;
|
||||||
|
margin-top: 8px;
|
||||||
|
color: var(--td-text-color-primary);
|
||||||
|
}
|
||||||
|
.description {
|
||||||
|
margin: 8px 0 32px;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 22px;
|
||||||
|
color: var(--td-text-color-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.rightButton {
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
import React, { memo } from 'react';
|
||||||
|
import { Button } from 'tdesign-react';
|
||||||
|
|
||||||
|
import Light403Icon from 'assets/svg/assets-result-403.svg?component';
|
||||||
|
import Light404Icon from 'assets/svg/assets-result-404.svg?component';
|
||||||
|
import Light500Icon from 'assets/svg/assets-result-500.svg?component';
|
||||||
|
import style from './index.module.less';
|
||||||
|
|
||||||
|
enum ECode {
|
||||||
|
forbidden = 403,
|
||||||
|
notFount = 404,
|
||||||
|
error = 500,
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IErrorPageProps {
|
||||||
|
code: ECode;
|
||||||
|
title?: string;
|
||||||
|
desc?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const errorInfo = {
|
||||||
|
[ECode.forbidden]: {
|
||||||
|
title: '403 Forbidden',
|
||||||
|
desc: '抱歉,您无权限访问此页面',
|
||||||
|
icon: <Light403Icon />,
|
||||||
|
},
|
||||||
|
[ECode.notFount]: {
|
||||||
|
title: '404 Not Found',
|
||||||
|
desc: '抱歉,您访问的页面不存在。',
|
||||||
|
icon: <Light404Icon />,
|
||||||
|
},
|
||||||
|
[ECode.error]: {
|
||||||
|
title: '500 Internal Server Error',
|
||||||
|
desc: '抱歉,服务器出错啦!',
|
||||||
|
icon: <Light500Icon />,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const ErrorPage: React.FC<IErrorPageProps> = (props) => {
|
||||||
|
const info = errorInfo[props.code];
|
||||||
|
return (
|
||||||
|
<div className={style.errorBox}>
|
||||||
|
{info?.icon}
|
||||||
|
<div className={style.title}>{info?.title}</div>
|
||||||
|
<div className={style.description}>{info?.desc}</div>
|
||||||
|
<Button theme='primary'>返回首页</Button>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default memo(ErrorPage);
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
import { ETheme } from 'types/index.d';
|
||||||
|
|
||||||
|
export const defaultColor = ['#0052d9', '#0594fa', '#00a870', '#ebb105', '#ed7b2f', '#e34d59', '#ed49b4', '#834ec2'];
|
||||||
|
|
||||||
|
export const darkColor = ['#4582e6', '#29a4fb', '#03a56f', '#ca8d03', '#ed7b2f', '#ea7b84', '#f172c5', '#ab87d5'];
|
||||||
|
|
||||||
|
export const CHART_COLORS = {
|
||||||
|
[ETheme.light]: {
|
||||||
|
textColor: 'rgba(0, 0, 0, 0.9)',
|
||||||
|
placeholderColor: 'rgba(0, 0, 0, 0.35)',
|
||||||
|
borderColor: '#dcdcdc',
|
||||||
|
containerColor: '#fff',
|
||||||
|
},
|
||||||
|
[ETheme.dark]: {
|
||||||
|
textColor: 'rgba(255, 255, 255, 0.9)',
|
||||||
|
placeholderColor: 'rgba(255, 255, 255, 0.35)',
|
||||||
|
borderColor: '#5e5e5e',
|
||||||
|
containerColor: '#242424',
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
export default {
|
||||||
|
mock: {
|
||||||
|
// 本地mock数据
|
||||||
|
API: '',
|
||||||
|
},
|
||||||
|
development: {
|
||||||
|
// 开发环境接口请求
|
||||||
|
API: 'https://service-exndqyuk-1257786608.gz.apigw.tencentcs.com',
|
||||||
|
},
|
||||||
|
test: {
|
||||||
|
// 测试环境接口地址
|
||||||
|
API: 'https://service-exndqyuk-1257786608.gz.apigw.tencentcs.com',
|
||||||
|
},
|
||||||
|
release: {
|
||||||
|
// 正式环境接口地址
|
||||||
|
API: 'https://service-bv448zsw-1257786608.gz.apigw.tencentcs.com',
|
||||||
|
},
|
||||||
|
site: {
|
||||||
|
// TDesign部署特殊需要 与release功能一致
|
||||||
|
API: 'https://service-bv448zsw-1257786608.gz.apigw.tencentcs.com',
|
||||||
|
},
|
||||||
|
};
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
declare module '*.avif' {
|
||||||
|
export default src as string;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module '*.bmp' {
|
||||||
|
export default src as string;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module '*.gif' {
|
||||||
|
export default src as string;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module '*.jpg' {
|
||||||
|
export default src as string;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module '*.jpeg' {
|
||||||
|
export default src as string;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module '*.png' {
|
||||||
|
export default src as string;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module '*.webp' {
|
||||||
|
export default src as string;
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module '*.svg' {
|
||||||
|
export default src as string;
|
||||||
|
}
|
||||||
|
declare module '*.svg?component' {
|
||||||
|
export default src as string;
|
||||||
|
}
|
||||||
|
declare module '*.module.css' {
|
||||||
|
export default classes as { readonly [key: string]: string };
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module '*.module.less' {
|
||||||
|
export default classes as { readonly [key: string]: string };
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module '*.less' {
|
||||||
|
export default classes as { readonly [key: string]: string };
|
||||||
|
}
|
||||||
|
|
||||||
|
declare module 'tvision-color';
|
||||||
|
|
||||||
|
declare interface ImportMeta {
|
||||||
|
env: {
|
||||||
|
MODE: 'development' | 'test' | 'release' | 'mock' | 'site';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
import { useMemo } from 'react';
|
||||||
|
import { useAppSelector } from 'modules/store';
|
||||||
|
import { selectGlobal } from 'modules/global';
|
||||||
|
import { getChartColor } from 'utils/color';
|
||||||
|
import { CHART_COLORS } from 'configs/color';
|
||||||
|
import lodashSet from 'lodash/set';
|
||||||
|
import lodashMap from 'lodash/map';
|
||||||
|
import { ETheme } from '../types';
|
||||||
|
|
||||||
|
export type TChartColorKey = keyof (typeof CHART_COLORS)[ETheme.light];
|
||||||
|
/**
|
||||||
|
* 根据当前主题色返回动态的图表颜色列表
|
||||||
|
* @param options 图表的固定配置
|
||||||
|
* @param configs 需要动态变换颜色的字段
|
||||||
|
* @returns string[]
|
||||||
|
*/
|
||||||
|
export default function useDynamicChart(
|
||||||
|
options: Record<string, any>,
|
||||||
|
configs?: Partial<Record<TChartColorKey, Array<string>>>,
|
||||||
|
) {
|
||||||
|
const { theme, color } = useAppSelector(selectGlobal);
|
||||||
|
return useMemo(() => {
|
||||||
|
const dynamicColor = getChartColor(theme, color);
|
||||||
|
const newOptions = {
|
||||||
|
...options,
|
||||||
|
};
|
||||||
|
// 设置动态的图表颜色
|
||||||
|
lodashSet(newOptions, 'color', dynamicColor.colorList);
|
||||||
|
if (configs) {
|
||||||
|
lodashMap(configs, (config, configKey: TChartColorKey) => {
|
||||||
|
config?.map((val) => lodashSet(newOptions, val, dynamicColor[configKey]));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return newOptions;
|
||||||
|
}, [theme, color, options]);
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
.sidePanel {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sideContainer {
|
||||||
|
flex: 1;
|
||||||
|
min-width: 760px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topPanel {
|
||||||
|
min-width: 1150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mixPanel {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mixMain {
|
||||||
|
flex-direction: row!important;
|
||||||
|
flex: 1;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mixContent {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { Layout } from 'tdesign-react';
|
||||||
|
import { ELayout } from 'modules/global';
|
||||||
|
import Header from './Header';
|
||||||
|
import Footer from './Footer';
|
||||||
|
import Menu from './Menu';
|
||||||
|
import classnames from 'classnames';
|
||||||
|
import Content from './AppRouter';
|
||||||
|
|
||||||
|
import Style from './AppLayout.module.less';
|
||||||
|
|
||||||
|
const SideLayout = React.memo(() => (
|
||||||
|
<Layout className={classnames(Style.sidePanel, 'narrow-scrollbar')}>
|
||||||
|
<Menu showLogo showOperation />
|
||||||
|
<Layout className={Style.sideContainer}>
|
||||||
|
<Header />
|
||||||
|
<Content />
|
||||||
|
<Footer />
|
||||||
|
</Layout>
|
||||||
|
</Layout>
|
||||||
|
));
|
||||||
|
|
||||||
|
const TopLayout = React.memo(() => (
|
||||||
|
<Layout className={Style.topPanel}>
|
||||||
|
<Header showMenu />
|
||||||
|
<Content />
|
||||||
|
<Footer />
|
||||||
|
</Layout>
|
||||||
|
));
|
||||||
|
|
||||||
|
const MixLayout = React.memo(() => (
|
||||||
|
<Layout className={Style.mixPanel}>
|
||||||
|
<Header />
|
||||||
|
<Layout className={Style.mixMain}>
|
||||||
|
<Menu />
|
||||||
|
<Layout className={Style.mixContent}>
|
||||||
|
<Content />
|
||||||
|
<Footer />
|
||||||
|
</Layout>
|
||||||
|
</Layout>
|
||||||
|
</Layout>
|
||||||
|
));
|
||||||
|
|
||||||
|
const FullPageLayout = React.memo(() => <Content />);
|
||||||
|
|
||||||
|
export default {
|
||||||
|
[ELayout.side]: SideLayout,
|
||||||
|
[ELayout.top]: TopLayout,
|
||||||
|
[ELayout.mix]: MixLayout,
|
||||||
|
[ELayout.fullPage]: FullPageLayout,
|
||||||
|
};
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
.loading {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-content: center;
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
import React, { Suspense, memo } from 'react';
|
||||||
|
import { Routes, Route, Navigate } from 'react-router-dom';
|
||||||
|
import { Layout, Loading } from 'tdesign-react';
|
||||||
|
import routers, { IRouter } from 'router';
|
||||||
|
import { resolve } from 'utils/path';
|
||||||
|
import Page from './Page';
|
||||||
|
import Style from './AppRouter.module.less';
|
||||||
|
|
||||||
|
const { Content } = Layout;
|
||||||
|
|
||||||
|
type TRenderRoutes = (routes: IRouter[], parentPath?: string, breadcrumbs?: string[]) => React.ReactNode[];
|
||||||
|
/**
|
||||||
|
* 渲染应用路由
|
||||||
|
* @param routes
|
||||||
|
* @param parentPath
|
||||||
|
* @param breadcrumb
|
||||||
|
*/
|
||||||
|
const renderRoutes: TRenderRoutes = (routes, parentPath = '', breadcrumb = []) =>
|
||||||
|
routes.map((route, index: number) => {
|
||||||
|
const { Component, children, redirect, meta } = route;
|
||||||
|
const currentPath = resolve(parentPath, route.path);
|
||||||
|
let currentBreadcrumb = breadcrumb;
|
||||||
|
|
||||||
|
if (meta?.title) {
|
||||||
|
currentBreadcrumb = currentBreadcrumb.concat([meta?.title]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (redirect) {
|
||||||
|
// 重定向
|
||||||
|
return <Route key={index} path={currentPath} element={<Navigate to={redirect} replace />} />;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Component) {
|
||||||
|
// 有路由菜单
|
||||||
|
return (
|
||||||
|
<Route
|
||||||
|
key={index}
|
||||||
|
path={currentPath}
|
||||||
|
element={
|
||||||
|
<Page isFullPage={route.isFullPage} breadcrumbs={currentBreadcrumb}>
|
||||||
|
<Component />
|
||||||
|
</Page>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// 无路由菜单
|
||||||
|
return children ? renderRoutes(children, currentPath, currentBreadcrumb) : null;
|
||||||
|
});
|
||||||
|
|
||||||
|
const AppRouter = () => (
|
||||||
|
<Content>
|
||||||
|
<Suspense
|
||||||
|
fallback={
|
||||||
|
<div className={Style.loading}>
|
||||||
|
<Loading />
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Routes>{renderRoutes(routers)}</Routes>
|
||||||
|
</Suspense>
|
||||||
|
</Content>
|
||||||
|
);
|
||||||
|
|
||||||
|
export default memo(AppRouter);
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { Layout, Row } from 'tdesign-react';
|
||||||
|
import { useAppSelector } from 'modules/store';
|
||||||
|
import { selectGlobal } from 'modules/global';
|
||||||
|
|
||||||
|
const { Footer: TFooter } = Layout;
|
||||||
|
|
||||||
|
const Footer = () => {
|
||||||
|
const globalState = useAppSelector(selectGlobal);
|
||||||
|
if (!globalState.showFooter) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<TFooter>
|
||||||
|
<Row justify='center'>Copyright © 2022-{new Date().getFullYear()} Tencent. All Rights Reserved</Row>
|
||||||
|
</TFooter>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default React.memo(Footer);
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
.header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
.badge {
|
||||||
|
:global {
|
||||||
|
.t-badge--circle {
|
||||||
|
top: 5px;
|
||||||
|
right: 6px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.menuIcon {
|
||||||
|
width: 30px !important;
|
||||||
|
height: 30px !important;
|
||||||
|
}
|
||||||
|
.dropItem {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
span {
|
||||||
|
margin-left: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.dropdown {
|
||||||
|
padding-left: 0;
|
||||||
|
padding-right: 0;
|
||||||
|
.icon {
|
||||||
|
font-size: 20px;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 5px;
|
||||||
|
}
|
||||||
|
:global {
|
||||||
|
.t-button--variant-text {
|
||||||
|
padding-left: 9px;
|
||||||
|
padding-right: 9px;
|
||||||
|
}
|
||||||
|
.t-button__text {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.t-dropdown__item {
|
||||||
|
max-width: none !important;
|
||||||
|
width: 117px;
|
||||||
|
&-text {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.t-icon {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,100 @@
|
|||||||
|
import React, { memo } from 'react';
|
||||||
|
import { useNavigate } from 'react-router-dom';
|
||||||
|
import { Button, Popup, Badge, Dropdown, Space } from 'tdesign-react';
|
||||||
|
import {
|
||||||
|
Icon,
|
||||||
|
LogoGithubIcon,
|
||||||
|
MailIcon,
|
||||||
|
HelpCircleIcon,
|
||||||
|
SettingIcon,
|
||||||
|
PoweroffIcon,
|
||||||
|
UserCircleIcon,
|
||||||
|
} from 'tdesign-icons-react';
|
||||||
|
import { useAppDispatch } from 'modules/store';
|
||||||
|
import { toggleSetting } from 'modules/global';
|
||||||
|
import { logout } from 'modules/user';
|
||||||
|
import Style from './HeaderIcon.module.less';
|
||||||
|
|
||||||
|
const { DropdownMenu, DropdownItem } = Dropdown;
|
||||||
|
|
||||||
|
export default memo(() => {
|
||||||
|
const dispatch = useAppDispatch();
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
const gotoWiki = () => {
|
||||||
|
window.open('https://tdesign.tencent.com/react/overview');
|
||||||
|
};
|
||||||
|
|
||||||
|
const gotoGitHub = () => {
|
||||||
|
window.open('https://github.com/Tencent/tdesign-react-starter');
|
||||||
|
};
|
||||||
|
|
||||||
|
const clickHandler = (data: any) => {
|
||||||
|
if (data.value === 1) {
|
||||||
|
navigate('/user/index');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const handleLogout = async () => {
|
||||||
|
await dispatch(logout());
|
||||||
|
navigate('/login/index');
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Space align='center'>
|
||||||
|
<Badge className={Style.badge} count={6} dot={false} maxCount={99} shape='circle' showZero={false} size='medium'>
|
||||||
|
<Button className={Style.menuIcon} shape='square' size='large' variant='text' icon={<MailIcon />} />
|
||||||
|
</Badge>
|
||||||
|
<Popup content='代码仓库' placement='bottom' showArrow destroyOnClose>
|
||||||
|
<Button
|
||||||
|
className={Style.menuIcon}
|
||||||
|
shape='square'
|
||||||
|
size='large'
|
||||||
|
variant='text'
|
||||||
|
onClick={gotoGitHub}
|
||||||
|
icon={<LogoGithubIcon />}
|
||||||
|
/>
|
||||||
|
</Popup>
|
||||||
|
<Popup content='帮助文档' placement='bottom' showArrow destroyOnClose>
|
||||||
|
<Button
|
||||||
|
className={Style.menuIcon}
|
||||||
|
shape='square'
|
||||||
|
size='large'
|
||||||
|
variant='text'
|
||||||
|
onClick={gotoWiki}
|
||||||
|
icon={<HelpCircleIcon />}
|
||||||
|
/>
|
||||||
|
</Popup>
|
||||||
|
<Dropdown trigger={'click'} onClick={clickHandler}>
|
||||||
|
<Button variant='text' className={Style.dropdown}>
|
||||||
|
<Icon name='user-circle' className={Style.icon} />
|
||||||
|
<span className={Style.text}>Tencent</span>
|
||||||
|
<Icon name='chevron-down' className={Style.icon} />
|
||||||
|
</Button>
|
||||||
|
<DropdownMenu>
|
||||||
|
<DropdownItem value={1}>
|
||||||
|
<div className={Style.dropItem}>
|
||||||
|
<UserCircleIcon />
|
||||||
|
<span>个人中心</span>
|
||||||
|
</div>
|
||||||
|
</DropdownItem>
|
||||||
|
<DropdownItem value={1} onClick={handleLogout}>
|
||||||
|
<div className={Style.dropItem}>
|
||||||
|
<PoweroffIcon />
|
||||||
|
<span>退出登录</span>
|
||||||
|
</div>
|
||||||
|
</DropdownItem>
|
||||||
|
</DropdownMenu>
|
||||||
|
</Dropdown>
|
||||||
|
<Popup content='页面设置' placement='bottom' showArrow destroyOnClose>
|
||||||
|
<Button
|
||||||
|
className={Style.menuIcon}
|
||||||
|
shape='square'
|
||||||
|
size='large'
|
||||||
|
variant='text'
|
||||||
|
onClick={() => dispatch(toggleSetting())}
|
||||||
|
icon={<SettingIcon />}
|
||||||
|
/>
|
||||||
|
</Popup>
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
});
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
.panel {
|
||||||
|
:global {
|
||||||
|
.t-input {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
.t-input:hover {
|
||||||
|
background: var(--td-bg-color-secondarycontainer);
|
||||||
|
transition: background var(--td-anim-duration-base) linear
|
||||||
|
}
|
||||||
|
.t-input--focused {
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { Input } from 'tdesign-react';
|
||||||
|
import { SearchIcon } from 'tdesign-icons-react';
|
||||||
|
import Style from './Search.module.less';
|
||||||
|
|
||||||
|
const Search = () => <Input className={Style.panel} prefixIcon={<SearchIcon />} placeholder='请输入搜索内容' />;
|
||||||
|
|
||||||
|
export default React.memo(Search);
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
.panel {
|
||||||
|
flex-shrink: 0;
|
||||||
|
padding-left: 20px;
|
||||||
|
padding-right: 20px;
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 101;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
border-bottom: 1px solid var(--td-component-stroke);
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
import React, { memo } from 'react';
|
||||||
|
import { Layout, Button, Space } from 'tdesign-react';
|
||||||
|
import { ViewListIcon } from 'tdesign-icons-react';
|
||||||
|
import { useAppDispatch, useAppSelector } from 'modules/store';
|
||||||
|
import { selectGlobal, toggleMenu } from 'modules/global';
|
||||||
|
import HeaderIcon from './HeaderIcon';
|
||||||
|
import { HeaderMenu } from '../Menu';
|
||||||
|
import Search from './Search';
|
||||||
|
import Style from './index.module.less';
|
||||||
|
|
||||||
|
const { Header } = Layout;
|
||||||
|
|
||||||
|
export default memo((props: { showMenu?: boolean }) => {
|
||||||
|
const globalState = useAppSelector(selectGlobal);
|
||||||
|
const dispatch = useAppDispatch();
|
||||||
|
|
||||||
|
if (!globalState.showHeader) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
let HeaderLeft;
|
||||||
|
if (props.showMenu) {
|
||||||
|
HeaderLeft = (
|
||||||
|
<div>
|
||||||
|
<HeaderMenu />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
HeaderLeft = (
|
||||||
|
<Space align='center'>
|
||||||
|
<Button
|
||||||
|
shape='square'
|
||||||
|
size='large'
|
||||||
|
variant='text'
|
||||||
|
onClick={() => dispatch(toggleMenu(null))}
|
||||||
|
icon={<ViewListIcon />}
|
||||||
|
/>
|
||||||
|
<Search />
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Header className={Style.panel}>
|
||||||
|
{HeaderLeft}
|
||||||
|
<HeaderIcon />
|
||||||
|
</Header>
|
||||||
|
);
|
||||||
|
});
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
.menuPanel {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menuTip {
|
||||||
|
color: var(--td-text-color-primary);
|
||||||
|
opacity: 0.4;
|
||||||
|
height: 38px;
|
||||||
|
line-height: 38px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menuLogo {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
cursor: pointer;
|
||||||
|
color: var(--td-text-color-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.menuMiniLogo {
|
||||||
|
width: 28px;
|
||||||
|
height: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.logoFull {
|
||||||
|
color: var(--td-text-color-primary);
|
||||||
|
width: 184px;
|
||||||
|
height: 32px;
|
||||||
|
}
|
||||||
@@ -0,0 +1,115 @@
|
|||||||
|
import React, { memo, useState } from 'react';
|
||||||
|
import { useNavigate, useLocation } from 'react-router-dom';
|
||||||
|
import { Menu, MenuValue } from 'tdesign-react';
|
||||||
|
import router, { IRouter } from 'router';
|
||||||
|
import { resolve } from 'utils/path';
|
||||||
|
import { useAppSelector } from 'modules/store';
|
||||||
|
import { selectGlobal } from 'modules/global';
|
||||||
|
import MenuLogo from './MenuLogo';
|
||||||
|
import Style from './Menu.module.less';
|
||||||
|
|
||||||
|
const { SubMenu, MenuItem, HeadMenu } = Menu;
|
||||||
|
|
||||||
|
interface IMenuProps {
|
||||||
|
showLogo?: boolean;
|
||||||
|
showOperation?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
const renderMenuItems = (menu: IRouter[], parentPath = '') => {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
return menu.map((item) => {
|
||||||
|
const { children, meta, path } = item;
|
||||||
|
|
||||||
|
if (!meta || meta?.hidden === true) {
|
||||||
|
// 无meta信息 或 hidden == true,路由不显示为菜单
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { Icon, title, single } = meta;
|
||||||
|
const routerPath = resolve(parentPath, path);
|
||||||
|
|
||||||
|
if (!children || children.length === 0) {
|
||||||
|
return (
|
||||||
|
<MenuItem
|
||||||
|
key={routerPath}
|
||||||
|
value={routerPath}
|
||||||
|
icon={Icon ? <Icon /> : undefined}
|
||||||
|
onClick={() => navigate(routerPath)}
|
||||||
|
>
|
||||||
|
{title}
|
||||||
|
</MenuItem>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (single && children?.length > 0) {
|
||||||
|
const firstChild = children[0];
|
||||||
|
if (firstChild?.meta && !firstChild?.meta?.hidden) {
|
||||||
|
const { Icon, title } = meta;
|
||||||
|
const singlePath = resolve(resolve(parentPath, path), firstChild.path);
|
||||||
|
return (
|
||||||
|
<MenuItem
|
||||||
|
key={singlePath}
|
||||||
|
value={singlePath}
|
||||||
|
icon={Icon ? <Icon /> : undefined}
|
||||||
|
onClick={() => navigate(singlePath)}
|
||||||
|
>
|
||||||
|
{title}
|
||||||
|
</MenuItem>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<SubMenu key={routerPath} value={routerPath} title={title} icon={Icon ? <Icon /> : undefined}>
|
||||||
|
{renderMenuItems(children, routerPath)}
|
||||||
|
</SubMenu>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 顶部菜单
|
||||||
|
*/
|
||||||
|
export const HeaderMenu = memo(() => {
|
||||||
|
const globalState = useAppSelector(selectGlobal);
|
||||||
|
const location = useLocation();
|
||||||
|
const [active, setActive] = useState<MenuValue>(location.pathname); // todo
|
||||||
|
|
||||||
|
return (
|
||||||
|
<HeadMenu
|
||||||
|
expandType='popup'
|
||||||
|
style={{ marginBottom: 20 }}
|
||||||
|
value={active}
|
||||||
|
theme={globalState.theme}
|
||||||
|
onChange={(v) => setActive(v)}
|
||||||
|
>
|
||||||
|
{renderMenuItems(router)}
|
||||||
|
</HeadMenu>
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 左侧菜单
|
||||||
|
*/
|
||||||
|
export default memo((props: IMenuProps) => {
|
||||||
|
const location = useLocation();
|
||||||
|
const globalState = useAppSelector(selectGlobal);
|
||||||
|
|
||||||
|
const { version } = globalState;
|
||||||
|
const bottomText = globalState.collapsed ? version : `元境幻生管理台 ${version}`;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Menu
|
||||||
|
width='232px'
|
||||||
|
style={{ flexShrink: 0, height: '100%' }}
|
||||||
|
className={Style.menuPanel2}
|
||||||
|
value={location.pathname}
|
||||||
|
theme={globalState.theme}
|
||||||
|
collapsed={globalState.collapsed}
|
||||||
|
operations={props.showOperation ? <div className={Style.menuTip}>{bottomText}</div> : undefined}
|
||||||
|
logo={props.showLogo ? <MenuLogo collapsed={globalState.collapsed} /> : undefined}
|
||||||
|
>
|
||||||
|
{renderMenuItems(router)}
|
||||||
|
</Menu>
|
||||||
|
);
|
||||||
|
});
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import React, { memo } from 'react';
|
||||||
|
import Style from './Menu.module.less';
|
||||||
|
import FullLogo from 'assets/svg/assets-logo-full.svg?component';
|
||||||
|
import MiniLogo from 'assets/svg/assets-t-logo.svg?component';
|
||||||
|
import { useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
|
interface IProps {
|
||||||
|
collapsed?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default memo((props: IProps) => {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
const handleClick = () => {
|
||||||
|
navigate('/');
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={Style.menuLogo} onClick={handleClick}>
|
||||||
|
{props.collapsed ? <MiniLogo /> : <FullLogo />}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
});
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
.panel {
|
||||||
|
margin: 24px;
|
||||||
|
padding: 0;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.breadcrumb {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
import React, { useEffect } from 'react';
|
||||||
|
import { useAppDispatch, useAppSelector } from '../../modules/store';
|
||||||
|
import { selectGlobal, switchFullPage } from '../../modules/global';
|
||||||
|
import { Layout, Breadcrumb } from 'tdesign-react';
|
||||||
|
import Style from './Page.module.less';
|
||||||
|
|
||||||
|
const { Content } = Layout;
|
||||||
|
const { BreadcrumbItem } = Breadcrumb;
|
||||||
|
|
||||||
|
const Page = ({
|
||||||
|
children,
|
||||||
|
isFullPage,
|
||||||
|
breadcrumbs,
|
||||||
|
}: React.PropsWithChildren<{ isFullPage?: boolean; breadcrumbs?: string[] }>) => {
|
||||||
|
const globalState = useAppSelector(selectGlobal);
|
||||||
|
const dispatch = useAppDispatch();
|
||||||
|
useEffect(() => {
|
||||||
|
dispatch(switchFullPage(isFullPage));
|
||||||
|
}, [isFullPage]);
|
||||||
|
|
||||||
|
if (isFullPage) {
|
||||||
|
return <>{children}</>;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Content className={Style.panel}>
|
||||||
|
{globalState.showBreadcrumbs && (
|
||||||
|
<Breadcrumb className={Style.breadcrumb}>
|
||||||
|
{breadcrumbs?.map((item, index) => (
|
||||||
|
<BreadcrumbItem key={index}>{item}</BreadcrumbItem>
|
||||||
|
))}
|
||||||
|
</Breadcrumb>
|
||||||
|
)}
|
||||||
|
{children}
|
||||||
|
</Content>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default React.memo(Page);
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
.panel {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box {
|
||||||
|
cursor: pointer;
|
||||||
|
border: 2px solid;
|
||||||
|
padding: 4px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
import React, { useState } from 'react';
|
||||||
|
import { defaultColor } from 'configs/color';
|
||||||
|
import { Popup, ColorPickerPanel } from 'tdesign-react';
|
||||||
|
import Style from './RadioColor.module.less';
|
||||||
|
|
||||||
|
interface IProps {
|
||||||
|
defaultValue?: number | string;
|
||||||
|
onChange: (color: string) => void;
|
||||||
|
}
|
||||||
|
|
||||||
|
const RadioColor = (props: IProps) => {
|
||||||
|
const [isColoPickerDisplay, onPopupVisibleChange] = useState(false);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={Style.panel}>
|
||||||
|
{defaultColor.map((color, index) => (
|
||||||
|
<div
|
||||||
|
key={index}
|
||||||
|
onClick={() => props?.onChange(color)}
|
||||||
|
className={Style.box}
|
||||||
|
style={{ borderColor: props.defaultValue === color && !isColoPickerDisplay ? color : 'transparent' }}
|
||||||
|
>
|
||||||
|
<div className={Style.item} style={{ backgroundColor: color }} />
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
|
||||||
|
<Popup
|
||||||
|
trigger='click'
|
||||||
|
placement='bottom-right'
|
||||||
|
expandAnimation
|
||||||
|
visible={isColoPickerDisplay}
|
||||||
|
onVisibleChange={(v) => onPopupVisibleChange(v)}
|
||||||
|
overlayInnerStyle={{ padding: 0 }}
|
||||||
|
content={
|
||||||
|
<ColorPickerPanel
|
||||||
|
onChange={(v) => props?.onChange(v)}
|
||||||
|
colorModes={['monochrome']}
|
||||||
|
format='HEX'
|
||||||
|
swatchColors={[]}
|
||||||
|
defaultValue={props.defaultValue as string}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
key='dynamic'
|
||||||
|
className={Style.box}
|
||||||
|
style={{
|
||||||
|
borderColor:
|
||||||
|
isColoPickerDisplay || defaultColor.indexOf(props.defaultValue as string) === -1
|
||||||
|
? (props.defaultValue as string)
|
||||||
|
: 'transparent',
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
className={Style.item}
|
||||||
|
style={{
|
||||||
|
background:
|
||||||
|
'conic-gradient(from 90deg at 50% 50%, #FF0000 -19.41deg, #FF0000 18.76deg, #FF8A00 59.32deg, #FFE600 99.87deg, #14FF00 141.65deg, #00A3FF 177.72deg, #0500FF 220.23deg, #AD00FF 260.13deg, #FF00C7 300.69deg, #FF0000 340.59deg, #FF0000 378.76deg)',
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</Popup>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default React.memo(RadioColor);
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
.radioRectPanel {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rectItem {
|
||||||
|
border: 2px solid #e3e6eb;
|
||||||
|
padding: 8px;
|
||||||
|
border-radius: 3px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rectItemSelected {
|
||||||
|
border-color: var(--td-brand-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.rectText {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-top: 8px;
|
||||||
|
line-height: 21px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rectImg {
|
||||||
|
width: 88px;
|
||||||
|
height: 48px;
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
import React, { memo, useState } from 'react';
|
||||||
|
import classname from 'classnames';
|
||||||
|
import Style from './RadioRect.module.less';
|
||||||
|
|
||||||
|
interface IOption {
|
||||||
|
value?: any;
|
||||||
|
image: JSX.Element | string;
|
||||||
|
name?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface IProps {
|
||||||
|
defaultValue?: number | string;
|
||||||
|
onChange: (value?: any) => void;
|
||||||
|
options: IOption[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export default memo((props: IProps) => {
|
||||||
|
const [selectValue, setSelectValue] = useState(props.defaultValue);
|
||||||
|
|
||||||
|
const handleClick = (option: IOption) => {
|
||||||
|
setSelectValue(option.value);
|
||||||
|
props?.onChange(option.value);
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={Style.radioRectPanel}>
|
||||||
|
{props.options.map((item, index) => {
|
||||||
|
let ImageItem = item.image;
|
||||||
|
if (typeof item.image === 'string') {
|
||||||
|
ImageItem = <div className={Style.rectImg} style={{ backgroundImage: `url(${item.image})` }} />;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div key={index}>
|
||||||
|
<div
|
||||||
|
className={classname(Style.rectItem, { [Style.rectItemSelected]: selectValue === item.value })}
|
||||||
|
onClick={() => handleClick(item)}
|
||||||
|
>
|
||||||
|
{ImageItem}
|
||||||
|
</div>
|
||||||
|
{item.name && <div className={Style.rectText}>{item.name}</div>}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
});
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
.settingTitle {
|
||||||
|
margin: 32px 0 24px 0;
|
||||||
|
color: var(--td-text-color-primary);
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 22px;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settingSubTitle {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 21px;
|
||||||
|
margin-bottom: 24px;
|
||||||
|
}
|
||||||
@@ -0,0 +1,123 @@
|
|||||||
|
import React, { memo } from 'react';
|
||||||
|
import { Row, Col, Switch } from 'tdesign-react';
|
||||||
|
import { useAppDispatch, useAppSelector } from 'modules/store';
|
||||||
|
import {
|
||||||
|
selectGlobal,
|
||||||
|
toggleShowHeader,
|
||||||
|
toggleShowBreadcrumbs,
|
||||||
|
toggleShowFooter,
|
||||||
|
switchTheme,
|
||||||
|
switchColor,
|
||||||
|
switchLayout,
|
||||||
|
openSystemTheme,
|
||||||
|
ELayout,
|
||||||
|
} from 'modules/global';
|
||||||
|
import { ETheme } from 'types/index.d';
|
||||||
|
import RadioColor from './RadioColor';
|
||||||
|
import RadioRect from './RadioRect';
|
||||||
|
|
||||||
|
import Light from 'assets/svg/assets-setting-light.svg?component';
|
||||||
|
import Dark from 'assets/svg/assets-setting-dark.svg?component';
|
||||||
|
import System from 'assets/svg/assets-setting-auto.svg?component';
|
||||||
|
|
||||||
|
import Style from './index.module.less';
|
||||||
|
|
||||||
|
enum ESettingTheme {
|
||||||
|
system,
|
||||||
|
}
|
||||||
|
|
||||||
|
const themeList = [
|
||||||
|
{
|
||||||
|
value: ETheme.light,
|
||||||
|
image: <Light />,
|
||||||
|
name: '明亮',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: ETheme.dark,
|
||||||
|
image: <Dark />,
|
||||||
|
name: '黑暗',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: ESettingTheme.system,
|
||||||
|
image: <System />,
|
||||||
|
name: '跟随系统',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const layoutList = [
|
||||||
|
{
|
||||||
|
value: ELayout.side,
|
||||||
|
image: 'https://tdesign.gtimg.com/starter/setting/side.png',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: ELayout.top,
|
||||||
|
image: 'https://tdesign.gtimg.com/starter/setting/top.png',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: ELayout.mix,
|
||||||
|
image: 'https://tdesign.gtimg.com/starter/setting/mix.png',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export default memo(() => {
|
||||||
|
const dispatch = useAppDispatch();
|
||||||
|
const globalState = useAppSelector(selectGlobal);
|
||||||
|
|
||||||
|
const handleThemeSwitch = (value: any) => {
|
||||||
|
if (value === ESettingTheme.system) {
|
||||||
|
dispatch(openSystemTheme());
|
||||||
|
} else {
|
||||||
|
dispatch(switchTheme(value));
|
||||||
|
dispatch(switchColor(globalState.color));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<div className={Style.settingTitle}>主题模式</div>
|
||||||
|
<RadioRect
|
||||||
|
defaultValue={globalState.systemTheme ? ESettingTheme.system : globalState.theme}
|
||||||
|
onChange={handleThemeSwitch}
|
||||||
|
options={themeList}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div className={Style.settingTitle}>主题色</div>
|
||||||
|
<RadioColor defaultValue={globalState.color} onChange={(value) => dispatch(switchColor(value))} />
|
||||||
|
|
||||||
|
<div className={Style.settingTitle}>导航布局</div>
|
||||||
|
<RadioRect
|
||||||
|
defaultValue={globalState.layout}
|
||||||
|
onChange={(value) => dispatch(switchLayout(value))}
|
||||||
|
options={layoutList}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div className={Style.settingTitle}>元素开关</div>
|
||||||
|
<Row justify='space-between'>
|
||||||
|
<Col>
|
||||||
|
<div className={Style.settingSubTitle}>显示 Header</div>
|
||||||
|
</Col>
|
||||||
|
<Col>
|
||||||
|
<Switch size='large' value={globalState.showHeader} onChange={() => dispatch(toggleShowHeader())} />
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
|
<Row justify='space-between'>
|
||||||
|
<Col>
|
||||||
|
<div className={Style.settingSubTitle}>显示 Breadcrumbs</div>
|
||||||
|
</Col>
|
||||||
|
<Col>
|
||||||
|
<Switch size='large' value={globalState.showBreadcrumbs} onChange={() => dispatch(toggleShowBreadcrumbs())} />
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
|
<Row justify='space-between'>
|
||||||
|
<Col>
|
||||||
|
<div className={Style.settingSubTitle}>显示 Footer</div>
|
||||||
|
</Col>
|
||||||
|
<Col>
|
||||||
|
<Switch size='large' value={globalState.showFooter} onChange={() => dispatch(toggleShowFooter())} />
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
});
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
.panel {
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
:global {
|
||||||
|
.t-menu--scroll::-webkit-scrollbar {
|
||||||
|
width: 8px;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
.t-menu--scroll::-webkit-scrollbar-thumb {
|
||||||
|
border-radius: 6px;
|
||||||
|
border: 2px solid transparent;
|
||||||
|
background-clip: content-box;
|
||||||
|
background-color: #eeeeee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.t-default-menu.t-menu--dark {
|
||||||
|
background: var(--td-gray-color-13);
|
||||||
|
}
|
||||||
|
.t-default-menu:not(.t-menu--dark) .t-menu__item.t-is-active:not(.t-is-opened) {
|
||||||
|
background-color: var(--td-brand-color-1);
|
||||||
|
color: var(--td-brand-color);
|
||||||
|
.t-icon {
|
||||||
|
color: var(--td-brand-color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
import React, { memo, useEffect } from 'react';
|
||||||
|
import { Drawer, Layout } from 'tdesign-react';
|
||||||
|
import throttle from 'lodash/throttle';
|
||||||
|
import { useAppSelector, useAppDispatch } from 'modules/store';
|
||||||
|
import { selectGlobal, toggleSetting, toggleMenu, ELayout, switchTheme } from 'modules/global';
|
||||||
|
import Setting from './components/Setting';
|
||||||
|
import AppLayout from './components/AppLayout';
|
||||||
|
import Style from './index.module.less';
|
||||||
|
|
||||||
|
export default memo(() => {
|
||||||
|
const globalState = useAppSelector(selectGlobal);
|
||||||
|
const dispatch = useAppDispatch();
|
||||||
|
|
||||||
|
const AppContainer = AppLayout[globalState.isFullPage ? ELayout.fullPage : globalState.layout];
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
dispatch(switchTheme(globalState.theme));
|
||||||
|
const handleResize = throttle(() => {
|
||||||
|
if (window.innerWidth < 900) {
|
||||||
|
dispatch(toggleMenu(true));
|
||||||
|
} else if (window.innerWidth > 1000) {
|
||||||
|
dispatch(toggleMenu(false));
|
||||||
|
}
|
||||||
|
}, 100);
|
||||||
|
window.addEventListener('resize', handleResize);
|
||||||
|
return () => {
|
||||||
|
window.removeEventListener('resize', handleResize);
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Layout className={Style.panel}>
|
||||||
|
<AppContainer />
|
||||||
|
<Drawer
|
||||||
|
destroyOnClose
|
||||||
|
visible={globalState.setting}
|
||||||
|
size='458px'
|
||||||
|
footer={false}
|
||||||
|
header='页面配置'
|
||||||
|
onClose={() => dispatch(toggleSetting())}
|
||||||
|
>
|
||||||
|
<Setting />
|
||||||
|
</Drawer>
|
||||||
|
</Layout>
|
||||||
|
);
|
||||||
|
});
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import ReactDOM from 'react-dom/client';
|
||||||
|
import { Provider } from 'react-redux';
|
||||||
|
import { BrowserRouter } from 'react-router-dom';
|
||||||
|
import store from 'modules/store';
|
||||||
|
import App from 'layouts/index';
|
||||||
|
|
||||||
|
import 'tdesign-react/es/style/index.css';
|
||||||
|
|
||||||
|
import './styles/index.less';
|
||||||
|
|
||||||
|
const env = import.meta.env.MODE || 'development';
|
||||||
|
const baseRouterName = env === 'site' ? '/starter/react/' : import.meta.env.BASE_URL.replace(/\/$/, '');
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||||
|
const root = document.getElementById('app')!;
|
||||||
|
|
||||||
|
const renderApp = () => {
|
||||||
|
ReactDOM.createRoot(root).render(
|
||||||
|
<Provider store={store}>
|
||||||
|
<BrowserRouter basename={baseRouterName}>
|
||||||
|
<App />
|
||||||
|
</BrowserRouter>
|
||||||
|
</Provider>,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
renderApp();
|
||||||
@@ -0,0 +1,151 @@
|
|||||||
|
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
|
||||||
|
import { ETheme } from 'types/index.d';
|
||||||
|
import { Color } from 'tvision-color';
|
||||||
|
import { CHART_COLORS, defaultColor } from 'configs/color';
|
||||||
|
import { generateColorMap, insertThemeStylesheet } from 'utils/color';
|
||||||
|
import { RootState } from '../store';
|
||||||
|
import { version } from '../../../package.json';
|
||||||
|
|
||||||
|
const namespace = 'global';
|
||||||
|
|
||||||
|
export enum ELayout {
|
||||||
|
side = 1,
|
||||||
|
top,
|
||||||
|
mix,
|
||||||
|
fullPage,
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IGlobalState {
|
||||||
|
loading: boolean;
|
||||||
|
collapsed: boolean;
|
||||||
|
/**
|
||||||
|
* 是否显示面包屑导航
|
||||||
|
*/
|
||||||
|
setting: boolean;
|
||||||
|
version: string;
|
||||||
|
color: string;
|
||||||
|
/**
|
||||||
|
* 主题:深色 浅色
|
||||||
|
*/
|
||||||
|
theme: ETheme;
|
||||||
|
/**
|
||||||
|
* 是否开启跟随系统主题
|
||||||
|
*/
|
||||||
|
systemTheme: boolean;
|
||||||
|
layout: ELayout;
|
||||||
|
isFullPage: boolean;
|
||||||
|
showHeader: boolean;
|
||||||
|
showBreadcrumbs: boolean;
|
||||||
|
showFooter: boolean;
|
||||||
|
chartColors: Record<string, string>;
|
||||||
|
}
|
||||||
|
|
||||||
|
const defaultTheme = ETheme.light;
|
||||||
|
|
||||||
|
const initialState: IGlobalState = {
|
||||||
|
loading: true,
|
||||||
|
collapsed: window.innerWidth < 1000, // 宽度小于1000 菜单闭合
|
||||||
|
setting: false,
|
||||||
|
version,
|
||||||
|
theme: defaultTheme,
|
||||||
|
systemTheme: false,
|
||||||
|
layout: ELayout.side,
|
||||||
|
isFullPage: false,
|
||||||
|
color: defaultColor?.[0],
|
||||||
|
showHeader: true,
|
||||||
|
showBreadcrumbs: true,
|
||||||
|
showFooter: true,
|
||||||
|
chartColors: CHART_COLORS[defaultTheme],
|
||||||
|
};
|
||||||
|
|
||||||
|
// 创建带有命名空间的reducer
|
||||||
|
const globalSlice = createSlice({
|
||||||
|
name: namespace,
|
||||||
|
initialState,
|
||||||
|
reducers: {
|
||||||
|
toggleMenu: (state, action) => {
|
||||||
|
if (action.payload === null) {
|
||||||
|
state.collapsed = !state.collapsed;
|
||||||
|
} else {
|
||||||
|
state.collapsed = !!action.payload;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toggleSetting: (state) => {
|
||||||
|
state.setting = !state.setting;
|
||||||
|
},
|
||||||
|
toggleShowHeader: (state) => {
|
||||||
|
state.showHeader = !state.showHeader;
|
||||||
|
},
|
||||||
|
toggleShowBreadcrumbs: (state) => {
|
||||||
|
state.showBreadcrumbs = !state.showBreadcrumbs;
|
||||||
|
},
|
||||||
|
toggleShowFooter: (state) => {
|
||||||
|
state.showFooter = !state.showFooter;
|
||||||
|
},
|
||||||
|
switchTheme: (state, action: PayloadAction<ETheme>) => {
|
||||||
|
const finalTheme = action?.payload;
|
||||||
|
// 切换 chart 颜色
|
||||||
|
state.chartColors = CHART_COLORS[finalTheme];
|
||||||
|
// 切换主题颜色
|
||||||
|
state.theme = finalTheme;
|
||||||
|
// 关闭跟随系统
|
||||||
|
state.systemTheme = false;
|
||||||
|
document.documentElement.setAttribute('theme-mode', finalTheme);
|
||||||
|
},
|
||||||
|
openSystemTheme: (state) => {
|
||||||
|
const media = window.matchMedia('(prefers-color-scheme:dark)');
|
||||||
|
if (media.matches) {
|
||||||
|
const finalTheme = media.matches ? ETheme.dark : ETheme.light;
|
||||||
|
state.chartColors = CHART_COLORS[finalTheme];
|
||||||
|
// 切换主题颜色
|
||||||
|
state.theme = finalTheme;
|
||||||
|
state.systemTheme = true;
|
||||||
|
document.documentElement.setAttribute('theme-mode', finalTheme);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
switchColor: (state, action) => {
|
||||||
|
if (action?.payload) {
|
||||||
|
state.color = action?.payload;
|
||||||
|
const mode = state.theme;
|
||||||
|
|
||||||
|
const hex = action?.payload;
|
||||||
|
|
||||||
|
const { colors: newPalette, primary: brandColorIndex } = Color.getColorGradations({
|
||||||
|
colors: [hex],
|
||||||
|
step: 10,
|
||||||
|
remainInput: false, // 是否保留输入 不保留会矫正不合适的主题色
|
||||||
|
})[0];
|
||||||
|
const newColorMap = generateColorMap(hex, newPalette, mode, brandColorIndex);
|
||||||
|
insertThemeStylesheet(hex, newColorMap, mode);
|
||||||
|
|
||||||
|
document.documentElement.setAttribute('theme-color', hex || '');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
switchLayout: (state, action) => {
|
||||||
|
if (action?.payload) {
|
||||||
|
state.layout = action?.payload;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
switchFullPage: (state, action) => {
|
||||||
|
state.isFullPage = !!action?.payload;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
extraReducers: () => {},
|
||||||
|
});
|
||||||
|
|
||||||
|
export const selectGlobal = (state: RootState) => state.global;
|
||||||
|
|
||||||
|
export const {
|
||||||
|
toggleMenu,
|
||||||
|
toggleSetting,
|
||||||
|
toggleShowHeader,
|
||||||
|
toggleShowBreadcrumbs,
|
||||||
|
toggleShowFooter,
|
||||||
|
switchTheme,
|
||||||
|
switchColor,
|
||||||
|
switchLayout,
|
||||||
|
switchFullPage,
|
||||||
|
openSystemTheme,
|
||||||
|
} = globalSlice.actions;
|
||||||
|
|
||||||
|
export default globalSlice.reducer;
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
import { createSlice, createAsyncThunk } from '@reduxjs/toolkit';
|
||||||
|
import { RootState } from '../store';
|
||||||
|
import { getContractList, IContract } from 'services/contract';
|
||||||
|
|
||||||
|
const namespace = 'list/base';
|
||||||
|
|
||||||
|
interface IInitialState {
|
||||||
|
loading: boolean;
|
||||||
|
current: number;
|
||||||
|
pageSize: number;
|
||||||
|
total: number;
|
||||||
|
contractList: IContract[];
|
||||||
|
}
|
||||||
|
|
||||||
|
const initialState: IInitialState = {
|
||||||
|
loading: true,
|
||||||
|
current: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
contractList: [],
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getList = createAsyncThunk(
|
||||||
|
`${namespace}/getList`,
|
||||||
|
async (params: { pageSize: number; current: number }) => {
|
||||||
|
const result = await getContractList(params);
|
||||||
|
return {
|
||||||
|
list: result?.list,
|
||||||
|
total: result?.total,
|
||||||
|
pageSize: params.pageSize,
|
||||||
|
current: params.current,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
const listBaseSlice = createSlice({
|
||||||
|
name: namespace,
|
||||||
|
initialState,
|
||||||
|
reducers: {
|
||||||
|
clearPageState: () => initialState,
|
||||||
|
},
|
||||||
|
extraReducers: (builder) => {
|
||||||
|
builder
|
||||||
|
.addCase(getList.pending, (state) => {
|
||||||
|
state.loading = true;
|
||||||
|
})
|
||||||
|
.addCase(getList.fulfilled, (state, action) => {
|
||||||
|
state.loading = false;
|
||||||
|
state.contractList = action.payload?.list;
|
||||||
|
state.total = action.payload?.total;
|
||||||
|
state.pageSize = action.payload?.pageSize;
|
||||||
|
state.current = action.payload?.current;
|
||||||
|
})
|
||||||
|
.addCase(getList.rejected, (state) => {
|
||||||
|
state.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export const { clearPageState } = listBaseSlice.actions;
|
||||||
|
|
||||||
|
export const selectListBase = (state: RootState) => state.listBase;
|
||||||
|
|
||||||
|
export default listBaseSlice.reducer;
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
import { createSlice, createAsyncThunk, PayloadAction } from '@reduxjs/toolkit';
|
||||||
|
import { RootState } from '../store';
|
||||||
|
import { getProductList, IProduct } from 'services/product';
|
||||||
|
|
||||||
|
const namespace = 'list/card';
|
||||||
|
|
||||||
|
interface IInitialState {
|
||||||
|
pageLoading: boolean;
|
||||||
|
loading: boolean;
|
||||||
|
current: number;
|
||||||
|
pageSize: number;
|
||||||
|
total: number;
|
||||||
|
productList: IProduct[];
|
||||||
|
}
|
||||||
|
|
||||||
|
const initialState: IInitialState = {
|
||||||
|
pageLoading: true,
|
||||||
|
loading: true,
|
||||||
|
current: 1,
|
||||||
|
pageSize: 12,
|
||||||
|
total: 0,
|
||||||
|
productList: [],
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getList = createAsyncThunk(
|
||||||
|
`${namespace}/getList`,
|
||||||
|
async (params: { pageSize: number; current: number }) => {
|
||||||
|
const { pageSize, current } = params;
|
||||||
|
const result = await getProductList({
|
||||||
|
pageSize,
|
||||||
|
current,
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
list: result?.list,
|
||||||
|
total: result?.total,
|
||||||
|
pageSize: params.pageSize,
|
||||||
|
current: params.current,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
const listCardSlice = createSlice({
|
||||||
|
name: namespace,
|
||||||
|
initialState,
|
||||||
|
reducers: {
|
||||||
|
clearPageState: () => initialState,
|
||||||
|
switchPageLoading: (state, action: PayloadAction<boolean>) => {
|
||||||
|
state.pageLoading = action.payload;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
extraReducers: (builder) => {
|
||||||
|
builder
|
||||||
|
.addCase(getList.pending, (state) => {
|
||||||
|
state.loading = true;
|
||||||
|
})
|
||||||
|
.addCase(getList.fulfilled, (state, action) => {
|
||||||
|
state.loading = false;
|
||||||
|
state.productList = action.payload?.list;
|
||||||
|
state.total = action.payload?.total;
|
||||||
|
state.pageSize = action.payload?.pageSize;
|
||||||
|
state.current = action.payload?.current;
|
||||||
|
})
|
||||||
|
.addCase(getList.rejected, (state) => {
|
||||||
|
state.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export const { clearPageState, switchPageLoading } = listCardSlice.actions;
|
||||||
|
|
||||||
|
export const selectListCard = (state: RootState) => state.listCard;
|
||||||
|
|
||||||
|
export default listCardSlice.reducer;
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
import { createSlice, createAsyncThunk } from '@reduxjs/toolkit';
|
||||||
|
import { RootState } from '../store';
|
||||||
|
import { getContractList, IContract } from 'services/contract';
|
||||||
|
|
||||||
|
const namespace = 'list/select';
|
||||||
|
|
||||||
|
interface IInitialState {
|
||||||
|
loading: boolean;
|
||||||
|
current: number;
|
||||||
|
pageSize: number;
|
||||||
|
total: number;
|
||||||
|
contractList: IContract[];
|
||||||
|
}
|
||||||
|
|
||||||
|
const initialState: IInitialState = {
|
||||||
|
loading: true,
|
||||||
|
current: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
contractList: [],
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getList = createAsyncThunk(
|
||||||
|
`${namespace}/getSelectList`,
|
||||||
|
async (params: { pageSize: number; current: number }) => {
|
||||||
|
const result = await getContractList(params);
|
||||||
|
return {
|
||||||
|
list: result?.list,
|
||||||
|
total: result?.total,
|
||||||
|
pageSize: params.pageSize,
|
||||||
|
current: params.current,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
const listSelectSlice = createSlice({
|
||||||
|
name: namespace,
|
||||||
|
initialState,
|
||||||
|
reducers: {
|
||||||
|
clearPageState: () => initialState,
|
||||||
|
},
|
||||||
|
extraReducers: (builder) => {
|
||||||
|
builder
|
||||||
|
.addCase(getList.pending, (state) => {
|
||||||
|
state.loading = true;
|
||||||
|
})
|
||||||
|
.addCase(getList.fulfilled, (state, action) => {
|
||||||
|
state.loading = false;
|
||||||
|
state.contractList = action.payload?.list;
|
||||||
|
state.total = action.payload?.total;
|
||||||
|
state.pageSize = action.payload?.pageSize;
|
||||||
|
state.current = action.payload?.current;
|
||||||
|
})
|
||||||
|
.addCase(getList.rejected, (state) => {
|
||||||
|
state.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export const { clearPageState } = listSelectSlice.actions;
|
||||||
|
|
||||||
|
export const selectListSelect = (state: RootState) => state.listSelect;
|
||||||
|
|
||||||
|
export default listSelectSlice.reducer;
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import { configureStore, combineReducers } from '@reduxjs/toolkit';
|
||||||
|
import { TypedUseSelectorHook, useSelector, useDispatch } from 'react-redux';
|
||||||
|
|
||||||
|
import global from './global';
|
||||||
|
import user from './user';
|
||||||
|
import listBase from './list/base';
|
||||||
|
import listSelect from './list/select';
|
||||||
|
import listCard from './list/card';
|
||||||
|
|
||||||
|
const reducer = combineReducers({
|
||||||
|
global,
|
||||||
|
user,
|
||||||
|
listBase,
|
||||||
|
listSelect,
|
||||||
|
listCard,
|
||||||
|
});
|
||||||
|
|
||||||
|
export const store = configureStore({
|
||||||
|
reducer,
|
||||||
|
});
|
||||||
|
|
||||||
|
export type RootState = ReturnType<typeof store.getState>;
|
||||||
|
export type AppDispatch = typeof store.dispatch;
|
||||||
|
|
||||||
|
export const useAppDispatch = () => useDispatch<AppDispatch>();
|
||||||
|
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
|
||||||
|
|
||||||
|
export default store;
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
import { createSlice, createAsyncThunk } from '@reduxjs/toolkit';
|
||||||
|
import { RootState } from '../store';
|
||||||
|
|
||||||
|
const namespace = 'user';
|
||||||
|
const TOKEN_NAME = 'tdesign-starter';
|
||||||
|
|
||||||
|
const initialState = {
|
||||||
|
token: localStorage.getItem(TOKEN_NAME) || 'main_token', // 默认token不走权限
|
||||||
|
userInfo: {},
|
||||||
|
};
|
||||||
|
|
||||||
|
// login
|
||||||
|
export const login = createAsyncThunk(`${namespace}/login`, async (userInfo: Record<string, unknown>) => {
|
||||||
|
const mockLogin = async (userInfo: Record<string, unknown>) => {
|
||||||
|
// 登录请求流程
|
||||||
|
console.log(userInfo);
|
||||||
|
// const { account, password } = userInfo;
|
||||||
|
// if (account !== 'td') {
|
||||||
|
// return {
|
||||||
|
// code: 401,
|
||||||
|
// message: '账号不存在',
|
||||||
|
// };
|
||||||
|
// }
|
||||||
|
// if (['main_', 'dev_'].indexOf(password) === -1) {
|
||||||
|
// return {
|
||||||
|
// code: 401,
|
||||||
|
// message: '密码错误',
|
||||||
|
// };
|
||||||
|
// }
|
||||||
|
// const token = {
|
||||||
|
// main_: 'main_token',
|
||||||
|
// dev_: 'dev_token',
|
||||||
|
// }[password];
|
||||||
|
return {
|
||||||
|
code: 200,
|
||||||
|
message: '登陆成功',
|
||||||
|
data: 'main_token',
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
const res = await mockLogin(userInfo);
|
||||||
|
if (res.code === 200) {
|
||||||
|
return res.data;
|
||||||
|
}
|
||||||
|
throw res;
|
||||||
|
});
|
||||||
|
|
||||||
|
// getUserInfo
|
||||||
|
export const getUserInfo = createAsyncThunk(`${namespace}/getUserInfo`, async (_, { getState }: any) => {
|
||||||
|
const { token } = getState();
|
||||||
|
const mockRemoteUserInfo = async (token: string) => {
|
||||||
|
if (token === 'main_token') {
|
||||||
|
return {
|
||||||
|
name: 'td_main',
|
||||||
|
roles: ['all'],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
name: 'td_dev',
|
||||||
|
roles: ['userIndex', 'dashboardBase', 'login'],
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
const res = await mockRemoteUserInfo(token);
|
||||||
|
|
||||||
|
return res;
|
||||||
|
});
|
||||||
|
|
||||||
|
const userSlice = createSlice({
|
||||||
|
name: namespace,
|
||||||
|
initialState,
|
||||||
|
reducers: {
|
||||||
|
logout: (state) => {
|
||||||
|
localStorage.removeItem(TOKEN_NAME);
|
||||||
|
state.token = '';
|
||||||
|
state.userInfo = {};
|
||||||
|
},
|
||||||
|
remove: (state) => {
|
||||||
|
state.token = '';
|
||||||
|
},
|
||||||
|
},
|
||||||
|
extraReducers: (builder) => {
|
||||||
|
builder
|
||||||
|
.addCase(login.fulfilled, (state, action) => {
|
||||||
|
localStorage.setItem(TOKEN_NAME, action.payload);
|
||||||
|
|
||||||
|
state.token = action.payload;
|
||||||
|
})
|
||||||
|
.addCase(getUserInfo.fulfilled, (state, action) => {
|
||||||
|
state.userInfo = action.payload;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
export const selectListBase = (state: RootState) => state.listBase;
|
||||||
|
|
||||||
|
export const { logout, remove } = userSlice.actions;
|
||||||
|
|
||||||
|
export default userSlice.reducer;
|
||||||
@@ -0,0 +1,261 @@
|
|||||||
|
import type { EChartOption } from 'echarts';
|
||||||
|
import { getChartDataSet, ONE_WEEK_LIST } from 'utils/chart';
|
||||||
|
|
||||||
|
export const getLineChartOptions = (dateTime: Array<string> = []): EChartOption => {
|
||||||
|
const [timeArray, inArray, outArray] = getChartDataSet(dateTime);
|
||||||
|
return {
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'item',
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
left: '0',
|
||||||
|
right: '20px',
|
||||||
|
top: '5px',
|
||||||
|
bottom: '36px',
|
||||||
|
containLabel: true,
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
left: 'center',
|
||||||
|
bottom: '0',
|
||||||
|
orient: 'horizontal', // legend 横向布局。
|
||||||
|
data: ['本月', '上月'],
|
||||||
|
textStyle: {
|
||||||
|
fontSize: 12,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
data: timeArray,
|
||||||
|
boundaryGap: false,
|
||||||
|
axisLine: {
|
||||||
|
lineStyle: {
|
||||||
|
color: '#E3E6EB',
|
||||||
|
width: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value',
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '本月',
|
||||||
|
data: outArray,
|
||||||
|
type: 'line',
|
||||||
|
smooth: false,
|
||||||
|
showSymbol: true,
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolSize: 8,
|
||||||
|
itemStyle: {
|
||||||
|
borderWidth: 1,
|
||||||
|
},
|
||||||
|
areaStyle: {
|
||||||
|
color: '#0053D92F',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '上月',
|
||||||
|
data: inArray,
|
||||||
|
type: 'line',
|
||||||
|
smooth: false,
|
||||||
|
showSymbol: true,
|
||||||
|
symbol: 'circle',
|
||||||
|
symbolSize: 8,
|
||||||
|
itemStyle: {
|
||||||
|
borderWidth: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getPieChartOptions = (radius = 42): EChartOption => ({
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'item',
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
top: '0',
|
||||||
|
right: '0',
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
itemWidth: 12,
|
||||||
|
itemHeight: 4,
|
||||||
|
textStyle: {
|
||||||
|
fontSize: 12,
|
||||||
|
},
|
||||||
|
left: 'center',
|
||||||
|
bottom: '0',
|
||||||
|
orient: 'horizontal', // legend 横向布局。
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '销售渠道',
|
||||||
|
type: 'pie',
|
||||||
|
radius: ['48%', '60%'],
|
||||||
|
avoidLabelOverlap: false,
|
||||||
|
silent: true,
|
||||||
|
itemStyle: {
|
||||||
|
borderWidth: 1,
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
show: true,
|
||||||
|
position: 'center',
|
||||||
|
formatter: ['{value|{d}%}', '{name|{b}渠道占比}'].join('\n'),
|
||||||
|
rich: {
|
||||||
|
value: {
|
||||||
|
fontSize: 28,
|
||||||
|
fontWeight: 'normal',
|
||||||
|
lineHeight: 46,
|
||||||
|
},
|
||||||
|
name: {
|
||||||
|
color: '#909399',
|
||||||
|
fontSize: 12,
|
||||||
|
lineHeight: 14,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
labelLine: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
data: [
|
||||||
|
{ value: 1048, name: '线上' },
|
||||||
|
{ value: radius * 7, name: '门店' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
export const getBarChartOptions = (dateTime: Array<string> = []): EChartOption => {
|
||||||
|
const [timeArray, inArray, outArray] = getChartDataSet(dateTime);
|
||||||
|
return {
|
||||||
|
tooltip: {
|
||||||
|
trigger: 'item',
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
data: timeArray,
|
||||||
|
axisLine: {
|
||||||
|
lineStyle: {
|
||||||
|
width: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value',
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
top: '5%',
|
||||||
|
left: '25px',
|
||||||
|
right: 0,
|
||||||
|
bottom: '60px',
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
icon: 'rect',
|
||||||
|
itemWidth: 12,
|
||||||
|
itemHeight: 4,
|
||||||
|
itemGap: 48,
|
||||||
|
textStyle: {
|
||||||
|
fontSize: 12,
|
||||||
|
color: 'rgba(0, 0, 0, 0.6)',
|
||||||
|
},
|
||||||
|
left: 'center',
|
||||||
|
bottom: '0',
|
||||||
|
orient: 'horizontal',
|
||||||
|
data: ['本月', '上月'],
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: '本月',
|
||||||
|
data: outArray,
|
||||||
|
type: 'bar',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '上月',
|
||||||
|
data: inArray,
|
||||||
|
type: 'bar',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// PieChartIcon Data
|
||||||
|
export const MICRO_CHART_OPTIONS_LINE: EChartOption = {
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
show: false,
|
||||||
|
data: ONE_WEEK_LIST,
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
show: false,
|
||||||
|
type: 'value',
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: 0,
|
||||||
|
tooltip: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
color: ['#fff'],
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
data: [150, 230, 224, 218, 135, 147, 260],
|
||||||
|
type: 'line',
|
||||||
|
showSymbol: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
// BarChartIcon Data
|
||||||
|
export const MICRO_CHART_OPTIONS_BAR: EChartOption = {
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
show: false,
|
||||||
|
data: ONE_WEEK_LIST,
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
show: false,
|
||||||
|
type: 'value',
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: 0,
|
||||||
|
tooltip: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
data: [
|
||||||
|
100,
|
||||||
|
130,
|
||||||
|
184,
|
||||||
|
218,
|
||||||
|
{
|
||||||
|
value: 135,
|
||||||
|
itemStyle: {
|
||||||
|
opacity: 0.2,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 118,
|
||||||
|
itemStyle: {
|
||||||
|
opacity: 0.2,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 60,
|
||||||
|
itemStyle: {
|
||||||
|
opacity: 0.2,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
type: 'bar',
|
||||||
|
barWidth: 9,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
.middleChartPanel {
|
||||||
|
margin-top: 16px;
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
import React, { useState } from 'react';
|
||||||
|
import { Col, Row, Card } from 'tdesign-react';
|
||||||
|
import ReactEcharts from 'echarts-for-react';
|
||||||
|
import useDynamicChart from 'hooks/useDynamicChart';
|
||||||
|
import LastWeekDatePicker from 'components/DatePicker';
|
||||||
|
import { getLineChartOptions, getPieChartOptions } from '../chart';
|
||||||
|
import Style from './MiddleChart.module.less';
|
||||||
|
|
||||||
|
const lineOptions = getLineChartOptions();
|
||||||
|
const pieOptions = getPieChartOptions();
|
||||||
|
|
||||||
|
const MiddleChart = () => {
|
||||||
|
const [customOptions, setCustomOptions] = useState(lineOptions);
|
||||||
|
|
||||||
|
const onTimeChange = (value: Array<string>) => {
|
||||||
|
const options = getLineChartOptions(value);
|
||||||
|
setCustomOptions(options);
|
||||||
|
};
|
||||||
|
|
||||||
|
const dynamicLineChartOption = useDynamicChart(customOptions, {
|
||||||
|
placeholderColor: ['legend.textStyle.color', 'xAxis.axisLabel.color', 'yAxis.axisLabel.color'],
|
||||||
|
borderColor: ['series.0.itemStyle.borderColor', 'series.1.itemStyle.borderColor'],
|
||||||
|
});
|
||||||
|
|
||||||
|
const dynamicPieChartOption = useDynamicChart(pieOptions, {
|
||||||
|
placeholderColor: ['legend.textStyle.color'],
|
||||||
|
containerColor: ['series.0.itemStyle.borderColor'],
|
||||||
|
textColor: ['label.color', 'label.color'],
|
||||||
|
});
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Row gutter={[16, 16]} className={Style.middleChartPanel}>
|
||||||
|
<Col xs={12} xl={9}>
|
||||||
|
<Card title='统计数据' subtitle='(万元)' actions={LastWeekDatePicker(onTimeChange)} bordered={false}>
|
||||||
|
<ReactEcharts option={dynamicLineChartOption} notMerge={true} lazyUpdate={false} />
|
||||||
|
</Card>
|
||||||
|
</Col>
|
||||||
|
<Col xs={12} xl={3}>
|
||||||
|
<Card title='销售渠道' subtitle='2021-12' bordered={false}>
|
||||||
|
<ReactEcharts option={dynamicPieChartOption} notMerge={true} lazyUpdate={true} />
|
||||||
|
</Card>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default React.memo(MiddleChart);
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
.overviewPanel {
|
||||||
|
background-color: var(--td-bg-color-container);
|
||||||
|
border-radius: 3px;
|
||||||
|
margin-top: 16px;
|
||||||
|
}
|
||||||