openxiangda 1.0.27 → 1.0.28
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/openxiangda-skills/SKILL.md +1 -1
- package/openxiangda-skills/references/component-guide.md +9 -9
- package/openxiangda-skills/references/style-system.md +121 -114
- package/openxiangda-skills/skills/openxiangda-page/SKILL.md +2 -2
- package/package.json +1 -1
- package/templates/sy-lowcode-app-workspace/examples/best-practices/design-style.md +4 -0
|
@@ -144,7 +144,7 @@ Workflow / automation / permissions:
|
|
|
144
144
|
Platform domain knowledge (read these first when generating forms or pages so the output matches the live platform behavior):
|
|
145
145
|
|
|
146
146
|
- `references/platform-data-model.md` — how the platform persists field values (JSONB, `{label, value}` for option fields, attachment shape, etc.). Use this whenever you write, render, or diagnose form data.
|
|
147
|
-
- `references/style-system.md` — three-layer style architecture, CSS namespace, and
|
|
147
|
+
- `references/style-system.md` — three-layer style architecture, CSS namespace, and flexible Tailwind/CSS guidance. Use this before writing substantial page or form CSS.
|
|
148
148
|
- `references/architecture-patterns.md` — CRUD data flow, `DataManagementList` pattern, recommended directory layout for `src/pages` and `src/forms`. Use this before scaffolding a new page or list view.
|
|
149
149
|
- `references/best-practices.md` — read this before implementing app-level business patterns; it points to `examples/best-practices/` and explains when to use status fields instead of workflow.
|
|
150
150
|
- `references/component-guide.md` — when to pick platform components vs. raw Ant Design vs. custom components, with the rules for option fields. Use this before introducing a new component.
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
1. **平台组件优先**:所有平台组件已经接入了组织架构、文件存储、权限、多端适配等平台能力,重写一遍 = 丢能力 + 后续无法维护。
|
|
10
10
|
2. **基于 antd / antd-mobile 包装**:自定义组件必须站在 antd 之上,保证 PC 和移动端的基础体验一致。
|
|
11
11
|
3. **成熟能力先调研开源方案**:图表、动画、拖拽、虚拟列表、富文本、日历、导入导出、复杂表格等,不要直接手写。先查当前项目依赖、官方文档和维护状态,再决定使用库或轻量封装。
|
|
12
|
-
4.
|
|
13
|
-
5.
|
|
12
|
+
4. **样式优先走变量与语义类**:常规后台体验优先使用 CSS 变量、Tailwind 语义类和 Ant Design token;当业务视觉需要时,可以使用 Tailwind 普通类、任意值、局部 CSS、页面级变量或少量动态 inline style。
|
|
13
|
+
5. **谨慎覆盖组件内部 class**:组件库内部类名(`ant-select-selector` 等)是私有 API,下个版本就可能变;确实需要覆盖时要限定页面作用域,并优先考虑组件 props、`className`、CSS 变量或 `ConfigProvider`。
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
@@ -86,7 +86,7 @@ import {
|
|
|
86
86
|
|
|
87
87
|
## 4. 自定义组件开发规范
|
|
88
88
|
|
|
89
|
-
### 4.1
|
|
89
|
+
### 4.1 推荐:基于 antd 包装 + CSS 变量 + 语义类
|
|
90
90
|
|
|
91
91
|
```tsx
|
|
92
92
|
import { Select, SelectProps } from 'antd';
|
|
@@ -115,7 +115,7 @@ export function CustomSelect({ options, className, ...rest }: CustomSelectProps)
|
|
|
115
115
|
- 透传 `...rest`,保留 antd 全部 API。
|
|
116
116
|
- `popupClassName="sy-app-workspace"` 确保弹层应用平台样式作用域。
|
|
117
117
|
- `getPopupContainer` 解决弹层被裁切问题(详见第 7 节常见错误)。
|
|
118
|
-
- 使用 `w-full`、`rounded-form`
|
|
118
|
+
- 使用 `w-full`、`rounded-form` 等语义类作为默认基线;如果组件视觉需要精调,可以继续使用 Tailwind 普通类、任意值或局部 CSS。
|
|
119
119
|
|
|
120
120
|
### 4.2 错误:从头实现选择器
|
|
121
121
|
|
|
@@ -162,7 +162,7 @@ function BadSelect({ options }) {
|
|
|
162
162
|
}
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
-
>
|
|
165
|
+
> 优先覆盖 `style-system.md` 中定义的 `--sy-color-*`、`--sy-radius-*`、`--sy-spacing-*` 等平台变量。需要页面专属视觉时,可以新增页面级 CSS 变量,建议加业务前缀,避免与平台变量冲突。
|
|
166
166
|
|
|
167
167
|
3. **antd `ConfigProvider` 主题**
|
|
168
168
|
```tsx
|
|
@@ -171,7 +171,7 @@ function BadSelect({ options }) {
|
|
|
171
171
|
</ConfigProvider>
|
|
172
172
|
```
|
|
173
173
|
|
|
174
|
-
4.
|
|
174
|
+
4. **谨慎**:直接覆盖组件内部 class(`.ant-select-selector { ... }`)属于私有 API,升级风险较高。确实需要时必须限定在页面根类或 `.sy-app-workspace` 下,并优先考虑 `ConfigProvider`、`className`、组件 props 或 CSS 变量是否能解决。
|
|
175
175
|
|
|
176
176
|
---
|
|
177
177
|
|
|
@@ -207,10 +207,10 @@ export function ActionButton(props) {
|
|
|
207
207
|
| 用 `<input type="file">` 上传 | 用 `AttachmentField` / `ImageField` |
|
|
208
208
|
| 用第三方富文本(TinyMCE 等) | 用 `EditorField` |
|
|
209
209
|
| 自己写列表 + 分页 + 导出 | 用 `DataManagementList` |
|
|
210
|
-
| `style={{ color: '#333', padding: 16 }}`
|
|
210
|
+
| 常规组件大量写 `style={{ color: '#333', padding: 16 }}` | 优先 Tailwind 语义类、普通工具类、CSS 变量或局部 CSS;动态值和少量精调 inline style 可接受 |
|
|
211
211
|
| Select / Date / Modal 弹层错位、被滚动容器裁切 | 加 `getPopupContainer={(trigger) => trigger.parentElement}`,并在弹层 `popupClassName` 上加 `sy-app-workspace` |
|
|
212
212
|
| 不分端,PC 组件直接放移动端 | 按端拆页 + 端内用对应 UI 库 |
|
|
213
|
-
|
|
|
213
|
+
| 无作用域覆盖 `.ant-xxx` 内部 class | 优先用 `className`、CSS 变量或 `ConfigProvider` 主题;必要覆盖时限定到页面命名空间 |
|
|
214
214
|
| 在自定义组件中不透传 `...rest` / `ref` | 透传 props 与 `forwardRef`,保留底层组件全部能力 |
|
|
215
215
|
|
|
216
216
|
---
|
|
@@ -219,6 +219,6 @@ export function ActionButton(props) {
|
|
|
219
219
|
|
|
220
220
|
- [ ] 涉及人员 / 部门 / 文件 / 图片 / 富文本 / 签名 / 地图 / 列表 → 用了平台组件?
|
|
221
221
|
- [ ] 自定义组件 → 基于 antd / antd-mobile 包装并透传 props?
|
|
222
|
-
- [ ] 样式 →
|
|
222
|
+
- [ ] 样式 → 常规区域优先 Tailwind 语义类 / CSS 变量 / ConfigProvider;特殊视觉用 Tailwind 任意值、局部 CSS 或页面级变量且作用域收敛?
|
|
223
223
|
- [ ] 弹层 → 设置了 `getPopupContainer` 与 `sy-app-workspace` 弹层样式作用域?
|
|
224
224
|
- [ ] 多端 → PC 用 antd、Mobile 用 antd-mobile,业务逻辑共享?
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# OpenXiangda 样式体系参考
|
|
2
|
-
|
|
3
|
-
> 本文档面向 AI Agent
|
|
1
|
+
# OpenXiangda 样式体系参考
|
|
2
|
+
|
|
3
|
+
> 本文档面向 AI Agent,提供代码页面/表单/工作流自定义节点的推荐样式基线。平台 CSS 变量与语义类是优先选择,不是唯一选择;当业务视觉、品牌表达、图表、看板、动效或复杂布局需要更精确控制时,可以使用 Tailwind 普通工具类、Tailwind 任意值、局部 CSS、页面级 CSS 变量或必要的 inline style。
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
└──────────────────────────────────────────────────────────────┘
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
**核心原则**:平台视觉基线优先来源于 Layer 1 的 CSS Variables;AntD 与 Tailwind 默认消费这套变量。业务页面可以在 `.sy-app-workspace` 命名空间内扩展页面级样式,不要求所有视觉值都必须来自内置 Token。
|
|
36
36
|
|
|
37
37
|
### 1.2 为什么不使用 Shadow DOM
|
|
38
38
|
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
|
|
55
55
|
---
|
|
56
56
|
|
|
57
|
-
## 2. Layer 1:CSS Variables 设计 Token
|
|
58
|
-
|
|
59
|
-
>
|
|
57
|
+
## 2. Layer 1:CSS Variables 设计 Token
|
|
58
|
+
|
|
59
|
+
> 推荐基线。**所有平台变量同时挂载在 `:root` 与 `.sy-app-workspace`**,前者用于全局可用,后者保证命名空间生效时不依赖根选择器。页面可以继续定义自己的局部变量,例如 `--sales-dashboard-accent`、`--kanban-column-width`。
|
|
60
60
|
|
|
61
61
|
```css
|
|
62
62
|
:root, .sy-app-workspace {
|
|
@@ -199,9 +199,9 @@ export function AppThemeProvider({ children }: { children: React.ReactNode }) {
|
|
|
199
199
|
|
|
200
200
|
---
|
|
201
201
|
|
|
202
|
-
## 4. Layer 3:Tailwind 语义化工具类
|
|
203
|
-
|
|
204
|
-
`tailwind-preset.ts` 基于 CSS Variables
|
|
202
|
+
## 4. Layer 3:Tailwind 语义化工具类
|
|
203
|
+
|
|
204
|
+
`tailwind-preset.ts` 基于 CSS Variables 扩展语义化类。语义类适合常规后台页面、表单、列表和状态展示;普通 Tailwind 工具类与任意值适合特殊布局、品牌视觉、图表容器、复杂动效和一次性精调。
|
|
205
205
|
|
|
206
206
|
### 4.1 颜色类
|
|
207
207
|
|
|
@@ -247,110 +247,117 @@ export function AppThemeProvider({ children }: { children: React.ReactNode }) {
|
|
|
247
247
|
| `text-xl-sy` | `font-size: var(--sy-font-size-xl)` |
|
|
248
248
|
| `text-2xl-sy` | `font-size: var(--sy-font-size-2xl)` |
|
|
249
249
|
|
|
250
|
-
> 通用 Tailwind 数值类(如 `p-4`、`text-sm
|
|
251
|
-
|
|
252
|
-
---
|
|
253
|
-
|
|
254
|
-
## 5.
|
|
255
|
-
|
|
256
|
-
| # |
|
|
257
|
-
|---|---|---|---|
|
|
258
|
-
| 1 |
|
|
259
|
-
| 2 |
|
|
260
|
-
| 3 |
|
|
261
|
-
| 4 |
|
|
262
|
-
| 5 |
|
|
263
|
-
| 6 |
|
|
264
|
-
| 7 |
|
|
265
|
-
|
|
266
|
-
---
|
|
267
|
-
|
|
268
|
-
## 6.
|
|
269
|
-
|
|
270
|
-
### 示例 1:主操作按钮的容器
|
|
271
|
-
|
|
272
|
-
```tsx
|
|
273
|
-
//
|
|
274
|
-
<div
|
|
275
|
-
<
|
|
276
|
-
</div>
|
|
277
|
-
|
|
278
|
-
//
|
|
279
|
-
<div
|
|
280
|
-
<
|
|
281
|
-
</div>
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
### 示例 2:表单字段布局
|
|
285
|
-
|
|
286
|
-
```tsx
|
|
287
|
-
//
|
|
288
|
-
<div className="flex flex-col gap-
|
|
289
|
-
<Input
|
|
290
|
-
<Input
|
|
291
|
-
</div>
|
|
292
|
-
|
|
293
|
-
//
|
|
294
|
-
<div className="flex flex-col gap-
|
|
295
|
-
<Input />
|
|
296
|
-
<Input />
|
|
297
|
-
</div>
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
### 示例 3:状态文案
|
|
301
|
-
|
|
302
|
-
```tsx
|
|
303
|
-
//
|
|
304
|
-
<span
|
|
305
|
-
<span
|
|
306
|
-
|
|
307
|
-
//
|
|
308
|
-
<span className="text-
|
|
309
|
-
<span
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
### 示例 4:卡片容器
|
|
313
|
-
|
|
314
|
-
```tsx
|
|
315
|
-
//
|
|
316
|
-
<div
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
```
|
|
325
|
-
|
|
326
|
-
### 示例 5:次要文本 + 提示
|
|
327
|
-
|
|
328
|
-
```tsx
|
|
329
|
-
//
|
|
330
|
-
<p
|
|
331
|
-
|
|
332
|
-
//
|
|
333
|
-
<p className="text-
|
|
334
|
-
```
|
|
335
|
-
|
|
336
|
-
### 示例 6:自定义代码节点的 CSS(局部样式表)
|
|
337
|
-
|
|
338
|
-
```css
|
|
339
|
-
/*
|
|
340
|
-
.my-node-card {
|
|
341
|
-
background: #ffffff;
|
|
342
|
-
border: 1px solid #d9d9d9;
|
|
343
|
-
padding: 16px;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
/*
|
|
347
|
-
.sy-app-workspace .my-node-card {
|
|
348
|
-
background: var(--sy-color-bg-container);
|
|
349
|
-
border: 1px solid var(--sy-color-border);
|
|
350
|
-
padding: var(--sy-spacing-md);
|
|
351
|
-
border-radius: var(--sy-radius-md);
|
|
352
|
-
}
|
|
353
|
-
|
|
250
|
+
> 通用 Tailwind 数值类(如 `p-4`、`text-sm`)和任意值(如 `grid-cols-[240px_1fr]`、`bg-[#0f766e]`)都可以使用。常规业务组件优先使用语义类,特殊页面按实际视觉需求选择更合适的 Tailwind/CSS 写法。
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## 5. 推荐顺序与硬边界
|
|
255
|
+
|
|
256
|
+
| # | 场景 | 推荐做法 | 允许的扩展 |
|
|
257
|
+
|---|---|---|---|
|
|
258
|
+
| 1 | 常规后台、列表、表单、详情页 | 优先用语义类、平台 CSS 变量和 antd token,保证与平台一致 | 可用 `p-4`、`gap-6`、`text-sm` 等 Tailwind 普通类做快速布局 |
|
|
259
|
+
| 2 | 品牌化首页、门户、看板、数据大屏、营销视觉 | 按视觉目标设计,不要为了套 Token 牺牲效果 | 可用 Tailwind 任意值、CSS 渐变、图片背景、页面级变量、局部 CSS |
|
|
260
|
+
| 3 | 精确布局、复杂 Grid、图表容器、动效 | Tailwind 普通类/任意值和 `styles.css` 都可以直接使用 | 例如 `grid-cols-[280px_1fr]`、`h-[calc(100vh-64px)]`、`transition-[height]` |
|
|
261
|
+
| 4 | 需要运行时动态值 | 少量 inline style 可以使用,尤其是动态尺寸、颜色、坐标、图表变量 | 避免把大段静态样式写进 inline style,静态样式优先放到 class/CSS |
|
|
262
|
+
| 5 | antd 主题 | 优先通过 `ConfigProvider.theme`、CSS 变量和 `className` 控制 | 如确实要覆盖内部 class,必须限定在页面命名空间内,并接受升级风险 |
|
|
263
|
+
| 6 | antd 弹层、Drawer、Modal、DatePicker、Select | 这是硬要求:通过 `getPopupContainer` 锚定到 `.sy-app-workspace` 或就近容器 | 否则弹层可能丢样式或被宿主页面污染 |
|
|
264
|
+
| 7 | CSS 作用域 | 这是硬要求:业务 CSS 必须在 `.sy-app-workspace` 或页面根类下收敛作用域 | 避免写全局裸选择器污染宿主平台 |
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## 6. 推荐示例与可接受变体
|
|
269
|
+
|
|
270
|
+
### 示例 1:主操作按钮的容器
|
|
271
|
+
|
|
272
|
+
```tsx
|
|
273
|
+
// 常规后台表单:推荐用语义类 + antd 组件
|
|
274
|
+
<div className="bg-container p-form rounded-form">
|
|
275
|
+
<Button type="primary">提交</Button>
|
|
276
|
+
</div>
|
|
277
|
+
|
|
278
|
+
// 品牌化或特殊视觉:可以使用 Tailwind 任意值 / 自定义 CSS
|
|
279
|
+
<div style={{ background: '#fff', padding: 24, borderRadius: 6 }}>
|
|
280
|
+
<button style={{ background: '#1677ff', color: '#fff' }}>提交</button>
|
|
281
|
+
</div>
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### 示例 2:表单字段布局
|
|
285
|
+
|
|
286
|
+
```tsx
|
|
287
|
+
// 推荐:表单语义类
|
|
288
|
+
<div className="flex flex-col gap-form p-form">
|
|
289
|
+
<Input />
|
|
290
|
+
<Input />
|
|
291
|
+
</div>
|
|
292
|
+
|
|
293
|
+
// 可接受:特殊布局精调用 Tailwind 普通类 / 任意值
|
|
294
|
+
<div className="flex flex-col gap-[18px] p-6">
|
|
295
|
+
<Input className="h-[32px]" />
|
|
296
|
+
<Input className="h-[32px]" />
|
|
297
|
+
</div>
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### 示例 3:状态文案
|
|
301
|
+
|
|
302
|
+
```tsx
|
|
303
|
+
// 推荐:平台状态语义
|
|
304
|
+
<span className="text-success">已通过</span>
|
|
305
|
+
<span className="text-error">已驳回</span>
|
|
306
|
+
|
|
307
|
+
// 可接受:页面专属状态色
|
|
308
|
+
<span className="text-[#16a34a]">已通过</span>
|
|
309
|
+
<span style={{ color: riskLevelColor }}>风险等级</span>
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### 示例 4:卡片容器
|
|
313
|
+
|
|
314
|
+
```tsx
|
|
315
|
+
// 推荐:语义类
|
|
316
|
+
<div className="bg-container shadow-card rounded-card">...</div>
|
|
317
|
+
|
|
318
|
+
// 可接受:特殊卡片视觉
|
|
319
|
+
<div style={{
|
|
320
|
+
background: '#fff',
|
|
321
|
+
boxShadow: '0 6px 16px rgba(0,0,0,0.08)',
|
|
322
|
+
borderRadius: 8
|
|
323
|
+
}}>...</div>
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
### 示例 5:次要文本 + 提示
|
|
327
|
+
|
|
328
|
+
```tsx
|
|
329
|
+
// 推荐:层级语义
|
|
330
|
+
<p className="text-secondary text-sm-sy">提示信息</p>
|
|
331
|
+
|
|
332
|
+
// 可接受:需要匹配图表或品牌视觉时直接设定
|
|
333
|
+
<p className="text-[13px] text-slate-500">提示信息</p>
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### 示例 6:自定义代码节点的 CSS(局部样式表)
|
|
337
|
+
|
|
338
|
+
```css
|
|
339
|
+
/* 避免:全局裸选择器,容易污染宿主页面 */
|
|
340
|
+
.my-node-card {
|
|
341
|
+
background: #ffffff;
|
|
342
|
+
border: 1px solid #d9d9d9;
|
|
343
|
+
padding: 16px;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/* 推荐:限定在平台命名空间或页面根类下 */
|
|
347
|
+
.sy-app-workspace .my-node-card {
|
|
348
|
+
background: var(--sy-color-bg-container);
|
|
349
|
+
border: 1px solid var(--sy-color-border);
|
|
350
|
+
padding: var(--sy-spacing-md);
|
|
351
|
+
border-radius: var(--sy-radius-md);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/* 可接受:页面专属视觉值,只要作用域收敛 */
|
|
355
|
+
.sy-app-workspace .sales-dashboard .my-node-card {
|
|
356
|
+
background: linear-gradient(135deg, #0f766e, #0ea5e9);
|
|
357
|
+
border-radius: 14px;
|
|
358
|
+
padding: 20px;
|
|
359
|
+
}
|
|
360
|
+
```
|
|
354
361
|
|
|
355
362
|
---
|
|
356
363
|
|
|
@@ -60,7 +60,7 @@ Read these references only when editing page code:
|
|
|
60
60
|
- `../../references/pages/page-sdk.md`
|
|
61
61
|
- `../../references/notifications.md` — notification resources and `sdk.notification` usage. Read before adding reminders, alerts, or message templates to a page.
|
|
62
62
|
- `../../references/pages/publish-flow.md`
|
|
63
|
-
- `../../references/style-system.md` — three-layer style architecture, CSS namespace, and
|
|
63
|
+
- `../../references/style-system.md` — three-layer style architecture, CSS namespace, and flexible Tailwind/CSS guidance. Read before writing substantial page CSS or Tailwind classes.
|
|
64
64
|
- `../../references/architecture-patterns.md` — CRUD data flow, `DataManagementList` pattern, and recommended `src/pages/<pageCode>/` layout. Read before scaffolding a new page or list view.
|
|
65
65
|
- `../../references/component-guide.md` — when to pick platform components, raw Ant Design, or custom components. Read before introducing a new component.
|
|
66
66
|
- `../../references/troubleshooting.md` — known failure modes (missing styles, `options` runtime errors, broken option rendering, etc.) and their fixes. Read when something does not behave as expected.
|
|
@@ -82,7 +82,7 @@ Read these references only when editing page code:
|
|
|
82
82
|
- Do not scatter hardcoded `/view/...&isRenderNav=false` URLs through page code. Use the runtime navigation API or the local route helper generated for the app shell.
|
|
83
83
|
- Platform menus should bind only the formal app-shell code page for user-facing entry points. Original forms, workflows, and native view pages may remain as development / maintenance resources or permission targets, but should not become the product navigation shell.
|
|
84
84
|
- For prod, explicitly run with `--profile prod`; never rely on the current profile for release operations.
|
|
85
|
-
- Follow the style system in `../../references/style-system.md`:
|
|
85
|
+
- Follow the style system in `../../references/style-system.md`: prefer platform CSS variables, semantic Tailwind classes, and the page CSS namespace for consistency, but do not force every visual value through built-in tokens. Tailwind ordinary utilities, Tailwind arbitrary values, local CSS, page-level CSS variables, and small dynamic inline styles are allowed when they better match the product design.
|
|
86
86
|
- For list / detail / CRUD pages, follow `../../references/architecture-patterns.md` (e.g. `DataManagementList`) before writing custom data-fetching loops.
|
|
87
87
|
- Query pages must use pagination with structured conditions. Do not fetch a large `pageSize` and filter in the browser; avoid default `searchKeyWord`, and build multi-field fuzzy search with explicit `filterGroup` + `OR`.
|
|
88
88
|
- Pick components per `../../references/component-guide.md`: prefer the platform component, fall back to Ant Design, and only build a custom component when neither fits.
|
package/package.json
CHANGED
|
@@ -24,6 +24,10 @@ OpenXiangda business apps should feel like focused operational tools.
|
|
|
24
24
|
|
|
25
25
|
- Use platform CSS variables, Tailwind semantic classes, Ant Design, and
|
|
26
26
|
antd-mobile.
|
|
27
|
+
- Treat platform tokens as the default baseline, not a hard limit. Tailwind
|
|
28
|
+
ordinary utilities, arbitrary values, page CSS variables, scoped CSS, and
|
|
29
|
+
small dynamic inline styles are acceptable when they better match the product
|
|
30
|
+
design.
|
|
27
31
|
- Use mature packages for mature interactions: antd controls instead of native
|
|
28
32
|
inputs, ECharts for charts, GSAP for complex animation timelines, and
|
|
29
33
|
maintained drag/drop or virtual-list libraries when those behaviors are
|