Skip to content

Commit cec647a

Browse files
author
dennis.zpf
committed
fix: 修复深色模式问题
1 parent 65f2b85 commit cec647a

File tree

6 files changed

+37
-6
lines changed

6 files changed

+37
-6
lines changed
+16-3
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,31 @@
11
page {
22
// background: #f5f5f5;
33
padding: 12rpx;
4+
/* 浅色模式的css变量 */
5+
@media (prefers-color-scheme: light) {
6+
--background-color: #f5f5f5;
7+
--title-color: #000;
8+
--content-color: #999;
9+
}
10+
11+
/* 深色模式的css变量 */
12+
@media (prefers-color-scheme: dark) {
13+
--background-color: #0A0A0A;
14+
--title-color: #fff;
15+
--content-color: #666;
16+
}
417
.secondLevel {
518
padding: 24rpx;
6-
background-color: #f5f5f5;
19+
background-color: var(--background-color);
720
border-radius: 24rpx;
821
margin-left: -58rpx;
922
}
1023
.second-thoughtchain {
1124
.ant-copilot-thoughtchain-node-title {
12-
color: #000;
25+
color: var(--title-color);
1326
}
1427
.second-thoughtchain-content {
15-
color: #999;
28+
color: var(--content-color);
1629
}
1730
}
1831
}

copilot/ThoughtChain/index.en.md

+9
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,12 @@ ICollapsibleOptions Properties
182182
| ----------- | ------------------------------------------------------- | -------------------------------------- | ------ |
183183
| expandedKeys | expanded node key list | string[] | [] |
184184

185+
186+
### Event
187+
188+
| Event Name | Description | Type |
189+
| --- | --- | --- |
190+
| onTap | Trigger when a description is clicked | (e) => void |
191+
| onContentItemTap | Trigger when content is clicked | (e) => void |
192+
| onExpand | Trigger on deploy/stow | (expandedKeys: string[], clickKey: string) => void |
193+

copilot/ThoughtChain/index.md

+9
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,12 @@ ICollapsibleOptions 属性
182182
| ----------- | ------------------------------------------------------- | -------------------------------------- | ------ |
183183
| expandedKeys | 展开的节点key列表 | string[] | [] |
184184

185+
186+
### 事件
187+
188+
| 事件名 | 说明 | 类型 |
189+
| --- | --- | --- |
190+
| onTap | 点击描述时触发 | (e) => void |
191+
| onContentItemTap | 点击内容时触发 | (e) => void |
192+
| onExpand | 展开/收起时触发 | (expandedKeys: string[], clickKey: string) => void |
193+

copilot/Welcome/index.less

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@buttonPrefix: ant-copilot-welcome;
44

55
.@{buttonPrefix} {
6-
background-color: @welcome-background-color;
6+
background-image: @welcome-background-color;
77
border-radius: 24rpx;
88
padding: 24rpx;
99
box-sizing: border-box;

src/style/themes/theme-black.less

+1-1
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ page {
507507
--thought-chain-title-color: rgba(255, 255, 255, 0.45);
508508
--thought-chain-content-color: rgba(255, 255, 255, 0.55);
509509
// welcome
510-
--welcome-background-color: rgb(11, 9, 2);
510+
--welcome-background-color: linear-gradient(106deg, #0D0601 0%, #080C00 100%);
511511
--welcome-text-color: rgba(255, 255, 255, 0.88);
512512
// terms
513513
--terms-fixed-background-color: #1a1a1a;

src/style/variables.less

+1-1
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,7 @@ page {
542542
--thought-chain-content-color: rgba(0, 0, 0, 0.55);
543543

544544
// welcome
545-
--welcome-background-color: rgb(244, 246, 253);
545+
--welcome-background-color: linear-gradient(106deg, #F2F9FE 0%, #F7F3FF 100%);
546546
--welcome-text-color: rgba(0, 0, 0, 0.88);
547547

548548
// terms

0 commit comments

Comments
 (0)