weifuwu 0.87.0 → 0.89.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 +111 -135
- package/dist/client/components/ActionSheet/ActionSheet.d.ts +1 -1
- package/dist/client/components/AiChat/AiChat.d.ts +3 -4
- package/dist/client/components/ChatInput/ChatInput.d.ts +5 -0
- package/dist/client/components/CitationCard/CitationCard.d.ts +1 -1
- package/dist/client/components/Command/Command.d.ts +1 -1
- package/dist/client/components/ContextMenu/ContextMenu.d.ts +1 -1
- package/dist/client/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/client/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/client/components/Editor/model/html.d.ts +10 -0
- package/dist/client/components/ImageCropper/ImageCropper.d.ts +6 -2
- package/dist/client/components/Menu/Menu.d.ts +1 -1
- package/dist/client/components/NavMenu/NavMenu.d.ts +1 -1
- package/dist/client/components/Popconfirm/Popconfirm.d.ts +1 -1
- package/dist/client/components/SlideCanvas/SlideCanvas.d.ts +1 -1
- package/dist/client/components/Tour/Tour.d.ts +1 -1
- package/dist/client/components/TreeSelect/TreeSelect.d.ts +1 -1
- package/dist/client/components/index.js +41 -41
- package/dist/client/components/style.css +298 -644
- package/dist/client/layout/weifuwu-layout.css +286 -640
- package/dist/client/vdom/browser/Browser.d.ts +2 -0
- package/dist/client/vdom/commands.d.ts +4 -1
- package/dist/client/vdom/context/UIContext.d.ts +8 -0
- package/dist/client/vdom/core/diff/attrs.d.ts +10 -2
- package/dist/client/vdom/core/field/attributes.d.ts +12 -0
- package/dist/client/vdom/core/field/events.d.ts +8 -0
- package/dist/client/vdom/core/field/input-sync.d.ts +14 -0
- package/dist/client/vdom/core/field/key.d.ts +3 -0
- package/dist/client/vdom/core/field/props.d.ts +13 -1
- package/dist/client/vdom/core/field/ref.d.ts +6 -0
- package/dist/client/vdom/core/field/style.d.ts +7 -1
- package/dist/client/vdom/core/node/component.d.ts +3 -4
- package/dist/client/vdom/core/node/native.d.ts +6 -1
- package/dist/client/vdom/core/patch/index.d.ts +24 -1
- package/dist/client/vdom/core/patch/processors.d.ts +8 -1
- package/dist/client/vdom/core/protocol.d.ts +45 -0
- package/dist/client/vdom/core/router.d.ts +7 -0
- package/dist/client/vdom/core/ssr/absorb.d.ts +31 -4
- package/dist/client/vdom/core/transform/index.d.ts +6 -6
- package/dist/client/vdom/core/v2/cycle.d.ts +54 -0
- package/dist/client/vdom/core/v2/diff.d.ts +80 -0
- package/dist/client/vdom/core/v2/integrate.d.ts +24 -0
- package/dist/client/vdom/core/v2/render.d.ts +28 -0
- package/dist/client/vdom/core/v2/schedule.d.ts +33 -0
- package/dist/client/vdom/core/v2/serve.d.ts +4 -0
- package/dist/client/vdom/core/v2/spy.d.ts +21 -0
- package/dist/client/vdom/core/v2/ssr.d.ts +14 -0
- package/dist/client/vdom/core/vnode.d.ts +9 -6
- package/dist/client/vdom/dev/error-counter.d.ts +27 -0
- package/dist/client/vdom/dev/render-health.d.ts +60 -0
- package/dist/client/vdom/hooks/chat.d.ts +32 -5
- package/dist/client/vdom/hooks/drag-media.d.ts +3 -1
- package/dist/client/vdom/hooks/env.d.ts +32 -0
- package/dist/client/vdom/hooks/popup-manager.d.ts +21 -0
- package/dist/client/vdom/hooks/popup.d.ts +4 -1
- package/dist/client/vdom/hooks/stable.d.ts +4 -0
- package/dist/client/vdom/hooks/use-observable.d.ts +13 -0
- package/dist/client/vdom/index.d.ts +14 -6
- package/dist/client/vdom/index.js +4 -7
- package/dist/client/vdom/jsx-runtime.js +1 -1
- package/dist/client/vdom/middlewares/api.d.ts +8 -0
- package/dist/client/vdom/middlewares/auth-i18n.d.ts +7 -0
- package/dist/client/vdom/middlewares/ws.d.ts +41 -1
- package/dist/client/vdom/observable/index.d.ts +13 -0
- package/dist/client/vdom/observable/observable.d.ts +26 -0
- package/dist/client/vdom/observable/operators.d.ts +76 -0
- package/dist/client/vdom/observable/sources.d.ts +54 -0
- package/dist/client/vdom/observable/types.d.ts +45 -0
- package/dist/client/vdom/store.d.ts +17 -2
- package/dist/client/vdom/testing.js +2 -2
- package/dist/server/ai/agent.d.ts +18 -0
- package/dist/server/ai/client.d.ts +14 -2
- package/dist/server/ai/contracts.d.ts +2 -2
- package/dist/server/ai/sse.d.ts +6 -0
- package/dist/server/core/collect.d.ts +31 -0
- package/dist/server/core/error-counter.d.ts +11 -0
- package/dist/server/core/hub.d.ts +2 -0
- package/dist/server/core/router.d.ts +12 -9
- package/dist/server/db/contracts.d.ts +24 -0
- package/dist/server/db/memory-redis.d.ts +3 -4
- package/dist/server/db/memory-sql.d.ts +20 -4
- package/dist/server/db/postgres-server.d.ts +2 -0
- package/dist/server/db/query.d.ts +21 -0
- package/dist/server/db/redis-server.d.ts +4 -2
- package/dist/server/db/sql-parser.d.ts +2 -1
- package/dist/server/email/index.d.ts +2 -0
- package/dist/server/index.d.ts +4 -1
- package/dist/server/index.js +3927 -1982
- package/dist/server/messager/index.d.ts +21 -2
- package/dist/server/middleware/compress.d.ts +25 -0
- package/dist/server/ui/index.d.ts +8 -1
- package/dist/server/user/index.d.ts +4 -0
- package/dist/shared/router/chain.d.ts +9 -0
- package/dist/shared/router/context.d.ts +35 -0
- package/dist/shared/router/ctx-fields.d.ts +20 -0
- package/dist/shared/router/pipeline.d.ts +70 -0
- package/dist/shared/router/trie.d.ts +11 -3
- package/dist/shared/router/types.d.ts +23 -0
- package/docs/style-guide.md +44 -41
- package/package.json +13 -10
- package/content/apps/admin.md +0 -55
- package/content/apps/agent-platform.md +0 -35
- package/content/apps/auth.md +0 -49
- package/content/apps/multi.md +0 -44
- package/content/apps/todo.md +0 -51
- package/content/backend/ai.md +0 -28
- package/content/backend/auth.md +0 -20
- package/content/backend/email.md +0 -23
- package/content/backend/graphql.md +0 -23
- package/content/backend/http.md +0 -23
- package/content/backend/limit.md +0 -23
- package/content/backend/middleware.md +0 -17
- package/content/backend/queue.md +0 -23
- package/content/backend/redis.md +0 -26
- package/content/backend/router.md +0 -23
- package/content/backend/schedule.md +0 -23
- package/content/backend/sql.md +0 -27
- package/content/backend/sse.md +0 -26
- package/content/backend/ws.md +0 -26
- package/content/capabilities/app-node.md +0 -21
- package/content/capabilities/data.md +0 -21
- package/content/capabilities/events.md +0 -21
- package/content/capabilities/hooks.md +0 -22
- package/content/capabilities/i18n.md +0 -21
- package/content/capabilities/popup.md +0 -21
- package/content/capabilities/render-only.md +0 -23
- package/content/capabilities/router.md +0 -22
- package/content/capabilities/self-id.md +0 -21
- package/content/capabilities/store.md +0 -21
- package/content/capabilities/theme.md +0 -21
- package/content/capabilities/two-phase.md +0 -21
- package/content/components/accordion.md +0 -50
- package/content/components/actionsheet.md +0 -46
- package/content/components/affix.md +0 -51
- package/content/components/aichat.md +0 -57
- package/content/components/alert.md +0 -52
- package/content/components/alertgroup.md +0 -45
- package/content/components/anchor.md +0 -52
- package/content/components/app.md +0 -37
- package/content/components/approvalcard.md +0 -56
- package/content/components/appshell.md +0 -50
- package/content/components/aspectratio.md +0 -47
- package/content/components/authpage.md +0 -61
- package/content/components/autocomplete-v2.md +0 -40
- package/content/components/autocomplete.md +0 -56
- package/content/components/avatar.md +0 -51
- package/content/components/avatargroup.md +0 -47
- package/content/components/backtop.md +0 -53
- package/content/components/badge.md +0 -55
- package/content/components/breadcrumb.md +0 -49
- package/content/components/button.md +0 -63
- package/content/components/calendar-v2.md +0 -40
- package/content/components/calendar.md +0 -50
- package/content/components/card.md +0 -58
- package/content/components/carousel.md +0 -52
- package/content/components/cascader-v2.md +0 -39
- package/content/components/cascader.md +0 -54
- package/content/components/chart.md +0 -53
- package/content/components/chatinput.md +0 -63
- package/content/components/checkbox.md +0 -51
- package/content/components/checkboxgroup.md +0 -52
- package/content/components/citationcard.md +0 -48
- package/content/components/codeblock.md +0 -48
- package/content/components/codeeditor.md +0 -47
- package/content/components/collapse.md +0 -49
- package/content/components/colorpicker.md +0 -50
- package/content/components/command.md +0 -50
- package/content/components/confirm.md +0 -57
- package/content/components/contextmenu.md +0 -48
- package/content/components/copybutton.md +0 -51
- package/content/components/datepicker.md +0 -52
- package/content/components/descriptions-v2.md +0 -39
- package/content/components/descriptions.md +0 -52
- package/content/components/diffview-v2.md +0 -39
- package/content/components/diffview.md +0 -50
- package/content/components/divider.md +0 -48
- package/content/components/drawer.md +0 -55
- package/content/components/dropdown.md +0 -53
- package/content/components/editor.md +0 -49
- package/content/components/emptystate.md +0 -51
- package/content/components/exportcsv.md +0 -38
- package/content/components/field.md +0 -54
- package/content/components/filepreview-office.md +0 -37
- package/content/components/filepreview.md +0 -49
- package/content/components/filetree.md +0 -56
- package/content/components/fileupload-v2.md +0 -39
- package/content/components/fileupload.md +0 -57
- package/content/components/floatbutton.md +0 -52
- package/content/components/form-v2.md +0 -41
- package/content/components/form.md +0 -60
- package/content/components/grid.md +0 -51
- package/content/components/highlight-v2.md +0 -39
- package/content/components/highlight.md +0 -46
- package/content/components/hovercard.md +0 -51
- package/content/components/icon.md +0 -50
- package/content/components/imagecropper.md +0 -45
- package/content/components/img.md +0 -56
- package/content/components/infinitescroll-v2.md +0 -40
- package/content/components/infinitescroll.md +0 -54
- package/content/components/input.md +0 -65
- package/content/components/inputnumber.md +0 -58
- package/content/components/inview.md +0 -56
- package/content/components/jsonschemaform.md +0 -53
- package/content/components/jsonviewer-v2.md +0 -39
- package/content/components/jsonviewer.md +0 -49
- package/content/components/kanban.md +0 -46
- package/content/components/label.md +0 -48
- package/content/components/layout.md +0 -54
- package/content/components/layoutcontent.md +0 -43
- package/content/components/layoutheader.md +0 -43
- package/content/components/layoutsider.md +0 -43
- package/content/components/link.md +0 -52
- package/content/components/list.md +0 -44
- package/content/components/loading.md +0 -45
- package/content/components/logviewer-v2.md +0 -39
- package/content/components/logviewer.md +0 -53
- package/content/components/markdown.md +0 -51
- package/content/components/markdowneditor.md +0 -47
- package/content/components/math.md +0 -42
- package/content/components/mentions-v2.md +0 -39
- package/content/components/mentions.md +0 -52
- package/content/components/menu.md +0 -56
- package/content/components/menubar.md +0 -44
- package/content/components/messagebubble.md +0 -50
- package/content/components/modal.md +0 -59
- package/content/components/navmenu.md +0 -47
- package/content/components/notification.md +0 -51
- package/content/components/pageheader.md +0 -53
- package/content/components/pagination.md +0 -49
- package/content/components/paragraph.md +0 -45
- package/content/components/passwordinput.md +0 -57
- package/content/components/pininput-v2.md +0 -39
- package/content/components/pininput.md +0 -50
- package/content/components/pipeline.md +0 -49
- package/content/components/popconfirm.md +0 -58
- package/content/components/popover.md +0 -61
- package/content/components/progressbar.md +0 -50
- package/content/components/prompttemplate.md +0 -49
- package/content/components/qrcode.md +0 -50
- package/content/components/radiogroup.md +0 -53
- package/content/components/rate.md +0 -53
- package/content/components/reasoningblock.md +0 -47
- package/content/components/relationgraph.md +0 -52
- package/content/components/resizable.md +0 -53
- package/content/components/result.md +0 -49
- package/content/components/scrollbar.md +0 -49
- package/content/components/searchinput.md +0 -51
- package/content/components/segmentedcontrol.md +0 -59
- package/content/components/select-searchable.md +0 -47
- package/content/components/select.md +0 -66
- package/content/components/sessionlist.md +0 -52
- package/content/components/sheetgrid.md +0 -44
- package/content/components/skeleton.md +0 -55
- package/content/components/slidecanvas.md +0 -44
- package/content/components/slider.md +0 -62
- package/content/components/sortablelist.md +0 -39
- package/content/components/space.md +0 -52
- package/content/components/sparkline.md +0 -52
- package/content/components/statcard-countdown.md +0 -39
- package/content/components/statcard.md +0 -56
- package/content/components/steps.md +0 -48
- package/content/components/switch.md +0 -50
- package/content/components/tabbar.md +0 -45
- package/content/components/table-v2.md +0 -40
- package/content/components/table.md +0 -66
- package/content/components/tabs.md +0 -56
- package/content/components/tag.md +0 -51
- package/content/components/tagsinput-v2.md +0 -39
- package/content/components/tagsinput.md +0 -54
- package/content/components/text.md +0 -45
- package/content/components/textarea.md +0 -57
- package/content/components/themeswitch.md +0 -69
- package/content/components/timeline.md +0 -50
- package/content/components/title.md +0 -45
- package/content/components/toast.md +0 -52
- package/content/components/toggle-togglegroup.md +0 -52
- package/content/components/togglegroup.md +0 -47
- package/content/components/toolcallcard.md +0 -51
- package/content/components/tooltip.md +0 -50
- package/content/components/tour.md +0 -50
- package/content/components/transfer.md +0 -52
- package/content/components/tree-v2.md +0 -39
- package/content/components/tree.md +0 -59
- package/content/components/treeselect.md +0 -54
- package/content/components/typography.md +0 -51
- package/content/components/videoplayer.md +0 -52
- package/content/components/virtuallist.md +0 -52
- package/content/components/virtualtable-v2.md +0 -39
- package/content/components/virtualtable.md +0 -55
- package/content/components/watermark.md +0 -53
- package/content/components/wave.md +0 -43
- package/content/guides/ai-chat-family.md +0 -24
- package/content/guides/choose.md +0 -67
- package/content/guides/component-model.md +0 -32
- package/content/guides/component-standards.md +0 -123
- package/content/guides/components-guide.md +0 -813
- package/content/guides/custom-component.md +0 -321
- package/content/guides/data-guide.md +0 -281
- package/content/guides/file-preview-family.md +0 -18
- package/content/guides/frontend.md +0 -968
- package/content/guides/layout-choice.md +0 -64
- package/content/guides/layout-guide.md +0 -241
- package/content/guides/middleware.md +0 -459
- package/content/guides/mobile-guide.md +0 -105
- package/content/guides/page-building.md +0 -98
- package/content/guides/production.md +0 -37
- package/content/guides/quality.md +0 -60
- package/content/guides/realtime-guide.md +0 -296
- package/content/guides/render-only.md +0 -44
- package/content/guides/saas-guide.md +0 -253
- package/content/guides/server-guide.md +0 -359
- package/content/guides/start.md +0 -41
- package/content/guides/styling.md +0 -154
- package/content/guides/ui-dom-guide.md +0 -157
- package/content/index.json +0 -4344
- package/content/index.md +0 -181
- package/content/layout/align.md +0 -20
- package/content/layout/anchor.md +0 -19
- package/content/layout/app-shell.md +0 -23
- package/content/layout/border.md +0 -20
- package/content/layout/center.md +0 -19
- package/content/layout/cluster.md +0 -19
- package/content/layout/container.md +0 -19
- package/content/layout/fill.md +0 -19
- package/content/layout/grid.md +0 -19
- package/content/layout/hidden.md +0 -22
- package/content/layout/layer.md +0 -19
- package/content/layout/position.md +0 -22
- package/content/layout/row.md +0 -23
- package/content/layout/safe-area.md +0 -20
- package/content/layout/scroll.md +0 -21
- package/content/layout/spacing.md +0 -22
- package/content/layout/split.md +0 -19
- package/content/layout/stack.md +0 -19
- package/content/layout/surface.md +0 -23
- package/content/layout/text.md +0 -22
- package/content/patterns/app-shell.md +0 -34
- package/content/patterns/dashboard.md +0 -36
- package/content/patterns/data-screen.md +0 -30
- package/content/patterns/detail-page.md +0 -31
- package/content/patterns/docs.md +0 -34
- package/content/patterns/focus-task.md +0 -34
- package/content/patterns/landing.md +0 -35
- package/content/patterns/list-page.md +0 -32
- package/content/patterns/mobile.md +0 -31
- package/content/patterns/settings-page.md +0 -33
- package/content/patterns/workspace.md +0 -32
- package/dist/cli/content-sync.test.d.ts +0 -1
- package/dist/cli/docs-cli.test.d.ts +0 -1
- package/dist/cli/docs.d.ts +0 -2
- package/dist/cli/docs.mjs +0 -10961
- package/dist/client/vdom/core/build.d.ts +0 -36
- package/dist/client/vdom/core/diff/children.d.ts +0 -29
- package/dist/client/vdom/core/diff/index.d.ts +0 -22
- package/dist/client/vdom/core/diff/output.d.ts +0 -30
- package/dist/client/vdom/core/diff/same.d.ts +0 -22
- package/dist/client/vdom/core/serve.d.ts +0 -75
- package/dist/client/vdom/core/ssr/index.d.ts +0 -25
- package/examples/apps/admin/README.md +0 -23
- package/examples/apps/admin/api.ts +0 -27
- package/examples/apps/admin/app.tsx +0 -144
- package/examples/apps/admin/main.tsx +0 -8
- package/examples/apps/admin/server.ts +0 -37
- package/examples/apps/auth/README.md +0 -23
- package/examples/apps/auth/api.ts +0 -49
- package/examples/apps/auth/app.tsx +0 -137
- package/examples/apps/auth/main.tsx +0 -8
- package/examples/apps/auth/server.ts +0 -37
- package/examples/apps/multi/README.md +0 -23
- package/examples/apps/multi/app.tsx +0 -83
- package/examples/apps/multi/main.tsx +0 -8
- package/examples/apps/multi/server.ts +0 -33
- package/examples/apps/todo/README.md +0 -23
- package/examples/apps/todo/api.ts +0 -26
- package/examples/apps/todo/app.tsx +0 -128
- package/examples/apps/todo/main.tsx +0 -9
- package/examples/apps/todo/server.ts +0 -39
- package/examples/hello-world/README.md +0 -9
- package/examples/hello-world/client.ts +0 -14
- package/examples/hello-world/routes.tsx +0 -26
- package/examples/hello-world/server.ts +0 -46
- package/examples/patterns/AppShell.tsx +0 -224
- package/examples/patterns/Dashboard.tsx +0 -153
- package/examples/patterns/DataScreen.tsx +0 -104
- package/examples/patterns/DetailPage.tsx +0 -79
- package/examples/patterns/Docs.tsx +0 -105
- package/examples/patterns/FocusTask.tsx +0 -67
- package/examples/patterns/Landing.tsx +0 -90
- package/examples/patterns/ListPage.tsx +0 -77
- package/examples/patterns/Mobile.tsx +0 -154
- package/examples/patterns/SettingsPage.tsx +0 -98
- package/examples/patterns/SplitWorkspace.tsx +0 -113
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# FileTree · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
文件树浏览器——面包屑 + 列表/编辑态 + 上传(受控——数据源无关)
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- office 文档/代码/内容编辑——xlsx/pptx/代码/公式/裁剪
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `entries` | `FileTreeEntry[]` | 否 | 当前目录条目(父层数据源驱动) |
|
|
16
|
-
| `path` | `string` | 否 | 当前目录路径(面包屑) |
|
|
17
|
-
| `loading` | `boolean` | 否 | |
|
|
18
|
-
| `openFile` | `FileTreeOpenFile \| null` | 否 | 编辑态(非空 = 文件编辑中——列表替换为编辑器) |
|
|
19
|
-
| `editValue` | `string` | 否 | 编辑内容(受控) |
|
|
20
|
-
| `saving` | `boolean` | 否 | |
|
|
21
|
-
| `emptyText` | `string` | 否 | 目录空态文案 |
|
|
22
|
-
| `onBack` | `() => void` | 否 | 编辑态返回列表 |
|
|
23
|
-
| `onOpenDir` | `(path: string) => void` | 否 | |
|
|
24
|
-
| `onOpenFile` | `(path: string) => void` | 否 | |
|
|
25
|
-
| `onSave` | `(content: string) => void` | 否 | |
|
|
26
|
-
| `onEditChange` | `(value: string) => void` | 否 | |
|
|
27
|
-
| `onUpload` | `(file: File) => void` | 否 | 上传(父层处理 File——组件只触发选择) |
|
|
28
|
-
| `onRefresh` | `() => void` | 否 | |
|
|
29
|
-
| `accept` | `string` | 否 | 上传 accept(默认全部) |
|
|
30
|
-
|
|
31
|
-
## 用法示例
|
|
32
|
-
|
|
33
|
-
> (P1 迁移 CODE 字符串)
|
|
34
|
-
|
|
35
|
-
## 纪律/坑
|
|
36
|
-
|
|
37
|
-
> 内容编辑:textarea value 走 property(attribute 只是 defaultValue);受控输入纪律
|
|
38
|
-
|
|
39
|
-
## 关系
|
|
40
|
-
|
|
41
|
-
- ↑ 用于页面模式:(暂无)
|
|
42
|
-
- ↑ 用于应用:(暂无)
|
|
43
|
-
- → 后端能力:(暂无)
|
|
44
|
-
|
|
45
|
-
## 文件位置
|
|
46
|
-
|
|
47
|
-
| 文件 | 路径 |
|
|
48
|
-
|------|------|
|
|
49
|
-
| 源码 | `src/client/components/FileTree/FileTree.ts` |
|
|
50
|
-
| 样式 | `src/client/components/FileTree/FileTree.css` |
|
|
51
|
-
| 测试 | `src/client/components/FileTree/FileTree.test.ts` |
|
|
52
|
-
| demo | `apps/showcase/src/demos/DemoFileTree.tsx`(P1 拆分) |
|
|
53
|
-
|
|
54
|
-
## 验证
|
|
55
|
-
|
|
56
|
-
> agent-browser 走查:打开 `/components/editor/filetree` ——(P1 填充具体步骤)
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# FileUpload 禁用 · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
disabled + accept 限定(状态矩阵覆盖)
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- office 文档/代码/内容编辑——xlsx/pptx/代码/公式/裁剪
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
> props 提取降级(接口格式特殊)——见源码:`—`
|
|
14
|
-
|
|
15
|
-
## 用法示例
|
|
16
|
-
|
|
17
|
-
```tsx
|
|
18
|
-
<FileUpload accept="image/*" multiple disabled error />
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## 纪律/坑
|
|
22
|
-
|
|
23
|
-
> 内容编辑:textarea value 走 property(attribute 只是 defaultValue);受控输入纪律
|
|
24
|
-
|
|
25
|
-
## 关系
|
|
26
|
-
|
|
27
|
-
- ↑ 用于页面模式:(暂无)
|
|
28
|
-
- ↑ 用于应用:(暂无)
|
|
29
|
-
- → 后端能力:(暂无)
|
|
30
|
-
|
|
31
|
-
## 文件位置
|
|
32
|
-
|
|
33
|
-
| 文件 | 路径 |
|
|
34
|
-
|------|------|
|
|
35
|
-
| demo | `apps/showcase/src/demos/DemoFileUploadDis.tsx`(P1 拆分) |
|
|
36
|
-
|
|
37
|
-
## 验证
|
|
38
|
-
|
|
39
|
-
> agent-browser 走查:打开 `/components/editor/fileupload-v2` ——(P1 填充具体步骤)
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# FileUpload · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
文件上传,拖拽区 + 文件列表 + accept/maxSize
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- office 文档/代码/内容编辑——xlsx/pptx/代码/公式/裁剪
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `accept` | `string` | 否 | |
|
|
16
|
-
| `multiple` | `boolean` | 否 | |
|
|
17
|
-
| `maxSize` | `number` | 否 | |
|
|
18
|
-
| `disabled` | `boolean` | 否 | |
|
|
19
|
-
| `error` | `string` | 否 | |
|
|
20
|
-
| `hint` | `string` | 否 | |
|
|
21
|
-
| `value` | `File[]` | 否 | |
|
|
22
|
-
| `onChange` | `(files: File[]) => void` | 否 | |
|
|
23
|
-
| `uploading` | `boolean` | 否 | 上传中状态(父层驱动——组件不做 xhr,诚实裁剪) |
|
|
24
|
-
| `progress` | `number` | 否 | 上传进度 0-100(父层驱动) |
|
|
25
|
-
| `children` | `any` | 否 | |
|
|
26
|
-
|
|
27
|
-
## 用法示例
|
|
28
|
-
|
|
29
|
-
```tsx
|
|
30
|
-
<FileUpload accept="image/*,.pdf"
|
|
31
|
-
multiple maxSize={5242880}
|
|
32
|
-
value={files}
|
|
33
|
-
onChange={f => files = f} />
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## 纪律/坑
|
|
37
|
-
|
|
38
|
-
> 内容编辑:textarea value 走 property(attribute 只是 defaultValue);受控输入纪律
|
|
39
|
-
|
|
40
|
-
## 关系
|
|
41
|
-
|
|
42
|
-
- ↑ 用于页面模式:(暂无)
|
|
43
|
-
- ↑ 用于应用:(暂无)
|
|
44
|
-
- → 后端能力:(暂无)
|
|
45
|
-
|
|
46
|
-
## 文件位置
|
|
47
|
-
|
|
48
|
-
| 文件 | 路径 |
|
|
49
|
-
|------|------|
|
|
50
|
-
| 源码 | `src/client/components/FileUpload/FileUpload.ts` |
|
|
51
|
-
| 样式 | `src/client/components/FileUpload/FileUpload.css` |
|
|
52
|
-
| 测试 | `src/client/components/FileUpload/FileUpload.test.ts` |
|
|
53
|
-
| demo | `apps/showcase/src/demos/DemoFileUpload.tsx`(P1 拆分) |
|
|
54
|
-
|
|
55
|
-
## 验证
|
|
56
|
-
|
|
57
|
-
> agent-browser 走查:打开 `/components/editor/fileupload` ——(P1 填充具体步骤)
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# FloatButton · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
悬浮按钮组:展开状态机 + badge
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 基础元素(按钮/图标/文本/卡片/标签)——任意页面的构成单元
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `icon` | `any` | 否 | |
|
|
16
|
-
| `badge` | `number \| string` | 否 | |
|
|
17
|
-
| `position` | `FloatButtonPosition` | 否 | |
|
|
18
|
-
| `static` | `boolean` | 否 | 'static':组内子项(不 fixed——独立 fixed 会与主按钮重叠) |
|
|
19
|
-
| `disabled` | `boolean` | 否 | |
|
|
20
|
-
| `onClick` | `() => void` | 否 | |
|
|
21
|
-
| `children` | `any` | 否 | |
|
|
22
|
-
|
|
23
|
-
## 用法示例
|
|
24
|
-
|
|
25
|
-
```tsx
|
|
26
|
-
<FloatButtonGroup>
|
|
27
|
-
<FloatButton icon={editIcon} onClick={edit} />
|
|
28
|
-
</FloatButtonGroup>
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## 纪律/坑
|
|
32
|
-
|
|
33
|
-
> 浏览器纪律(§5.5):组件能力经 ctx.browser / ctx.ui.useXXX——禁裸 window/document
|
|
34
|
-
|
|
35
|
-
## 关系
|
|
36
|
-
|
|
37
|
-
- ↑ 用于页面模式:(暂无)
|
|
38
|
-
- ↑ 用于应用:(暂无)
|
|
39
|
-
- → 后端能力:(暂无)
|
|
40
|
-
|
|
41
|
-
## 文件位置
|
|
42
|
-
|
|
43
|
-
| 文件 | 路径 |
|
|
44
|
-
|------|------|
|
|
45
|
-
| 源码 | `src/client/components/FloatButton/FloatButton.ts` |
|
|
46
|
-
| 样式 | `src/client/components/FloatButton/FloatButton.css` |
|
|
47
|
-
| 测试 | `src/client/components/FloatButton/FloatButton.test.ts` |
|
|
48
|
-
| demo | `apps/showcase/src/demos/DemoFloatButton.tsx`(P1 拆分) |
|
|
49
|
-
|
|
50
|
-
## 验证
|
|
51
|
-
|
|
52
|
-
> agent-browser 走查:打开 `/components/core/floatbutton` ——(P1 填充具体步骤)
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
# Form 提交 · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
loading 提交 + 校验错误(状态矩阵覆盖)
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 创建/编辑表单页——提交、校验、字段编排
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
> props 提取降级(接口格式特殊)——见源码:`—`
|
|
14
|
-
|
|
15
|
-
## 用法示例
|
|
16
|
-
|
|
17
|
-
```tsx
|
|
18
|
-
<Form validation={{name:[{required:true,minLength:2}]}}
|
|
19
|
-
onSubmit={submit}><Field label="项目名称" required><Input name="name" /></Field>
|
|
20
|
-
<Button type="submit" loading={loading}>提交</Button></Form>
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## 纪律/坑
|
|
24
|
-
|
|
25
|
-
> 受控纪律(§5.2):受控 props 必须配回调——缺回调静默不可点;受控输入(§5.3)输入态不依赖 value 回流(焦点丢失)
|
|
26
|
-
|
|
27
|
-
## 关系
|
|
28
|
-
|
|
29
|
-
- ↑ 用于页面模式:(暂无)
|
|
30
|
-
- ↑ 用于应用:(暂无)
|
|
31
|
-
- → 后端能力:(暂无)
|
|
32
|
-
|
|
33
|
-
## 文件位置
|
|
34
|
-
|
|
35
|
-
| 文件 | 路径 |
|
|
36
|
-
|------|------|
|
|
37
|
-
| demo | `apps/showcase/src/demos/DemoFormSubmit.tsx`(P1 拆分) |
|
|
38
|
-
|
|
39
|
-
## 验证
|
|
40
|
-
|
|
41
|
-
> agent-browser 走查:打开 `/components/form/form-v2` ——(P1 填充具体步骤)
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# Form · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
内置验证规则:required/pattern/minLength/自定义
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 页面模式:focus-task、settings-page(复制即用蓝本——examples/patterns/)
|
|
10
|
-
- 应用模板:todo、auth、admin、agent-platform(examples/apps/ 完整可跑)
|
|
11
|
-
- 创建/编辑表单页——提交、校验、字段编排
|
|
12
|
-
|
|
13
|
-
## API
|
|
14
|
-
|
|
15
|
-
| prop | 类型 | 必填 | 说明 |
|
|
16
|
-
|------|------|------|------|
|
|
17
|
-
| `onSubmit` | `(values: Record<string, any>) => void \| Promise<void>` | 否 | 提交回调,接收字段名→值的对象 |
|
|
18
|
-
| `validation` | `Record<string, ValidationRule[]>` | 否 | 验证规则:字段名 → 规则数组 |
|
|
19
|
-
| `onError` | `(errors: Record<string, string>) => void` | 否 | 验证失败时回调,接收字段名→错误消息的对象 |
|
|
20
|
-
| `children` | `any` | 否 | |
|
|
21
|
-
|
|
22
|
-
## 用法示例
|
|
23
|
-
|
|
24
|
-
```tsx
|
|
25
|
-
<Form
|
|
26
|
-
validation={{
|
|
27
|
-
email: {required: true, message: '必填'},
|
|
28
|
-
}}
|
|
29
|
-
onSubmit={values => ...}
|
|
30
|
-
onError={errors => ...}>
|
|
31
|
-
<Field label="邮箱" error={errors.email}>
|
|
32
|
-
<Input name="email" />
|
|
33
|
-
</Field>
|
|
34
|
-
<Button type="submit">提交</Button>
|
|
35
|
-
</Form>
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## 纪律/坑
|
|
39
|
-
|
|
40
|
-
- 三层一致(§6.3):条件渲染 false 是空洞占位——{cond && <Alert/>} 不滤除不塌缩(提交按钮消失事故)
|
|
41
|
-
- 受控纪律:受控 value 必须配 onChange——缺回调静默不可点
|
|
42
|
-
|
|
43
|
-
## 关系
|
|
44
|
-
|
|
45
|
-
- ↑ 用于页面模式:[focus-task](../patterns/focus-task.md) · [settings-page](../patterns/settings-page.md)
|
|
46
|
-
- ↑ 用于应用:[todo](../apps/todo.md) · [auth](../apps/auth.md) · [admin](../apps/admin.md) · [agent-platform](../apps/agent-platform.md)
|
|
47
|
-
- → 后端能力:[sql](../backend/sql.md)
|
|
48
|
-
|
|
49
|
-
## 文件位置
|
|
50
|
-
|
|
51
|
-
| 文件 | 路径 |
|
|
52
|
-
|------|------|
|
|
53
|
-
| 源码 | `src/client/components/Form/Form.ts` |
|
|
54
|
-
| 样式 | `src/client/components/Form/Form.css` |
|
|
55
|
-
| 测试 | `src/client/components/Form/Form.test.ts` |
|
|
56
|
-
| demo | `apps/showcase/src/demos/DemoForm.tsx`(P1 拆分) |
|
|
57
|
-
|
|
58
|
-
## 验证
|
|
59
|
-
|
|
60
|
-
> agent-browser 走查:打开 `/components/form/form` ——(P1 填充具体步骤)
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# Grid · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
24 栅格 + gutter + flex 容器模式(Row/Col/Flex 等价)
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 基础元素(按钮/图标/文本/卡片/标签)——任意页面的构成单元
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `gutter` | `number` | 否 | |
|
|
16
|
-
| `flex` | `boolean` | 否 | |
|
|
17
|
-
| `gap` | `number` | 否 | |
|
|
18
|
-
| `direction` | `'row' \| 'column'` | 否 | |
|
|
19
|
-
| `align` | `'start' \| 'center' \| 'end' \| 'stretch'` | 否 | |
|
|
20
|
-
| `children` | `any` | 否 | |
|
|
21
|
-
|
|
22
|
-
## 用法示例
|
|
23
|
-
|
|
24
|
-
```tsx
|
|
25
|
-
<Grid gutter={16}>
|
|
26
|
-
<Col span={8}>A</Col><Col span={8}>B</Col><Col span={8}>C</Col>
|
|
27
|
-
</Grid>
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## 纪律/坑
|
|
31
|
-
|
|
32
|
-
> 浏览器纪律(§5.5):组件能力经 ctx.browser / ctx.ui.useXXX——禁裸 window/document
|
|
33
|
-
|
|
34
|
-
## 关系
|
|
35
|
-
|
|
36
|
-
- ↑ 用于页面模式:(暂无)
|
|
37
|
-
- ↑ 用于应用:(暂无)
|
|
38
|
-
- → 后端能力:(暂无)
|
|
39
|
-
|
|
40
|
-
## 文件位置
|
|
41
|
-
|
|
42
|
-
| 文件 | 路径 |
|
|
43
|
-
|------|------|
|
|
44
|
-
| 源码 | `src/client/components/Grid/Grid.ts` |
|
|
45
|
-
| 样式 | `src/client/components/Grid/Grid.css` |
|
|
46
|
-
| 测试 | `src/client/components/Grid/Grid.test.ts` |
|
|
47
|
-
| demo | `apps/showcase/src/demos/DemoGrid.tsx`(P1 拆分) |
|
|
48
|
-
|
|
49
|
-
## 验证
|
|
50
|
-
|
|
51
|
-
> agent-browser 走查:打开 `/components/core/grid` ——(P1 填充具体步骤)
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# Highlight 多词 · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
query 数组多词高亮(变体覆盖)
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 数据展示——列表页、详情页、信息呈现
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
> props 提取降级(接口格式特殊)——见源码:`—`
|
|
14
|
-
|
|
15
|
-
## 用法示例
|
|
16
|
-
|
|
17
|
-
```tsx
|
|
18
|
-
<Highlight text="React 与 Vue" query={['react','vue']} />
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## 纪律/坑
|
|
22
|
-
|
|
23
|
-
> 三层一致(§6.3):条件渲染 false 是空洞占位——数组项 key 由业务声明
|
|
24
|
-
|
|
25
|
-
## 关系
|
|
26
|
-
|
|
27
|
-
- ↑ 用于页面模式:(暂无)
|
|
28
|
-
- ↑ 用于应用:(暂无)
|
|
29
|
-
- → 后端能力:(暂无)
|
|
30
|
-
|
|
31
|
-
## 文件位置
|
|
32
|
-
|
|
33
|
-
| 文件 | 路径 |
|
|
34
|
-
|------|------|
|
|
35
|
-
| demo | `apps/showcase/src/demos/DemoHighlightMulti.tsx`(P1 拆分) |
|
|
36
|
-
|
|
37
|
-
## 验证
|
|
38
|
-
|
|
39
|
-
> agent-browser 走查:打开 `/components/display/highlight-v2` ——(P1 填充具体步骤)
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# Highlight · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
搜索词高亮:分词渲染 mark,大小写不敏感
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 数据展示——列表页、详情页、信息呈现
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `text` | `string` | 是 | |
|
|
16
|
-
| `query` | `string \| string[]` | 否 | |
|
|
17
|
-
| `className` | `string` | 否 | |
|
|
18
|
-
|
|
19
|
-
## 用法示例
|
|
20
|
-
|
|
21
|
-
```tsx
|
|
22
|
-
<Highlight text="搜索 张三 的订单" query={['张三']} />
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## 纪律/坑
|
|
26
|
-
|
|
27
|
-
> 三层一致(§6.3):条件渲染 false 是空洞占位——数组项 key 由业务声明
|
|
28
|
-
|
|
29
|
-
## 关系
|
|
30
|
-
|
|
31
|
-
- ↑ 用于页面模式:(暂无)
|
|
32
|
-
- ↑ 用于应用:(暂无)
|
|
33
|
-
- → 后端能力:(暂无)
|
|
34
|
-
|
|
35
|
-
## 文件位置
|
|
36
|
-
|
|
37
|
-
| 文件 | 路径 |
|
|
38
|
-
|------|------|
|
|
39
|
-
| 源码 | `src/client/components/Highlight/Highlight.ts` |
|
|
40
|
-
| 样式 | `src/client/components/Highlight/Highlight.css` |
|
|
41
|
-
| 测试 | `src/client/components/Highlight/Highlight.test.ts` |
|
|
42
|
-
| demo | `apps/showcase/src/demos/DemoHighlight.tsx`(P1 拆分) |
|
|
43
|
-
|
|
44
|
-
## 验证
|
|
45
|
-
|
|
46
|
-
> agent-browser 走查:打开 `/components/display/highlight` ——(P1 填充具体步骤)
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# HoverCard · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
悬停富内容卡:openDelay 延迟 + 任意 VNode(shadcn)
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 浮层交互——弹窗、下拉、气泡、抽屉、命令面板
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `content` | `any` | 是 | 富内容(任意 VNode,区别于 Tooltip 的 string) |
|
|
16
|
-
| `position` | `HoverCardPosition` | 否 | |
|
|
17
|
-
| `children` | `any` | 是 | |
|
|
18
|
-
| `disabled` | `boolean` | 否 | |
|
|
19
|
-
| `openDelay` | `number` | 否 | 悬停打开延迟(ms),默认 150 |
|
|
20
|
-
| `closeDelay` | `number` | 否 | 移出关闭延迟(ms),默认 0 |
|
|
21
|
-
|
|
22
|
-
## 用法示例
|
|
23
|
-
|
|
24
|
-
```tsx
|
|
25
|
-
<HoverCard content={<UserCard />}>
|
|
26
|
-
<Button>悬停</Button>
|
|
27
|
-
</HoverCard>
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## 纪律/坑
|
|
31
|
-
|
|
32
|
-
- portal 槽豁免:浮层插槽打开/关闭不触发 A 级动态数组检测(框架管理切换槽)
|
|
33
|
-
|
|
34
|
-
## 关系
|
|
35
|
-
|
|
36
|
-
- ↑ 用于页面模式:(暂无)
|
|
37
|
-
- ↑ 用于应用:(暂无)
|
|
38
|
-
- → 后端能力:(暂无)
|
|
39
|
-
|
|
40
|
-
## 文件位置
|
|
41
|
-
|
|
42
|
-
| 文件 | 路径 |
|
|
43
|
-
|------|------|
|
|
44
|
-
| 源码 | `src/client/components/HoverCard/HoverCard.ts` |
|
|
45
|
-
| 样式 | `src/client/components/HoverCard/HoverCard.css` |
|
|
46
|
-
| 测试 | `src/client/components/HoverCard/HoverCard.test.ts` |
|
|
47
|
-
| demo | `apps/showcase/src/demos/DemoHoverCard.tsx`(P1 拆分) |
|
|
48
|
-
|
|
49
|
-
## 验证
|
|
50
|
-
|
|
51
|
-
> agent-browser 走查:打开 `/components/overlay/hovercard` ——(P1 填充具体步骤)
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
# Icon · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
stroke SVG 图标集,currentColor 着色,随字号缩放
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 页面模式:app-shell、workspace、focus-task、docs、dashboard、data-screen、landing、mobile、list-page(复制即用蓝本——examples/patterns/)
|
|
10
|
-
- 基础元素(按钮/图标/文本/卡片/标签)——任意页面的构成单元
|
|
11
|
-
|
|
12
|
-
## API
|
|
13
|
-
|
|
14
|
-
| prop | 类型 | 必填 | 说明 |
|
|
15
|
-
|------|------|------|------|
|
|
16
|
-
| `name` | `IconName` | 是 | |
|
|
17
|
-
| `size` | `number \| string` | 否 | 尺寸,默认 1em(随字号缩放) |
|
|
18
|
-
| `className` | `string` | 否 | |
|
|
19
|
-
|
|
20
|
-
## 用法示例
|
|
21
|
-
|
|
22
|
-
```tsx
|
|
23
|
-
<Icon name="check" size={16} />
|
|
24
|
-
<Icon name="search" />
|
|
25
|
-
<Icon name="settings" size={20} />
|
|
26
|
-
{/* stroke SVG · currentColor · 1em 随字号 */}
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## 纪律/坑
|
|
30
|
-
|
|
31
|
-
> 浏览器纪律(§5.5):组件能力经 ctx.browser / ctx.ui.useXXX——禁裸 window/document
|
|
32
|
-
|
|
33
|
-
## 关系
|
|
34
|
-
|
|
35
|
-
- ↑ 用于页面模式:[app-shell](../patterns/app-shell.md) · [workspace](../patterns/workspace.md) · [focus-task](../patterns/focus-task.md) · [docs](../patterns/docs.md) · [dashboard](../patterns/dashboard.md) · [data-screen](../patterns/data-screen.md) · [landing](../patterns/landing.md) · [mobile](../patterns/mobile.md) · [list-page](../patterns/list-page.md)
|
|
36
|
-
- ↑ 用于应用:(暂无)
|
|
37
|
-
- → 后端能力:(暂无)
|
|
38
|
-
|
|
39
|
-
## 文件位置
|
|
40
|
-
|
|
41
|
-
| 文件 | 路径 |
|
|
42
|
-
|------|------|
|
|
43
|
-
| 源码 | `src/client/components/Icon/Icon.ts` |
|
|
44
|
-
| 样式 | `src/client/components/Icon/Icon.css` |
|
|
45
|
-
| 测试 | `src/client/components/Icon/Icon.test.ts` |
|
|
46
|
-
| demo | `apps/showcase/src/demos/DemoIcon.tsx`(P1 拆分) |
|
|
47
|
-
|
|
48
|
-
## 验证
|
|
49
|
-
|
|
50
|
-
> agent-browser 走查:打开 `/components/core/icon` ——(P1 填充具体步骤)
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# ImageCropper · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
图片裁剪——canvas 原生 API + 拖拽裁剪框 + 比例控制(零依赖)
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- office 文档/代码/内容编辑——xlsx/pptx/代码/公式/裁剪
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `src` | `string` | 是 | |
|
|
16
|
-
| `aspect` | `number` | 否 | 裁剪比例(宽/高——默认 1) |
|
|
17
|
-
| `onCrop` | `(dataUrl: string) => void` | 否 | |
|
|
18
|
-
| `onError` | `(err: Error) => void` | 否 | |
|
|
19
|
-
| `className` | `string` | 否 | |
|
|
20
|
-
|
|
21
|
-
## 用法示例
|
|
22
|
-
|
|
23
|
-
> (P1 迁移 CODE 字符串)
|
|
24
|
-
|
|
25
|
-
## 纪律/坑
|
|
26
|
-
|
|
27
|
-
> 内容编辑:textarea value 走 property(attribute 只是 defaultValue);受控输入纪律
|
|
28
|
-
|
|
29
|
-
## 关系
|
|
30
|
-
|
|
31
|
-
- ↑ 用于页面模式:(暂无)
|
|
32
|
-
- ↑ 用于应用:(暂无)
|
|
33
|
-
- → 后端能力:(暂无)
|
|
34
|
-
|
|
35
|
-
## 文件位置
|
|
36
|
-
|
|
37
|
-
| 文件 | 路径 |
|
|
38
|
-
|------|------|
|
|
39
|
-
| 源码 | `src/client/components/ImageCropper/ImageCropper.ts` |
|
|
40
|
-
| 样式 | `src/client/components/ImageCropper/ImageCropper.css` |
|
|
41
|
-
| 测试 | `src/client/components/ImageCropper/ImageCropper.test.ts` |
|
|
42
|
-
|
|
43
|
-
## 验证
|
|
44
|
-
|
|
45
|
-
> agent-browser 走查:打开 `/components/editor/imagecropper` ——(P1 填充具体步骤)
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# Img · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
图片 \<img\> 组件:fallback / lazy / preview 点击放大
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 数据展示——列表页、详情页、信息呈现
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
| prop | 类型 | 必填 | 说明 |
|
|
14
|
-
|------|------|------|------|
|
|
15
|
-
| `src` | `string` | 否 | |
|
|
16
|
-
| `alt` | `string` | 否 | |
|
|
17
|
-
| `fallback` | `string` | 否 | |
|
|
18
|
-
| `loading` | `'lazy' \| 'eager'` | 否 | |
|
|
19
|
-
| `width` | `number \| string` | 否 | |
|
|
20
|
-
| `height` | `number \| string` | 否 | |
|
|
21
|
-
| `className` | `string` | 否 | |
|
|
22
|
-
| `style` | `Record<string, string>` | 否 | |
|
|
23
|
-
| `preview` | `boolean` | 否 | 点击放大预览(对应 antd/EP Image preview) |
|
|
24
|
-
| `previewScale` | `number` | 否 | 预览缩放倍率,默认 1 |
|
|
25
|
-
|
|
26
|
-
## 用法示例
|
|
27
|
-
|
|
28
|
-
```tsx
|
|
29
|
-
<Img src="/photo.jpg" alt="照片" />
|
|
30
|
-
<Img src="/photo.jpg" fallback="/placeholder.png" />
|
|
31
|
-
<Img src="..." loading="lazy" width={200} />
|
|
32
|
-
<Img src="..." preview /> {/* 点击放大:Escape/遮罩关闭 */}
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## 纪律/坑
|
|
36
|
-
|
|
37
|
-
> 三层一致(§6.3):条件渲染 false 是空洞占位——数组项 key 由业务声明
|
|
38
|
-
|
|
39
|
-
## 关系
|
|
40
|
-
|
|
41
|
-
- ↑ 用于页面模式:(暂无)
|
|
42
|
-
- ↑ 用于应用:(暂无)
|
|
43
|
-
- → 后端能力:(暂无)
|
|
44
|
-
|
|
45
|
-
## 文件位置
|
|
46
|
-
|
|
47
|
-
| 文件 | 路径 |
|
|
48
|
-
|------|------|
|
|
49
|
-
| 源码 | `src/client/components/Img/Img.ts` |
|
|
50
|
-
| 样式 | `src/client/components/Img/Img.css` |
|
|
51
|
-
| 测试 | `src/client/components/Img/Img.test.ts` |
|
|
52
|
-
| demo | `apps/showcase/src/demos/DemoImage.tsx`(P1 拆分) |
|
|
53
|
-
|
|
54
|
-
## 验证
|
|
55
|
-
|
|
56
|
-
> agent-browser 走查:打开 `/components/display/img` ——(P1 填充具体步骤)
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
# InfiniteScroll 失败重试 · components
|
|
2
|
-
|
|
3
|
-
## 概述
|
|
4
|
-
|
|
5
|
-
加载失败提示 + 滚动重试(状态矩阵覆盖)
|
|
6
|
-
|
|
7
|
-
## 典型场景
|
|
8
|
-
|
|
9
|
-
- 大数据列表/表格/树——千级+数据量的性能场景
|
|
10
|
-
|
|
11
|
-
## API
|
|
12
|
-
|
|
13
|
-
> props 提取降级(接口格式特殊)——见源码:`—`
|
|
14
|
-
|
|
15
|
-
## 用法示例
|
|
16
|
-
|
|
17
|
-
```tsx
|
|
18
|
-
<InfiniteScroll hasMore loading onLoadMore={加载}
|
|
19
|
-
endText="已全部加载">...</InfiniteScroll>
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## 纪律/坑
|
|
23
|
-
|
|
24
|
-
> 大数据渲染:固定行高 + 窗口化(VirtualList)——动态高度裁剪登记
|
|
25
|
-
|
|
26
|
-
## 关系
|
|
27
|
-
|
|
28
|
-
- ↑ 用于页面模式:(暂无)
|
|
29
|
-
- ↑ 用于应用:(暂无)
|
|
30
|
-
- → 后端能力:(暂无)
|
|
31
|
-
|
|
32
|
-
## 文件位置
|
|
33
|
-
|
|
34
|
-
| 文件 | 路径 |
|
|
35
|
-
|------|------|
|
|
36
|
-
| demo | `apps/showcase/src/demos/DemoInfiniteScrollRetry.tsx`(P1 拆分) |
|
|
37
|
-
|
|
38
|
-
## 验证
|
|
39
|
-
|
|
40
|
-
> agent-browser 走查:打开 `/components/virtual/infinitescroll-v2` ——(P1 填充具体步骤)
|