);
diff --git a/src/components/ThemeCharts/Charts/StackedColumn/index.tsx b/src/components/ThemeCharts/Charts/StackedColumn/index.tsx
index 417b53dc..e5ba6a46 100644
--- a/src/components/ThemeCharts/Charts/StackedColumn/index.tsx
+++ b/src/components/ThemeCharts/Charts/StackedColumn/index.tsx
@@ -2,8 +2,6 @@ import { Column } from '@antv/g2plot';
import React, { useEffect, useRef } from 'react';
import { DARK_THEME_CONFIG, LIGHT_THEME_CONFIG } from '../Column';
-import styles from '../index.module.less';
-
type StackedColumnProps = {
theme?: any;
};
@@ -136,7 +134,7 @@ export function StackedColumnChart(props: StackedColumnProps) {
);
return (
-
+
);
diff --git a/src/components/ThemeCharts/Charts/index.module.less b/src/components/ThemeCharts/Charts/index.module.less
deleted file mode 100644
index f94c91d0..00000000
--- a/src/components/ThemeCharts/Charts/index.module.less
+++ /dev/null
@@ -1,9 +0,0 @@
-.container {
- width: 100%;
- height: 100%;
-
- > div {
- width: 100%;
- height: 100%;
- }
-}
diff --git a/src/components/ThemeCharts/index.module.less b/src/components/ThemeCharts/index.module.less
deleted file mode 100644
index eff456ee..00000000
--- a/src/components/ThemeCharts/index.module.less
+++ /dev/null
@@ -1,310 +0,0 @@
-.commonFlexConfig {
- display: flex;
- align-items: center;
- justify-content: center;
-}
-
-.themeCharts {
- &:extend(.commonFlexConfig);
- position: relative;
- z-index: 2;
- padding: 50px 0 40px;
- flex-direction: column;
- font-family: var(--font-sans);
- background-size: cover;
- background-color: rgba(0, 0, 0, 0);
-
- .title {
- height: auto;
- margin-top: 0;
- line-height: 1em;
- font-size: 40px;
- color: #1d2129;
- font-family: var(--font-sans);
- font-weight: 700;
- margin-bottom: 48px;
- }
-
- .themeButtons {
- display: flex;
- justify-content: center;
- margin-bottom: 32px;
-
- .button {
- &:extend(.commonFlexConfig);
- height: 52px;
- width: 160px;
- cursor: pointer;
- font-size: 18px;
- background-color: #ffffff;
- border: 2px solid #e5e8ef;
- border-radius: 8px;
- margin-right: 20px;
- line-height: 52px;
-
- > img {
- height: 24px;
- width: 24px;
- margin-right: 8px;
- }
-
- &:hover {
- font-weight: 500;
- border: 2px solid #691eff;
- }
- }
-
- .isTheme {
- font-weight: 500;
- border: 2px solid #691eff;
- color: #691eff;
- }
- }
-
- .themeChart {
- height: 600px;
- width: calc(100vw - 360px);
- max-width: 1680px;
- min-width: 1040px;
- background-color: #fafbfc;
- border: 1px solid #e5e8ef;
- box-shadow: 0 8px 28px 0 rgba(0, 0, 0, 0.05);
- border-radius: 16px;
- box-sizing: border-box;
- padding: 24px;
- margin-bottom: 36px;
-
- .msg {
- display: flex;
- align-items: center;
- letter-spacing: 0;
- line-height: 28px;
- height: 28px;
- margin-bottom: 18px;
-
- .msgTitle {
- width: 85px;
- font-size: 20px;
- color: #1d2129;
- font-family: var(--font-sans);
- font-weight: 700;
- }
-
- .msgText {
- font-size: 16px;
- color: #000000;
- line-height: 28px;
- }
- }
-
- .charts {
- .chart {
- height: 243px;
- width: calc(100% / 3 - 10px);
- background: #fff;
- box-sizing: border-box;
- padding: 18px;
- float: left;
- margin-bottom: 15px;
- margin-right: 14px;
- box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.05);
- border-radius: 12px;
-
- .chartMsg {
- height: 24px;
- font-weight: 500;
- font-size: 16px;
- color: #1d2129;
- letter-spacing: 0;
- line-height: 24px;
- }
-
- .content {
- height: 183px;
- }
- }
-
- .rightChart {
- margin-right: 0;
- }
- }
- }
-
- .acquire {
- &:extend(.commonFlexConfig);
-
- .download {
- background: transparent;
- border: 0;
- font-family: inherit;
- font-size: 16px;
- color: #424e66;
- letter-spacing: 0;
- line-height: 24px;
- cursor: pointer;
- overflow: hidden;
- position: relative;
-
- &:hover {
- color: #691eff;
-
- > img {
- position: relative;
- left: -80px;
- filter: drop-shadow(#691eff 80px 0);
- }
- }
- }
- }
-
- .segmentation {
- width: 0;
- height: 12px;
- border-left: 1px solid #979797;
- margin: 0 12px;
- }
-
- &.dark {
- .title {
- color: #fff;
- }
-
- .themeButtons {
- .button {
- background: rgba(0, 0, 0, 0);
- color: #fff;
- opacity: 0.2;
- border-color: #fff;
-
- &:hover {
- font-weight: 500;
- opacity: 0.9;
- }
- }
-
- .isTheme {
- font-weight: 500;
- opacity: 1;
- }
- }
-
- .themeChart {
- border-color: rgba(0, 0, 0, 0);
- background-position: -100px;
- background-color: rgba(0, 0, 0, 0);
-
- .msg {
- .msgTitle {
- color: #fff;
- }
-
- .msgText {
- color: #fff;
- }
- }
-
- .charts {
- .chart {
- background: rgba(255, 255, 255, 0.08);
-
- .chartMsg {
- color: #fff;
- }
- }
- }
- }
-
- .acquire {
- .download {
- img {
- position: relative;
- left: -80px;
- filter: drop-shadow(#fff 80px 0);
- }
-
- color: #fff;
- opacity: 0.8;
-
- &:hover {
- opacity: 1;
- }
- }
- }
-
- .segmentation {
- border-color: rgba(255, 255, 255, 0.5);
- }
- }
-}
-
-@media (max-width: 1200px) {
- .themeCharts {
- padding-inline: 24px;
- .themeChart {
- width: 100%;
- min-width: 0;
- height: auto;
- }
- .themeChart .charts {
- display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
- gap: 14px;
- }
- .themeChart .charts .chart {
- width: auto;
- float: none;
- margin: 0;
- }
- }
-}
-
-@media (max-width: 640px) {
- .themeCharts {
- padding: 48px 20px;
- .title {
- font-size: 28px;
- line-height: 1.3;
- text-align: center;
- margin-bottom: 24px;
- }
- .themeButtons {
- gap: 8px;
- width: 100%;
- flex-wrap: wrap;
- }
- .themeButtons .button {
- margin: 0;
- width: auto;
- min-width: 88px;
- padding-inline: 8px;
- font: inherit;
- font-size: 14px;
- }
- .themeChart {
- padding: 12px;
- }
- .themeChart .charts {
- grid-template-columns: minmax(0, 1fr);
- }
- .themeChart .msg .msgTitle {
- font-size: 16px;
- }
- }
-}
-
-.colors {
- display: flex;
- margin-bottom: 16px;
- height: 25px;
-
- .color {
- border-radius: 2px;
- margin-right: 2px;
- width: 23px;
- height: 23px;
- }
-
- :last-child {
- margin-right: 0px;
- }
-}
diff --git a/src/components/ThemeCharts/index.tsx b/src/components/ThemeCharts/index.tsx
index 5c4247d4..e043ecf7 100644
--- a/src/components/ThemeCharts/index.tsx
+++ b/src/components/ThemeCharts/index.tsx
@@ -14,8 +14,6 @@ import {
StackedColumnChart,
} from './Charts';
-import styles from './index.module.less';
-
// 已经生成的主题 json 文件
const themeColors = [THEME_COLORS1, THEME_COLORS2, THEME_COLORS3];
@@ -73,17 +71,22 @@ export function ThemeCharts() {
return (
-
{useT('定制主题,一键生成')}
-
+
+ {useT('定制主题,一键生成')}
+
+
{THEME_DATAS.map((data, index) => {
const isTheme = selectedIndex === index;
@@ -91,9 +94,20 @@ export function ThemeCharts() {
-
+

-
AntV 5.0
-
-
{useT(select.text)}
+
+ AntV 5.0
+
+
+
+ {useT(select.text)}
+
-
- {CHARTS.map((chart, index) => {
+
+ {CHARTS.map((chart) => {
return (
-
{useT(chart.msg)}
-
+
+ {useT(chart.msg)}
+
+
{chart.chart({ ...colorsJson, value: select.theme })}
@@ -143,10 +189,24 @@ export function ThemeCharts() {
})}
-
-