@agentscope-ai/design 1.0.13 → 1.0.15-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +237 -178
- package/README.zh-CN.md +312 -0
- package/lib/antd/styles/alert.style.js +7 -1
- package/lib/antd/styles/dropdown.style.js +5 -1
- package/lib/antd/styles/select.style.js +9 -1
- package/lib/components/commonComponents/Alert/demo/demo2.js +5 -0
- package/lib/components/commonComponents/AlertDialog/index.d.ts +37 -325
- package/lib/components/commonComponents/AlertDialog/index.js +151 -3
- package/lib/components/commonComponents/AlertDialog/index.style.js +2 -14
- package/lib/components/commonComponents/Drawer/index.style.js +2 -42
- package/lib/components/commonComponents/Modal/index.d.ts +16 -2
- package/lib/components/commonComponents/Modal/index.js +71 -3
- package/lib/components/commonComponents/Modal/index.style.js +2 -62
- package/lib/components/commonComponents/PromptsEditor/VarRender.d.ts +1 -1
- package/lib/components/commonComponents/Tabs/index.style.js +7 -1
- package/lib/components/commonComponents/Tag/demo/demo1.js +1 -1
- package/lib/components/commonComponents/Tag/index.d.ts +5 -1
- package/lib/components/commonComponents/Tag/index.js +4 -0
- package/lib/components/commonComponents/Tag/index.style.js +65 -1
- package/lib/components/mobileComponents/MobileAlertDialog/demo/demo1.d.ts +3 -0
- package/lib/components/mobileComponents/MobileAlertDialog/demo/demo1.js +20 -0
- package/lib/components/mobileComponents/MobileAlertDialog/demo/demo2.d.ts +3 -0
- package/lib/components/mobileComponents/MobileAlertDialog/demo/demo2.js +50 -0
- package/lib/components/{commonComponents/AlertDialog/mobile.d.ts → mobileComponents/MobileAlertDialog/index.d.ts} +8 -8
- package/lib/components/{commonComponents/AlertDialog/mobile.js → mobileComponents/MobileAlertDialog/index.js} +3 -3
- package/lib/components/mobileComponents/MobileAlertDialog/index.style.d.ts +1 -0
- package/lib/components/mobileComponents/MobileAlertDialog/index.style.js +22 -0
- package/lib/components/mobileComponents/MobileDrawer/Confirm.d.ts +46 -0
- package/lib/components/mobileComponents/MobileDrawer/Confirm.js +63 -0
- package/lib/components/mobileComponents/MobileDrawer/demo/demo1.d.ts +2 -0
- package/lib/components/mobileComponents/MobileDrawer/demo/demo1.js +49 -0
- package/lib/components/mobileComponents/MobileDrawer/demo/demo2.d.ts +7 -0
- package/lib/components/mobileComponents/MobileDrawer/demo/demo2.js +90 -0
- package/lib/components/mobileComponents/MobileDrawer/demo/demo3.d.ts +2 -0
- package/lib/components/mobileComponents/MobileDrawer/demo/demo3.js +64 -0
- package/lib/components/mobileComponents/MobileDrawer/demo/demo4.d.ts +2 -0
- package/lib/components/mobileComponents/MobileDrawer/demo/demo4.js +99 -0
- package/lib/components/mobileComponents/MobileDrawer/demo/demo5.d.ts +2 -0
- package/lib/components/mobileComponents/MobileDrawer/demo/demo5.js +73 -0
- package/lib/components/mobileComponents/MobileDrawer/index.d.ts +16 -0
- package/lib/components/{commonComponents/Modal/pc.js → mobileComponents/MobileDrawer/index.js} +25 -52
- package/lib/components/mobileComponents/MobileDrawer/index.style.d.ts +1 -0
- package/lib/components/mobileComponents/MobileDrawer/index.style.js +44 -0
- package/lib/components/mobileComponents/MobileModal/demo/basic.d.ts +1 -0
- package/lib/components/mobileComponents/MobileModal/demo/basic.js +49 -0
- package/lib/components/mobileComponents/MobileModal/demo/styles.d.ts +1 -0
- package/lib/components/mobileComponents/MobileModal/demo/styles.js +158 -0
- package/lib/components/mobileComponents/MobileModal/demo/width.d.ts +1 -0
- package/lib/components/mobileComponents/MobileModal/demo/width.js +68 -0
- package/lib/components/mobileComponents/MobileModal/index.d.ts +43 -0
- package/lib/components/{commonComponents/Modal/mobile.js → mobileComponents/MobileModal/index.js} +45 -11
- package/lib/components/mobileComponents/MobileModal/index.style.d.ts +1 -0
- package/lib/components/mobileComponents/MobileModal/index.style.js +70 -0
- package/lib/index.d.ts +7 -1
- package/lib/index.js +10 -1
- package/lib/libs/env/index.d.ts +1 -1
- package/lib/typings.d.ts +0 -2
- package/llms/all.llms.txt +4953 -0
- package/llms/components/commonComponents/Alert/index.zh-CN.llms.txt +32 -0
- package/llms/components/commonComponents/AlertDialog/index.zh-CN.llms.txt +171 -0
- package/llms/components/commonComponents/Anchor/index.zh-CN.llms.txt +51 -0
- package/llms/components/commonComponents/Avatar/index.zh-CN.llms.txt +37 -0
- package/llms/components/commonComponents/Breadcrumb/index.zh-CN.llms.txt +117 -0
- package/llms/components/commonComponents/Button/index.zh-CN.llms.txt +54 -0
- package/llms/components/commonComponents/Card/index.zh-CN.llms.txt +61 -0
- package/llms/components/commonComponents/Checkbox/index.zh-CN.llms.txt +69 -0
- package/llms/components/commonComponents/CodeBlock/index.zh-CN.llms.txt +13 -0
- package/llms/components/commonComponents/Collapse/index.zh-CN.llms.txt +56 -0
- package/llms/components/commonComponents/CollapsePanel/index.zh-CN.llms.txt +69 -0
- package/llms/components/commonComponents/DatePicker/index.zh-CN.llms.txt +221 -0
- package/llms/components/commonComponents/Descriptions/index.zh-CN.llms.txt +37 -0
- package/llms/components/commonComponents/Drawer/index.zh-CN.llms.txt +62 -0
- package/llms/components/commonComponents/Dropdown/index.zh-CN.llms.txt +149 -0
- package/llms/components/commonComponents/Empty/index.zh-CN.llms.txt +40 -0
- package/llms/components/commonComponents/FloatButton/index.zh-CN.llms.txt +51 -0
- package/llms/components/commonComponents/Form/index.zh-CN.llms.txt +558 -0
- package/llms/components/commonComponents/IconButton/index.zh-CN.llms.txt +45 -0
- package/llms/components/commonComponents/Image/index.zh-CN.llms.txt +165 -0
- package/llms/components/commonComponents/Input/index.zh-CN.llms.txt +133 -0
- package/llms/components/commonComponents/InputNumber/index.zh-CN.llms.txt +51 -0
- package/llms/components/commonComponents/Message/index.zh-CN.llms.txt +98 -0
- package/llms/components/commonComponents/Modal/index.zh-CN.llms.txt +168 -0
- package/llms/components/commonComponents/Notification/index.zh-CN.llms.txt +94 -0
- package/llms/components/commonComponents/Pagination/index.zh-CN.llms.txt +45 -0
- package/llms/components/commonComponents/Popconfirm/index.zh-CN.llms.txt +55 -0
- package/llms/components/commonComponents/Popover/index.zh-CN.llms.txt +43 -0
- package/llms/components/commonComponents/Progress/index.zh-CN.llms.txt +50 -0
- package/llms/components/commonComponents/PromptsEditor/index.zh-CN.llms.txt +15 -0
- package/llms/components/commonComponents/Radio/index.zh-CN.llms.txt +66 -0
- package/llms/components/commonComponents/RadioButton/index.zh-CN.llms.txt +73 -0
- package/llms/components/commonComponents/Result/index.zh-CN.llms.txt +10 -0
- package/llms/components/commonComponents/Select/index.zh-CN.llms.txt +96 -0
- package/llms/components/commonComponents/Skeleton/index.zh-CN.llms.txt +59 -0
- package/llms/components/commonComponents/Slider/index.zh-CN.llms.txt +62 -0
- package/llms/components/commonComponents/Spinner/index.zh-CN.llms.txt +15 -0
- package/llms/components/commonComponents/Statistic/index.zh-CN.llms.txt +58 -0
- package/llms/components/commonComponents/Steps/index.zh-CN.llms.txt +57 -0
- package/llms/components/commonComponents/Switch/index.zh-CN.llms.txt +39 -0
- package/llms/components/commonComponents/Table/index.zh-CN.llms.txt +254 -0
- package/llms/components/commonComponents/Tabs/index.zh-CN.llms.txt +68 -0
- package/llms/components/commonComponents/Tag/index.zh-CN.llms.txt +33 -0
- package/llms/components/commonComponents/TimePicker/index.zh-CN.llms.txt +111 -0
- package/llms/components/commonComponents/Tooltip/index.zh-CN.llms.txt +44 -0
- package/llms/components/commonComponents/Upload/index.zh-CN.llms.txt +95 -0
- package/llms/components/commonComponents/Video/index.zh-CN.llms.txt +7 -0
- package/llms/docs/guide/fromAntd.zh-CN.llms.txt +156 -0
- package/llms/docs/guide/fromScratch.zh-CN.llms.txt +83 -0
- package/llms/docs/guide/iconfont.zh-CN.llms.txt +69 -0
- package/llms/docs/guide/overview.zh-CN.llms.txt +51 -0
- package/llms/docs/guide/sparkIcons.zh-CN.llms.txt +25 -0
- package/llms/docs/guide/theme.zh-CN.llms.txt +61 -0
- package/llms/docs/guide/tokens&variables.zh-CN.llms.txt +425 -0
- package/llms/docs/guide/vibe-coding.zh-CN.llms.txt +29 -0
- package/llms/index.llms.txt +49 -0
- package/package.json +14 -4
- package/scripts/mcp-docs-server.js +14079 -0
- package/lib/components/commonComponents/AlertDialog/pc.d.ts +0 -38
- package/lib/components/commonComponents/AlertDialog/pc.js +0 -152
- package/lib/components/commonComponents/Modal/mobile.d.ts +0 -28
- package/lib/components/commonComponents/Modal/pc.d.ts +0 -28
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
# @agentscope-ai/design
|
|
2
|
+
|
|
3
|
+
[](https://npmjs.org/package/@agentscope-ai/design)
|
|
4
|
+
[](https://npmjs.org/package/@agentscope-ai/design)
|
|
5
|
+
|
|
6
|
+
AgentScope Spark Design - 阿里云飞天实验室 UI 组件库
|
|
7
|
+
|
|
8
|
+
## ✨ 特性
|
|
9
|
+
|
|
10
|
+
- 🎨 基于 Ant Design 5 的自定义主题系统
|
|
11
|
+
- 🔧 50+ 封装增强的 UI 组件
|
|
12
|
+
- 📱 支持移动端组件
|
|
13
|
+
- 🎯 自定义图标系统(@agentscope-ai/icons)
|
|
14
|
+
- 🌐 国际化支持(中文/英文)
|
|
15
|
+
- 📝 完整的 TypeScript 类型支持
|
|
16
|
+
- 🎨 CSS-in-JS 样式方案(antd-style)
|
|
17
|
+
|
|
18
|
+
## 📦 安装
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# 使用 npm
|
|
22
|
+
npm install @agentscope-ai/design antd --save
|
|
23
|
+
|
|
24
|
+
# 使用 pnpm
|
|
25
|
+
pnpm add @agentscope-ai/design antd
|
|
26
|
+
|
|
27
|
+
# 使用 yarn
|
|
28
|
+
yarn add @agentscope-ai/design antd
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## 🚀 快速开始
|
|
32
|
+
|
|
33
|
+
### 1. 配置图标覆盖
|
|
34
|
+
|
|
35
|
+
为了让所有 antd 组件使用 Spark Design 的自定义图标,需要在项目的 `package.json` 中添加 overrides 配置:
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"@agentscope-ai/design": "^1.0.0",
|
|
41
|
+
"antd": "^5.18.0"
|
|
42
|
+
},
|
|
43
|
+
"pnpm": {
|
|
44
|
+
"overrides": {
|
|
45
|
+
"@ant-design/icons": "@agentscope-ai/icons-override-antd"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"overrides": {
|
|
49
|
+
"@ant-design/icons": "@agentscope-ai/icons-override-antd"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
配置完成后,**删除现有依赖并重新安装**:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
rm -rf node_modules
|
|
58
|
+
rm -f package-lock.json pnpm-lock.yaml yarn.lock
|
|
59
|
+
npm install # 或 pnpm install
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 2. 使用组件
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
import { ConfigProvider, Button, Modal, carbonTheme } from '@agentscope-ai/design';
|
|
66
|
+
|
|
67
|
+
function App() {
|
|
68
|
+
return (
|
|
69
|
+
<ConfigProvider {...carbonTheme}>
|
|
70
|
+
<Button type="primary">按钮</Button>
|
|
71
|
+
<Modal title="标题" open={false}>
|
|
72
|
+
内容
|
|
73
|
+
</Modal>
|
|
74
|
+
</ConfigProvider>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## 📂 目录结构
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
spark-design/
|
|
83
|
+
├── src/
|
|
84
|
+
│ ├── antd/ # antd 相关配置
|
|
85
|
+
│ │ ├── styles/ # 组件局部样式覆盖
|
|
86
|
+
│ │ └── themes/ # 主题配置
|
|
87
|
+
│ │ ├── bailianTheme.json # 百炼主题(亮色)
|
|
88
|
+
│ │ ├── bailianDarkTheme.json # 百炼主题(暗色)
|
|
89
|
+
│ │ ├── carbonTheme.json # Carbon 主题(亮色)
|
|
90
|
+
│ │ └── carbonDarkTheme.json # Carbon 主题(暗色)
|
|
91
|
+
│ ├── components/
|
|
92
|
+
│ │ ├── commonComponents/ # 通用组件(50+)
|
|
93
|
+
│ │ │ ├── Alert/
|
|
94
|
+
│ │ │ ├── Button/
|
|
95
|
+
│ │ │ ├── Modal/
|
|
96
|
+
│ │ │ ├── ...
|
|
97
|
+
│ │ └── mobileComponents/ # 移动端组件
|
|
98
|
+
│ │ ├── MobileModal/
|
|
99
|
+
│ │ ├── MobileDrawer/
|
|
100
|
+
│ │ └── MobileAlertDialog/
|
|
101
|
+
│ ├── hooks/ # 公共 Hooks
|
|
102
|
+
│ │ └── useGlobalStyle/
|
|
103
|
+
│ ├── libs/ # 工具函数库
|
|
104
|
+
│ │ ├── requestPop/ # POP 请求封装
|
|
105
|
+
│ │ ├── requestSse/ # SSE 请求封装
|
|
106
|
+
│ │ └── ...
|
|
107
|
+
│ ├── i18n/ # 国际化配置
|
|
108
|
+
│ └── index.ts # 入口文件
|
|
109
|
+
├── docs/ # 文档
|
|
110
|
+
└── package.json
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## 🎨 主题系统
|
|
114
|
+
|
|
115
|
+
### 预置主题
|
|
116
|
+
|
|
117
|
+
```tsx
|
|
118
|
+
import {
|
|
119
|
+
ConfigProvider,
|
|
120
|
+
carbonTheme, // Carbon 亮色主题
|
|
121
|
+
carbonDarkTheme, // Carbon 暗色主题
|
|
122
|
+
bailianTheme, // 百炼亮色主题
|
|
123
|
+
bailianDarkTheme, // 百炼暗色主题
|
|
124
|
+
} from '@agentscope-ai/design';
|
|
125
|
+
|
|
126
|
+
// 使用 Carbon 主题
|
|
127
|
+
<ConfigProvider {...carbonTheme}>
|
|
128
|
+
<App />
|
|
129
|
+
</ConfigProvider>
|
|
130
|
+
|
|
131
|
+
// 使用百炼暗色主题
|
|
132
|
+
<ConfigProvider {...bailianDarkTheme}>
|
|
133
|
+
<App />
|
|
134
|
+
</ConfigProvider>
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### 自定义主题
|
|
138
|
+
|
|
139
|
+
```tsx
|
|
140
|
+
import { generateThemeByToken } from '@agentscope-ai/design';
|
|
141
|
+
|
|
142
|
+
const customTheme = generateThemeByToken({
|
|
143
|
+
colorPrimary: '#1890ff',
|
|
144
|
+
borderRadius: 6,
|
|
145
|
+
// ... 更多 token
|
|
146
|
+
});
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## 📦 组件列表
|
|
150
|
+
|
|
151
|
+
### 通用组件
|
|
152
|
+
|
|
153
|
+
| 组件 | 描述 |
|
|
154
|
+
| --- | --- |
|
|
155
|
+
| `Button` | 按钮 |
|
|
156
|
+
| `Modal` | 对话框 |
|
|
157
|
+
| `Drawer` | 抽屉 |
|
|
158
|
+
| `Input` | 输入框 |
|
|
159
|
+
| `Select` | 选择器 |
|
|
160
|
+
| `Form` | 表单 |
|
|
161
|
+
| `Table` | 表格 |
|
|
162
|
+
| `Tabs` | 标签页 |
|
|
163
|
+
| `Tag` | 标签 |
|
|
164
|
+
| `Tooltip` | 文字提示 |
|
|
165
|
+
| `Popover` | 气泡卡片 |
|
|
166
|
+
| `Popconfirm` | 气泡确认框 |
|
|
167
|
+
| `message` | 全局提示 |
|
|
168
|
+
| `notification` | 通知提醒框 |
|
|
169
|
+
| `Empty` | 空状态 |
|
|
170
|
+
| `Spinner` | 加载中 |
|
|
171
|
+
| `Progress` | 进度条 |
|
|
172
|
+
| `Steps` | 步骤条 |
|
|
173
|
+
| `Pagination` | 分页 |
|
|
174
|
+
| `Breadcrumb` | 面包屑 |
|
|
175
|
+
| `Dropdown` | 下拉菜单 |
|
|
176
|
+
| `Checkbox` | 多选框 |
|
|
177
|
+
| `Radio` | 单选框 |
|
|
178
|
+
| `RadioButton` | 单选按钮组 |
|
|
179
|
+
| `Switch` | 开关 |
|
|
180
|
+
| `Slider` | 滑动输入条 |
|
|
181
|
+
| `DatePicker` | 日期选择器 |
|
|
182
|
+
| `TimePicker` | 时间选择器 |
|
|
183
|
+
| `Upload` | 上传 |
|
|
184
|
+
| `Avatar` | 头像 |
|
|
185
|
+
| `Badge` | 徽标 |
|
|
186
|
+
| `Card` | 卡片 |
|
|
187
|
+
| `Collapse` | 折叠面板 |
|
|
188
|
+
| `Descriptions` | 描述列表 |
|
|
189
|
+
| `Result` | 结果页 |
|
|
190
|
+
| `Statistic` | 统计数值 |
|
|
191
|
+
| `Alert` | 警告提示 |
|
|
192
|
+
| `AlertDialog` | 警告对话框 |
|
|
193
|
+
| `CodeBlock` | 代码块 |
|
|
194
|
+
| `IconButton` | 图标按钮 |
|
|
195
|
+
| `EllipsisTip` | 文本省略提示 |
|
|
196
|
+
| `HelpIcon` | 帮助图标 |
|
|
197
|
+
| `FileIcon` | 文件图标 |
|
|
198
|
+
| `Video` | 视频播放器 |
|
|
199
|
+
|
|
200
|
+
### 移动端组件
|
|
201
|
+
|
|
202
|
+
| 组件 | 描述 |
|
|
203
|
+
| --- | --- |
|
|
204
|
+
| `MobileModal` | 移动端对话框 |
|
|
205
|
+
| `MobileDrawer` | 移动端抽屉 |
|
|
206
|
+
| `MobileAlertDialog` | 移动端警告对话框 |
|
|
207
|
+
|
|
208
|
+
### Hooks
|
|
209
|
+
|
|
210
|
+
| Hook | 描述 |
|
|
211
|
+
| --- | --- |
|
|
212
|
+
| `useGlobalStyle` | 全局样式 Hook |
|
|
213
|
+
|
|
214
|
+
### 工具函数
|
|
215
|
+
|
|
216
|
+
| 函数 | 描述 |
|
|
217
|
+
| --- | --- |
|
|
218
|
+
| `requestPop` | 阿里云 POP 请求封装 |
|
|
219
|
+
| `requestPopSse` | POP SSE 请求封装 |
|
|
220
|
+
| `requestSse` | SSE 请求封装 |
|
|
221
|
+
| `delay` | 延迟函数 |
|
|
222
|
+
| `copy` | 复制到剪贴板 |
|
|
223
|
+
| `waitForDom` | 等待 DOM 元素 |
|
|
224
|
+
| `waitForFunc` | 等待函数执行 |
|
|
225
|
+
| `safeHtml` | 安全 HTML 处理 |
|
|
226
|
+
| `base64Encoder` | Base64 编码 |
|
|
227
|
+
| `base64Decoder` | Base64 解码 |
|
|
228
|
+
| `parseJsonSafely` | 安全 JSON 解析 |
|
|
229
|
+
|
|
230
|
+
## 🛠 配置说明
|
|
231
|
+
|
|
232
|
+
### 包管理器兼容性
|
|
233
|
+
|
|
234
|
+
- ✅ **npm**: 使用 `overrides` 字段
|
|
235
|
+
- ✅ **pnpm**: 使用 `pnpm.overrides` 字段
|
|
236
|
+
- ✅ **yarn**: 使用 `resolutions` 字段
|
|
237
|
+
|
|
238
|
+
建议同时配置 `overrides` 和 `pnpm.overrides`,确保在不同包管理器下都能正常工作。
|
|
239
|
+
|
|
240
|
+
### TypeScript 支持
|
|
241
|
+
|
|
242
|
+
如果遇到类型错误,可以在 `tsconfig.json` 中添加路径映射:
|
|
243
|
+
|
|
244
|
+
```json
|
|
245
|
+
{
|
|
246
|
+
"compilerOptions": {
|
|
247
|
+
"paths": {
|
|
248
|
+
"@ant-design/icons": ["node_modules/@agentscope-ai/icons-override-antd"]
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Vite 配置
|
|
255
|
+
|
|
256
|
+
```javascript
|
|
257
|
+
// vite.config.js
|
|
258
|
+
export default {
|
|
259
|
+
resolve: {
|
|
260
|
+
alias: {
|
|
261
|
+
'@ant-design/icons': '@agentscope-ai/icons-override-antd'
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### Lightning 配置
|
|
268
|
+
|
|
269
|
+
```javascript
|
|
270
|
+
// lightning.config.mts
|
|
271
|
+
{
|
|
272
|
+
build: {
|
|
273
|
+
resolve: {
|
|
274
|
+
alias: {
|
|
275
|
+
'@ant-design/icons': path.resolve(
|
|
276
|
+
__dirname,
|
|
277
|
+
'./node_modules/@agentscope-ai/icons-override-antd',
|
|
278
|
+
)
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
## 🔧 故障排除
|
|
286
|
+
|
|
287
|
+
### 图标未正确显示?
|
|
288
|
+
|
|
289
|
+
1. **确认配置**:检查 `package.json` 中的 overrides 配置是否正确
|
|
290
|
+
2. **清理依赖**:删除 `node_modules` 和锁文件后重新安装
|
|
291
|
+
3. **检查版本**:确保使用兼容的 antd 版本 (^5.18.0)
|
|
292
|
+
4. **构建工具**:检查是否需要额外的 alias 配置
|
|
293
|
+
|
|
294
|
+
### 开发环境和生产环境表现不一致?
|
|
295
|
+
|
|
296
|
+
这通常是缓存问题,尝试:
|
|
297
|
+
- 清理构建缓存
|
|
298
|
+
- 添加构建工具的 alias 配置
|
|
299
|
+
- 确保 overrides 配置在所有环境中都生效
|
|
300
|
+
|
|
301
|
+
## 📖 更新日志
|
|
302
|
+
|
|
303
|
+
查看 [CHANGELOG.md](./CHANGELOG.md) 了解版本更新信息。
|
|
304
|
+
|
|
305
|
+
## 🤝 贡献
|
|
306
|
+
|
|
307
|
+
欢迎提交 Issue 和 Pull Request!
|
|
308
|
+
|
|
309
|
+
## 📄 许可证
|
|
310
|
+
|
|
311
|
+
MIT
|
|
312
|
+
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
3
|
import createGlobalStyle from "../../libs/createStyle";
|
|
4
|
-
export var useAlertStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-alert {\n .", "-alert-close-icon {\n font-size: 16px;\n \n .anticon-close {\n color: var(--", "-color-text);\n }\n }\n}\n"])), function (p) {
|
|
4
|
+
export var useAlertStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-alert {\n .", "-alert-close-icon {\n font-size: 16px;\n \n .anticon-close {\n color: var(--", "-color-text);\n }\n }\n\n .", "-alert-icon {\n font-size: 15px;\n }\n\n &.", "-alert-with-description {\n .", "-alert-icon {\n display: inline-block;\n line-height: 24px;\n font-size: 15px;\n }\n }\n \n}\n"])), function (p) {
|
|
5
|
+
return p.antPrefix;
|
|
6
|
+
}, function (p) {
|
|
7
|
+
return p.antPrefix;
|
|
8
|
+
}, function (p) {
|
|
9
|
+
return p.antPrefix;
|
|
10
|
+
}, function (p) {
|
|
5
11
|
return p.antPrefix;
|
|
6
12
|
}, function (p) {
|
|
7
13
|
return p.antPrefix;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
3
|
import createGlobalStyle from "../../libs/createStyle";
|
|
4
|
-
export var useDropdownStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-dropdown .", "-dropdown-menu {\n box-shadow: var(--", "-box-shadow);\n border: 1px solid var(--", "-color-border-secondary);\n \n .", "-dropdown-menu-item.", "-dropdown-menu-item-active.", "-dropdown-menu-item-danger:not(.", "-dropdown-menu-item-disabled) {\n color: var(--", "-color-error);\n background-color: var(--", "-color-error-bg-hover);\n }\n \n .", "-dropdown-menu-title-content {\n text-align: left;\n }\n}\n"])), function (p) {
|
|
4
|
+
export var useDropdownStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-dropdown .", "-dropdown-menu {\n box-shadow: var(--", "-box-shadow);\n border: 1px solid var(--", "-color-border-secondary);\n \n .", "-dropdown-menu-item.", "-dropdown-menu-item-active.", "-dropdown-menu-item-danger:not(.", "-dropdown-menu-item-disabled) {\n color: var(--", "-color-error);\n background-color: var(--", "-color-error-bg-hover);\n }\n\n .", "-dropdown-menu-item:hover {\n background-color: var(--", "-color-fill-tertiary);\n }\n \n .", "-dropdown-menu-title-content {\n text-align: left;\n }\n}\n"])), function (p) {
|
|
5
|
+
return p.antPrefix;
|
|
6
|
+
}, function (p) {
|
|
7
|
+
return p.antPrefix;
|
|
8
|
+
}, function (p) {
|
|
5
9
|
return p.antPrefix;
|
|
6
10
|
}, function (p) {
|
|
7
11
|
return p.antPrefix;
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
var _templateObject;
|
|
2
2
|
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
3
|
import createGlobalStyle from "../../libs/createStyle";
|
|
4
|
-
export var useSelectStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-select-dropdown {\n border: 1px solid var(--", "-color-border-secondary);\n box-shadow: 0px 4px 6px 0px rgba(0, 0, 0, 0.08);\n border-radius: var(--", "-border-radius);\n}\n\n.", "-select-outlined:not(.", "-select-customize-input) .", "-select-selector {\n border-color: var(--", "-color-border-secondary);\n}\n\n.", "-select .", "-select-arrow {\n color: var(--", "-color-text-secondary);\n}\n\n.", "-select-outlined.", "-select-multiple {\n .", "-select-selection-item {\n border-radius: 4px;\n background-color: var(--", "-color-mauve-bg);\n }\n}\n\n.", "-select-selection-overflow {\n color: var(--", "-color-mauve);\n \n .", "-select-selection-item-remove {\n .anticon-close {\n font-size: 14px;\n color: var(--", "-color-mauve);\n }\n }\n}\n\n.", "-select-disabled.", "-select-multiple .", "-select-selection-overflow .", "-select-selection-item {\n color: var(--", "-color-mauve);\n}\n\n.", "-select .", "-select-selection-placeholder {\n color: var(--", "-color-text-tertiary);\n}\n"])), function (p) {
|
|
4
|
+
export var useSelectStyle = createGlobalStyle(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.", "-select-dropdown {\n border: 1px solid var(--", "-color-border-secondary);\n box-shadow: 0px 4px 6px 0px rgba(0, 0, 0, 0.08);\n border-radius: var(--", "-border-radius);\n\n .", "-select-item-option-active,\n .", "-select-item-option-active:not(.", "-select-item-option-disabled) {\n background-color: var(--", "-color-fill-tertiary);\n }\n}\n\n.", "-select-outlined:not(.", "-select-customize-input) .", "-select-selector {\n border-color: var(--", "-color-border-secondary);\n}\n\n.", "-select .", "-select-arrow {\n color: var(--", "-color-text-secondary);\n}\n\n.", "-select-outlined.", "-select-multiple {\n .", "-select-selection-item {\n border-radius: 4px;\n background-color: var(--", "-color-mauve-bg);\n }\n}\n\n.", "-select-selection-overflow {\n color: var(--", "-color-mauve);\n \n .", "-select-selection-item-remove {\n .anticon-close {\n font-size: 14px;\n color: var(--", "-color-mauve);\n }\n }\n}\n\n.", "-select-disabled.", "-select-multiple .", "-select-selection-overflow .", "-select-selection-item {\n color: var(--", "-color-mauve);\n}\n\n.", "-select .", "-select-selection-placeholder {\n color: var(--", "-color-text-tertiary);\n}\n"])), function (p) {
|
|
5
|
+
return p.antPrefix;
|
|
6
|
+
}, function (p) {
|
|
7
|
+
return p.antPrefix;
|
|
8
|
+
}, function (p) {
|
|
9
|
+
return p.antPrefix;
|
|
10
|
+
}, function (p) {
|
|
11
|
+
return p.antPrefix;
|
|
12
|
+
}, function (p) {
|
|
5
13
|
return p.antPrefix;
|
|
6
14
|
}, function (p) {
|
|
7
15
|
return p.antPrefix;
|
|
@@ -22,6 +22,11 @@ export default (function () {
|
|
|
22
22
|
type: "warning",
|
|
23
23
|
message: "I am a description of a component.",
|
|
24
24
|
showIcon: true
|
|
25
|
+
}), /*#__PURE__*/_jsx(Alert, {
|
|
26
|
+
type: "error",
|
|
27
|
+
message: "I am a description of a component.",
|
|
28
|
+
description: "I am a description of a component.",
|
|
29
|
+
showIcon: true
|
|
25
30
|
})]
|
|
26
31
|
});
|
|
27
32
|
});
|