@manohub/ui 1.0.8 → 1.0.10
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 +1 -1
- package/dist/components/button/index.d.ts +8 -8
- package/dist/components/card/index.d.ts +19 -18
- package/dist/components/card/index.js +4 -4
- package/dist/components/form/index.js +3 -3
- package/dist/components/input/index.d.ts +10 -0
- package/dist/components/input/index.js +16 -2
- package/dist/components/layout/index.js +1 -1
- package/dist/components/list-view/index.d.ts +2 -2
- package/dist/components/list-view/index.js +2 -2
- package/dist/components/notice/index.d.ts +1 -1
- package/dist/components/notification/index.d.ts +1 -1
- package/dist/components/pagination/index.d.ts +15 -1
- package/dist/components/pagination/index.js +23 -2
- package/dist/components/select/index.d.ts +24 -0
- package/dist/components/select/index.js +10 -0
- package/dist/components/select/select-shared.d.ts +6 -0
- package/dist/components/select/select-shared.js +1 -0
- package/dist/components/select/select-tree.d.ts +11 -0
- package/dist/components/select/select-tree.js +7 -0
- package/dist/components/select/select-trigger.d.ts +14 -1
- package/dist/components/select/select-trigger.js +51 -37
- package/dist/components/switch/index.d.ts +28 -3
- package/dist/components/switch/index.js +15 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/toast/index.d.ts +4 -4
- package/dist/styles/components/badge.css +46 -48
- package/dist/styles/components/badge.tokens.css +7 -0
- package/dist/styles/components/button.css +37 -11
- package/dist/styles/components/button.tokens.css +3 -0
- package/dist/styles/components/card.css +19 -22
- package/dist/styles/components/card.tokens.css +23 -0
- package/dist/styles/components/dialog.css +18 -13
- package/dist/styles/components/dialog.tokens.css +5 -1
- package/dist/styles/components/form.css +11 -18
- package/dist/styles/components/form.tokens.css +6 -1
- package/dist/styles/components/input.css +77 -23
- package/dist/styles/components/input.tokens.css +4 -0
- package/dist/styles/components/layout.css +23 -26
- package/dist/styles/components/layout.tokens.css +19 -0
- package/dist/styles/components/list-view.css +23 -26
- package/dist/styles/components/list-view.tokens.css +23 -0
- package/dist/styles/components/pagination.css +6 -4
- package/dist/styles/components/switch.css +7 -0
- package/dist/styles/components/text.css +13 -10
- package/dist/styles/components/text.tokens.css +16 -0
- package/dist/styles/index.css +4 -0
- package/dist/utils/vnode-children.d.ts +10 -0
- package/dist/utils/vnode-children.js +26 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -139,7 +139,7 @@ try { await save() } finally { loading.close() } // 句柄与 toast() 同形状
|
|
|
139
139
|
| 位置 | 内容 | 锚 |
|
|
140
140
|
|---|---|---|
|
|
141
141
|
| `styles/components/<件>.tokens.css` | **基础值**(唯一的、两套主题同值的那一条) | `[data-manohub-ui]` |
|
|
142
|
-
| `styles/components/<件>.css` | **档位改写**(`.mh-<件>--<档>`
|
|
142
|
+
| `styles/components/<件>.css` | **档位改写**(`.mh-<件>--<档>` 覆盖同一枚 `--ui-<件>-*`)+ 少数几枚 `--mh-*` 运行时状态 | 元件根类 / 档位类 |
|
|
143
143
|
|
|
144
144
|
后一半必须在面里:它们靠「同一元素上两个选择器改写同一个令牌」生效,搬走就断链。
|
|
145
145
|
|
|
@@ -198,7 +198,7 @@ export declare const Button: import("vue").DefineComponent<import("vue").Extract
|
|
|
198
198
|
}>> & Readonly<{}>, {
|
|
199
199
|
block: boolean;
|
|
200
200
|
size: ControlSize;
|
|
201
|
-
icon: "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
|
|
201
|
+
icon: "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "pause" | "play" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "chevrons-left" | "chevrons-right" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "play-filled" | "pause-filled" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
|
|
202
202
|
menu: boolean;
|
|
203
203
|
caret: boolean;
|
|
204
204
|
disabled: boolean;
|
|
@@ -209,7 +209,7 @@ export declare const Button: import("vue").DefineComponent<import("vue").Extract
|
|
|
209
209
|
variant: ButtonVariant;
|
|
210
210
|
danger: boolean;
|
|
211
211
|
shape: ButtonShape;
|
|
212
|
-
trailingIcon: "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
|
|
212
|
+
trailingIcon: "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "pause" | "play" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "chevrons-left" | "chevrons-right" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "play-filled" | "pause-filled" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
|
|
213
213
|
href: string;
|
|
214
214
|
target: string;
|
|
215
215
|
popoverTarget: string;
|
|
@@ -305,7 +305,7 @@ export declare const ButtonCompound: {
|
|
|
305
305
|
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
|
|
306
306
|
block: boolean;
|
|
307
307
|
size: ControlSize;
|
|
308
|
-
icon: "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
|
|
308
|
+
icon: "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "pause" | "play" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "chevrons-left" | "chevrons-right" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "play-filled" | "pause-filled" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
|
|
309
309
|
menu: boolean;
|
|
310
310
|
caret: boolean;
|
|
311
311
|
disabled: boolean;
|
|
@@ -316,7 +316,7 @@ export declare const ButtonCompound: {
|
|
|
316
316
|
variant: ButtonVariant;
|
|
317
317
|
danger: boolean;
|
|
318
318
|
shape: ButtonShape;
|
|
319
|
-
trailingIcon: "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
|
|
319
|
+
trailingIcon: "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "pause" | "play" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "chevrons-left" | "chevrons-right" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "play-filled" | "pause-filled" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
|
|
320
320
|
href: string;
|
|
321
321
|
target: string;
|
|
322
322
|
popoverTarget: string;
|
|
@@ -417,7 +417,7 @@ export declare const ButtonCompound: {
|
|
|
417
417
|
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, {
|
|
418
418
|
block: boolean;
|
|
419
419
|
size: ControlSize;
|
|
420
|
-
icon: "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
|
|
420
|
+
icon: "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "pause" | "play" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "chevrons-left" | "chevrons-right" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "play-filled" | "pause-filled" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
|
|
421
421
|
menu: boolean;
|
|
422
422
|
caret: boolean;
|
|
423
423
|
disabled: boolean;
|
|
@@ -428,7 +428,7 @@ export declare const ButtonCompound: {
|
|
|
428
428
|
variant: ButtonVariant;
|
|
429
429
|
danger: boolean;
|
|
430
430
|
shape: ButtonShape;
|
|
431
|
-
trailingIcon: "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
|
|
431
|
+
trailingIcon: "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "pause" | "play" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "chevrons-left" | "chevrons-right" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "play-filled" | "pause-filled" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
|
|
432
432
|
href: string;
|
|
433
433
|
target: string;
|
|
434
434
|
popoverTarget: string;
|
|
@@ -523,7 +523,7 @@ export declare const ButtonCompound: {
|
|
|
523
523
|
}>> & Readonly<{}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
524
524
|
block: boolean;
|
|
525
525
|
size: ControlSize;
|
|
526
|
-
icon: "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
|
|
526
|
+
icon: "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "pause" | "play" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "chevrons-left" | "chevrons-right" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "play-filled" | "pause-filled" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
|
|
527
527
|
menu: boolean;
|
|
528
528
|
caret: boolean;
|
|
529
529
|
disabled: boolean;
|
|
@@ -534,7 +534,7 @@ export declare const ButtonCompound: {
|
|
|
534
534
|
variant: ButtonVariant;
|
|
535
535
|
danger: boolean;
|
|
536
536
|
shape: ButtonShape;
|
|
537
|
-
trailingIcon: "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
|
|
537
|
+
trailingIcon: "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "pause" | "play" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "chevrons-left" | "chevrons-right" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "play-filled" | "pause-filled" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
|
|
538
538
|
href: string;
|
|
539
539
|
target: string;
|
|
540
540
|
popoverTarget: string;
|
|
@@ -14,7 +14,7 @@ export type CardHeaderIcon = string | (() => VNodeChild);
|
|
|
14
14
|
*
|
|
15
15
|
* ## 几何来源(技能市场卡片实测,逐项落 `--ui-*` 令牌)
|
|
16
16
|
*
|
|
17
|
-
* 圆角 8(`--ui-radius-md`)、内距 20(`--
|
|
17
|
+
* 圆角 8(`--ui-radius-md`)、内距 20(`--ui-card-padding`,原型 `p-5`)、底 `--ui-base-100`、弱描边
|
|
18
18
|
* `--ui-base-300`(原型 `border-border`)、悬浮转 `--ui-primary` 描边 + 主色 12% 阴影
|
|
19
19
|
* (`--ui-shadow-card-hover`)。
|
|
20
20
|
*
|
|
@@ -23,21 +23,22 @@ export type CardHeaderIcon = string | (() => VNodeChild);
|
|
|
23
23
|
*
|
|
24
24
|
* ## Header 区域(四件;`Card.Header` 是完整入口,`Card` 上的同名 props 是它的简写)
|
|
25
25
|
*
|
|
26
|
-
* **左侧区域**(`__header-main`)= 图标(`icon`,36×36
|
|
27
|
-
* `
|
|
28
|
-
* 行内按钮 /
|
|
26
|
+
* **左侧区域**(`__header-main`)= 图标(`icon`,36×36 **浅主色底 + 主色字形**的方块;图片按方框铺满、
|
|
27
|
+
* 自己盖住底色)+ 文字块(`title` 16/600 单行省略 / `subtitle` 12 + 弱字色,同样单行省略)+
|
|
28
|
+
* `Card.Header` 默认插槽的自排内容;**右侧** = `extra` 插槽(状态胶囊 / 行内按钮 / 统计);
|
|
29
|
+
* 四个位**一个都没给**时退化为**纯自排容器**(默认插槽内容原样进头容器)。
|
|
29
30
|
* 两处入口完全等价:`<Card title=… subtitle=… icon=…>` ≡ `<Card.Header title=… subtitle=… icon=… />`。
|
|
30
31
|
*
|
|
31
32
|
* ## 内距:**全部由段承载,根件不出内距**
|
|
32
33
|
*
|
|
33
34
|
* 根件只出面(底 / 描边 / 圆角),既不出内距也不出段间距;内距一律吃在**段**上(分件与内建头 / 操作行默认各吃
|
|
34
|
-
* `--
|
|
35
|
+
* `--ui-card-padding`)。
|
|
35
36
|
* **不给 `padding`**(面上的缺省口径):纵向是「**每段只吃上边**」,卡片的**下沿由最后一段补**(面上
|
|
36
37
|
* `:last-child` 那条)—— 所以 header + body、body + footer 相邻时都不会叠成两份(20 + 20),首末两端又各有一份
|
|
37
38
|
* 完整内距。
|
|
38
39
|
* **给了 `padding`**:这一段**整段由消费方定价**(`y` = 上下、`x` = 左右,两维都给时下 `padding: y x` 简写,
|
|
39
40
|
* 只给一维就只落那一维);行内样式盖过 `:last-child`,故**下边也按 `y` 走**(要保留兜底就别传)。要整卡统一就
|
|
40
|
-
* 改令牌 `--
|
|
41
|
+
* 改令牌 `--ui-card-padding`。
|
|
41
42
|
* 直接写内容(`<Card>正文</Card>`)时**裸子节点会被自动包进一层 `Card.Body`**(与 `Panel` 的简写路径同款),故
|
|
42
43
|
* 与显式写 `<Card.Body>` 得到同一份内距。
|
|
43
44
|
*
|
|
@@ -79,7 +80,7 @@ export interface CardProps {
|
|
|
79
80
|
* 优先**);一个位都不给时退化为自排容器(`Card.Header` 也仍然是「自己排头」的逃生口)。
|
|
80
81
|
*/
|
|
81
82
|
export declare const CardHeader: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
82
|
-
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--
|
|
83
|
+
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--ui-card-padding`(20px)、下边由末段补;**给了就整段由消费方定价(含下边)** */
|
|
83
84
|
padding: {
|
|
84
85
|
type: PropType<CardPadding>;
|
|
85
86
|
default: undefined;
|
|
@@ -100,7 +101,7 @@ export declare const CardHeader: import("vue").DefineComponent<import("vue").Ext
|
|
|
100
101
|
default: undefined;
|
|
101
102
|
};
|
|
102
103
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
103
|
-
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--
|
|
104
|
+
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--ui-card-padding`(20px)、下边由末段补;**给了就整段由消费方定价(含下边)** */
|
|
104
105
|
padding: {
|
|
105
106
|
type: PropType<CardPadding>;
|
|
106
107
|
default: undefined;
|
|
@@ -134,13 +135,13 @@ export declare const CardHeader: import("vue").DefineComponent<import("vue").Ext
|
|
|
134
135
|
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
135
136
|
/** 卡片内容区:撑满剩余高度(卡片被拉伸时才有差别),本身不滚动 —— 滚动归属由所在容器决定 */
|
|
136
137
|
export declare const CardBody: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
137
|
-
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--
|
|
138
|
+
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--ui-card-padding`(20px)、下边由末段补;**给了就整段由消费方定价(含下边)** */
|
|
138
139
|
padding: {
|
|
139
140
|
type: PropType<CardPadding>;
|
|
140
141
|
default: undefined;
|
|
141
142
|
};
|
|
142
143
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
143
|
-
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--
|
|
144
|
+
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--ui-card-padding`(20px)、下边由末段补;**给了就整段由消费方定价(含下边)** */
|
|
144
145
|
padding: {
|
|
145
146
|
type: PropType<CardPadding>;
|
|
146
147
|
default: undefined;
|
|
@@ -152,13 +153,13 @@ export declare const CardBody: import("vue").DefineComponent<import("vue").Extra
|
|
|
152
153
|
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
153
154
|
/** 卡片尾部:贴卡片底部(`margin-top: auto`),承载标签 / 统计 / 操作位 */
|
|
154
155
|
export declare const CardFooter: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
155
|
-
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--
|
|
156
|
+
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--ui-card-padding`(20px)、下边由末段补;**给了就整段由消费方定价(含下边)** */
|
|
156
157
|
padding: {
|
|
157
158
|
type: PropType<CardPadding>;
|
|
158
159
|
default: undefined;
|
|
159
160
|
};
|
|
160
161
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
161
|
-
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--
|
|
162
|
+
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--ui-card-padding`(20px)、下边由末段补;**给了就整段由消费方定价(含下边)** */
|
|
162
163
|
padding: {
|
|
163
164
|
type: PropType<CardPadding>;
|
|
164
165
|
default: undefined;
|
|
@@ -333,7 +334,7 @@ export declare const Card: {
|
|
|
333
334
|
actions?: () => VNodeChild;
|
|
334
335
|
}>, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
|
|
335
336
|
Header: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
336
|
-
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--
|
|
337
|
+
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--ui-card-padding`(20px)、下边由末段补;**给了就整段由消费方定价(含下边)** */
|
|
337
338
|
padding: {
|
|
338
339
|
type: PropType<CardPadding>;
|
|
339
340
|
default: undefined;
|
|
@@ -354,7 +355,7 @@ export declare const Card: {
|
|
|
354
355
|
default: undefined;
|
|
355
356
|
};
|
|
356
357
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
357
|
-
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--
|
|
358
|
+
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--ui-card-padding`(20px)、下边由末段补;**给了就整段由消费方定价(含下边)** */
|
|
358
359
|
padding: {
|
|
359
360
|
type: PropType<CardPadding>;
|
|
360
361
|
default: undefined;
|
|
@@ -387,13 +388,13 @@ export declare const Card: {
|
|
|
387
388
|
extra?: () => VNodeChild;
|
|
388
389
|
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
389
390
|
Body: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
390
|
-
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--
|
|
391
|
+
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--ui-card-padding`(20px)、下边由末段补;**给了就整段由消费方定价(含下边)** */
|
|
391
392
|
padding: {
|
|
392
393
|
type: PropType<CardPadding>;
|
|
393
394
|
default: undefined;
|
|
394
395
|
};
|
|
395
396
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
396
|
-
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--
|
|
397
|
+
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--ui-card-padding`(20px)、下边由末段补;**给了就整段由消费方定价(含下边)** */
|
|
397
398
|
padding: {
|
|
398
399
|
type: PropType<CardPadding>;
|
|
399
400
|
default: undefined;
|
|
@@ -404,13 +405,13 @@ export declare const Card: {
|
|
|
404
405
|
default?: () => VNodeChild;
|
|
405
406
|
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
406
407
|
Footer: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
407
|
-
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--
|
|
408
|
+
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--ui-card-padding`(20px)、下边由末段补;**给了就整段由消费方定价(含下边)** */
|
|
408
409
|
padding: {
|
|
409
410
|
type: PropType<CardPadding>;
|
|
410
411
|
default: undefined;
|
|
411
412
|
};
|
|
412
413
|
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
413
|
-
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--
|
|
414
|
+
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--ui-card-padding`(20px)、下边由末段补;**给了就整段由消费方定价(含下边)** */
|
|
414
415
|
padding: {
|
|
415
416
|
type: PropType<CardPadding>;
|
|
416
417
|
default: undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { defineComponent, createVNode, h } from "vue";
|
|
2
|
+
import { flattenChildren } from "../../utils/vnode-children.js";
|
|
2
3
|
const isBlank = (value) => value === void 0 || value === null || value === false || value === "";
|
|
3
4
|
function resolveSlot(slotFn, propValue, transform) {
|
|
4
5
|
if (slotFn) return slotFn();
|
|
@@ -63,7 +64,7 @@ const CardHeader = /* @__PURE__ */ defineComponent({
|
|
|
63
64
|
name: "CardHeader",
|
|
64
65
|
inheritAttrs: false,
|
|
65
66
|
props: {
|
|
66
|
-
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--
|
|
67
|
+
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--ui-card-padding`(20px)、下边由末段补;**给了就整段由消费方定价(含下边)** */
|
|
67
68
|
padding: {
|
|
68
69
|
type: [Number, Object, String],
|
|
69
70
|
default: void 0
|
|
@@ -105,7 +106,7 @@ const CardBody = /* @__PURE__ */ defineComponent({
|
|
|
105
106
|
name: "CardBody",
|
|
106
107
|
inheritAttrs: false,
|
|
107
108
|
props: {
|
|
108
|
-
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--
|
|
109
|
+
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--ui-card-padding`(20px)、下边由末段补;**给了就整段由消费方定价(含下边)** */
|
|
109
110
|
padding: {
|
|
110
111
|
type: [Number, Object, String],
|
|
111
112
|
default: void 0
|
|
@@ -126,7 +127,7 @@ const CardFooter = /* @__PURE__ */ defineComponent({
|
|
|
126
127
|
name: "CardFooter",
|
|
127
128
|
inheritAttrs: false,
|
|
128
129
|
props: {
|
|
129
|
-
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--
|
|
130
|
+
/** 这一段的内距(`number` = 四边同值;`{ y, x }` = 上下 / 左右):不给时吃组件令牌 `--ui-card-padding`(20px)、下边由末段补;**给了就整段由消费方定价(含下边)** */
|
|
130
131
|
padding: {
|
|
131
132
|
type: [Number, Object, String],
|
|
132
133
|
default: void 0
|
|
@@ -144,7 +145,6 @@ const CardFooter = /* @__PURE__ */ defineComponent({
|
|
|
144
145
|
}
|
|
145
146
|
});
|
|
146
147
|
const isCardPart = (child) => !!child && typeof child === "object" && (child.type === CardHeader || child.type === CardBody || child.type === CardFooter);
|
|
147
|
-
const flattenChildren = (raw) => (Array.isArray(raw) ? raw : raw == null ? [] : [raw]).flatMap((child) => Array.isArray(child) ? child : [child]).filter((child) => child !== null && child !== void 0 && child !== false && child !== true && child !== "");
|
|
148
148
|
function withImplicitBody(children) {
|
|
149
149
|
const out = [];
|
|
150
150
|
let loose = [];
|
|
@@ -90,7 +90,7 @@ const FormItem = /* @__PURE__ */ defineComponent({
|
|
|
90
90
|
const labelAlign = props.labelAlign ?? inheritedLabelAlign?.value;
|
|
91
91
|
const controlWidth = props.controlWidth ?? inheritedControlWidth?.value;
|
|
92
92
|
const styles = [attrs.style, labelWidth ? {
|
|
93
|
-
"--
|
|
93
|
+
"--ui-form-label-width": `${labelWidth}px`
|
|
94
94
|
} : null].filter(Boolean);
|
|
95
95
|
const showLabel = !!props.label || props.required || !!props.tip;
|
|
96
96
|
return createVNode("div", {
|
|
@@ -343,11 +343,11 @@ const FormRoot = /* @__PURE__ */ defineComponent({
|
|
|
343
343
|
从前公式里硬编码 8px,`gap={16}` 时列宽会算偏(临界宽度上还会误判回落)。 */
|
|
344
344
|
props.gap !== void 0 ? {
|
|
345
345
|
gap: `${props.gap}px`,
|
|
346
|
-
"--
|
|
346
|
+
"--ui-form-gap": `${props.gap}px`
|
|
347
347
|
} : null,
|
|
348
348
|
/* 一列最小宽度:动态档列数的除数、数字档的回落阈值 */
|
|
349
349
|
props.columnMinWidth !== void 0 ? {
|
|
350
|
-
"--
|
|
350
|
+
"--ui-form-column-min": `${props.columnMinWidth}px`
|
|
351
351
|
} : null
|
|
352
352
|
]
|
|
353
353
|
}, [header, rest]);
|
|
@@ -68,6 +68,8 @@ declare const InputBase: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
68
68
|
* **只读**:值可选中 / 复制,但不能改。与 `bordered={false}` 组合即**只读值档**(摘要 / 详情里回显业务值,也是
|
|
69
69
|
* `Form.Item` 的 `readonly` 行推荐写法):几何与可编辑输入框**完全一致**(同高 / 同内距 / 值文字同左缘),但滑过
|
|
70
70
|
* 不亮浅底、聚焦不给边框与主色环 —— 一眼看去是「值」而不是「输入位」;只读 ≠ 禁用(照旧可聚焦、可复制、不变灰)。
|
|
71
|
+
* **触发器形态(`as="button"`)同样吃这一档**:`<button>` 没有原生 `readonly`,故由 `aria-readonly` +
|
|
72
|
+
* `is-readonly` 表达(见 `input.css`);语义与输入框一致 —— 不禁用、不置灰、不降透明度,只是值不可改。
|
|
71
73
|
*/
|
|
72
74
|
readonly: {
|
|
73
75
|
type: BooleanConstructor;
|
|
@@ -190,6 +192,8 @@ declare const InputBase: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
190
192
|
* **只读**:值可选中 / 复制,但不能改。与 `bordered={false}` 组合即**只读值档**(摘要 / 详情里回显业务值,也是
|
|
191
193
|
* `Form.Item` 的 `readonly` 行推荐写法):几何与可编辑输入框**完全一致**(同高 / 同内距 / 值文字同左缘),但滑过
|
|
192
194
|
* 不亮浅底、聚焦不给边框与主色环 —— 一眼看去是「值」而不是「输入位」;只读 ≠ 禁用(照旧可聚焦、可复制、不变灰)。
|
|
195
|
+
* **触发器形态(`as="button"`)同样吃这一档**:`<button>` 没有原生 `readonly`,故由 `aria-readonly` +
|
|
196
|
+
* `is-readonly` 表达(见 `input.css`);语义与输入框一致 —— 不禁用、不置灰、不降透明度,只是值不可改。
|
|
193
197
|
*/
|
|
194
198
|
readonly: {
|
|
195
199
|
type: BooleanConstructor;
|
|
@@ -530,6 +534,8 @@ export declare const InputCompound: {
|
|
|
530
534
|
* **只读**:值可选中 / 复制,但不能改。与 `bordered={false}` 组合即**只读值档**(摘要 / 详情里回显业务值,也是
|
|
531
535
|
* `Form.Item` 的 `readonly` 行推荐写法):几何与可编辑输入框**完全一致**(同高 / 同内距 / 值文字同左缘),但滑过
|
|
532
536
|
* 不亮浅底、聚焦不给边框与主色环 —— 一眼看去是「值」而不是「输入位」;只读 ≠ 禁用(照旧可聚焦、可复制、不变灰)。
|
|
537
|
+
* **触发器形态(`as="button"`)同样吃这一档**:`<button>` 没有原生 `readonly`,故由 `aria-readonly` +
|
|
538
|
+
* `is-readonly` 表达(见 `input.css`);语义与输入框一致 —— 不禁用、不置灰、不降透明度,只是值不可改。
|
|
533
539
|
*/
|
|
534
540
|
readonly: {
|
|
535
541
|
type: BooleanConstructor;
|
|
@@ -686,6 +692,8 @@ export declare const InputCompound: {
|
|
|
686
692
|
* **只读**:值可选中 / 复制,但不能改。与 `bordered={false}` 组合即**只读值档**(摘要 / 详情里回显业务值,也是
|
|
687
693
|
* `Form.Item` 的 `readonly` 行推荐写法):几何与可编辑输入框**完全一致**(同高 / 同内距 / 值文字同左缘),但滑过
|
|
688
694
|
* 不亮浅底、聚焦不给边框与主色环 —— 一眼看去是「值」而不是「输入位」;只读 ≠ 禁用(照旧可聚焦、可复制、不变灰)。
|
|
695
|
+
* **触发器形态(`as="button"`)同样吃这一档**:`<button>` 没有原生 `readonly`,故由 `aria-readonly` +
|
|
696
|
+
* `is-readonly` 表达(见 `input.css`);语义与输入框一致 —— 不禁用、不置灰、不降透明度,只是值不可改。
|
|
689
697
|
*/
|
|
690
698
|
readonly: {
|
|
691
699
|
type: BooleanConstructor;
|
|
@@ -833,6 +841,8 @@ export declare const InputCompound: {
|
|
|
833
841
|
* **只读**:值可选中 / 复制,但不能改。与 `bordered={false}` 组合即**只读值档**(摘要 / 详情里回显业务值,也是
|
|
834
842
|
* `Form.Item` 的 `readonly` 行推荐写法):几何与可编辑输入框**完全一致**(同高 / 同内距 / 值文字同左缘),但滑过
|
|
835
843
|
* 不亮浅底、聚焦不给边框与主色环 —— 一眼看去是「值」而不是「输入位」;只读 ≠ 禁用(照旧可聚焦、可复制、不变灰)。
|
|
844
|
+
* **触发器形态(`as="button"`)同样吃这一档**:`<button>` 没有原生 `readonly`,故由 `aria-readonly` +
|
|
845
|
+
* `is-readonly` 表达(见 `input.css`);语义与输入框一致 —— 不禁用、不置灰、不降透明度,只是值不可改。
|
|
836
846
|
*/
|
|
837
847
|
readonly: {
|
|
838
848
|
type: BooleanConstructor;
|
|
@@ -42,6 +42,8 @@ const InputBase = /* @__PURE__ */ defineComponent({
|
|
|
42
42
|
* **只读**:值可选中 / 复制,但不能改。与 `bordered={false}` 组合即**只读值档**(摘要 / 详情里回显业务值,也是
|
|
43
43
|
* `Form.Item` 的 `readonly` 行推荐写法):几何与可编辑输入框**完全一致**(同高 / 同内距 / 值文字同左缘),但滑过
|
|
44
44
|
* 不亮浅底、聚焦不给边框与主色环 —— 一眼看去是「值」而不是「输入位」;只读 ≠ 禁用(照旧可聚焦、可复制、不变灰)。
|
|
45
|
+
* **触发器形态(`as="button"`)同样吃这一档**:`<button>` 没有原生 `readonly`,故由 `aria-readonly` +
|
|
46
|
+
* `is-readonly` 表达(见 `input.css`);语义与输入框一致 —— 不禁用、不置灰、不降透明度,只是值不可改。
|
|
45
47
|
*/
|
|
46
48
|
readonly: {
|
|
47
49
|
type: Boolean,
|
|
@@ -178,8 +180,19 @@ const InputBase = /* @__PURE__ */ defineComponent({
|
|
|
178
180
|
};
|
|
179
181
|
const inputType = computed(() => props.type === "password" && revealed.value ? "text" : props.type);
|
|
180
182
|
const isTrigger = computed(() => props.as === "button");
|
|
181
|
-
const controlClasses = computed(() => [
|
|
182
|
-
|
|
183
|
+
const controlClasses = computed(() => [
|
|
184
|
+
"mh-input",
|
|
185
|
+
isTrigger.value ? "mh-input--trigger" : "",
|
|
186
|
+
props.size === "md" ? "" : `mh-input--${props.size}`,
|
|
187
|
+
borderedClassOf(props.bordered),
|
|
188
|
+
visualStatus.value ? `is-${visualStatus.value}` : "",
|
|
189
|
+
props.disabled ? "is-disabled" : "",
|
|
190
|
+
/* 只读档在**触发器形态**上补一个静态类:`<button>` 没有原生 `readonly`(属性选择器用不上),
|
|
191
|
+
而输入框形态有原生 `[readonly]` —— 故只在这一形态补类,免得两处表达同一件事 */
|
|
192
|
+
isTrigger.value && props.readonly ? "is-readonly" : "",
|
|
193
|
+
props.controlClass
|
|
194
|
+
].filter(Boolean).join(" "));
|
|
195
|
+
const showClear = computed(() => props.clearable && !props.readonly && (props.hasValue ?? !!current.value));
|
|
183
196
|
const showCounter = computed(() => !isTrigger.value && props.showCount && props.maxlength !== void 0);
|
|
184
197
|
const showPlaceholder = computed(() => isTrigger.value && props.hasValue === false && !!props.placeholder);
|
|
185
198
|
return () => createVNode("div", {
|
|
@@ -196,6 +209,7 @@ const InputBase = /* @__PURE__ */ defineComponent({
|
|
|
196
209
|
}, forwardAttrs.value, props.controlAttrs, {
|
|
197
210
|
"class": controlClasses.value,
|
|
198
211
|
"disabled": props.disabled,
|
|
212
|
+
"aria-readonly": props.readonly ? "true" : void 0,
|
|
199
213
|
"aria-invalid": isInvalid.value ? "true" : void 0
|
|
200
214
|
}), [showPlaceholder.value ? (
|
|
201
215
|
/* 触发器没有 `::placeholder`,占位文案由本件渲染(色见 `.mh-input__placeholder`) */
|
|
@@ -100,7 +100,7 @@ const LayoutRow = /* @__PURE__ */ defineComponent({
|
|
|
100
100
|
const style = {
|
|
101
101
|
...attrs.style ?? {}
|
|
102
102
|
};
|
|
103
|
-
if (props.minColumnWidth) style["--
|
|
103
|
+
if (props.minColumnWidth) style["--ui-layout-row-min"] = `${props.minColumnWidth}px`;
|
|
104
104
|
return createVNode("div", {
|
|
105
105
|
"class": ["mh-layout-row", modifier("mh-layout-row", "gap", props.gap), modifier("mh-layout-row", "align", props.align), props.justify && props.justify !== "start" ? modifier("mh-layout-row", "justify", props.justify) : "", isGrid ? "mh-layout-row--grid" : "", isGrid ? modifier("mh-layout-row", "columns", props.columns) : "", attrs.class].filter(Boolean).join(" "),
|
|
106
106
|
"style": mergePartStyle(style, props.padding)
|
|
@@ -14,7 +14,7 @@ export interface ListViewStatus {
|
|
|
14
14
|
*
|
|
15
15
|
* ## 列数(响应式口径)
|
|
16
16
|
*
|
|
17
|
-
* 列数由**容器宽度**决定,不跟视口断点:`repeat(auto-fill, minmax(min(--
|
|
17
|
+
* 列数由**容器宽度**决定,不跟视口断点:`repeat(auto-fill, minmax(min(--ui-list-view-min, 100%), 1fr))`
|
|
18
18
|
* —— 栏宽变窄自动减列(窄到放不下时回落单列),栏内再嵌组件也不会因为「视口没变」而排错列数。
|
|
19
19
|
* `minItemWidth` 是唯一的下限入口(缺省 `--ui-grid-column-min`)。
|
|
20
20
|
*
|
|
@@ -34,7 +34,7 @@ export interface ListViewProps {
|
|
|
34
34
|
* 卡片最小宽度(px):容器自适应换列的**唯一**下限(`auto-fill`,窄容器自动减列,
|
|
35
35
|
* 不依赖视口断点)。缺省回落 `--ui-grid-column-min`(260)。
|
|
36
36
|
*
|
|
37
|
-
* 传了它只下发一个自定义属性 `--
|
|
37
|
+
* 传了它只下发一个自定义属性 `--ui-list-view-min`,列公式仍在 CSS 内(与 `Tree` 缩进同一手法)。
|
|
38
38
|
*/
|
|
39
39
|
minItemWidth?: number;
|
|
40
40
|
/** 加载态:渲染**骨架卡**网格(与卡片同尺寸,避免高度跳动) */
|
|
@@ -196,9 +196,9 @@ const ListViewRoot = /* @__PURE__ */ defineComponent({
|
|
|
196
196
|
}, null);
|
|
197
197
|
}
|
|
198
198
|
const style = [attrs.style, props.minItemWidth === void 0 ? void 0 : {
|
|
199
|
-
"--
|
|
199
|
+
"--ui-list-view-min": `${props.minItemWidth}px`
|
|
200
200
|
}, props.columns > 0 ? {
|
|
201
|
-
"--
|
|
201
|
+
"--ui-list-view-columns": String(props.columns)
|
|
202
202
|
} : void 0];
|
|
203
203
|
return createVNode("div", {
|
|
204
204
|
"class": ["mh-list-view", props.columns > 0 ? "mh-list-view--fixed" : "", attrs.class].filter(Boolean).join(" "),
|
|
@@ -116,7 +116,7 @@ export declare const Notice: import("vue").DefineComponent<import("vue").Extract
|
|
|
116
116
|
default: undefined;
|
|
117
117
|
};
|
|
118
118
|
}>> & Readonly<{}>, {
|
|
119
|
-
icon: boolean | "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
|
|
119
|
+
icon: boolean | "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "pause" | "play" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "chevrons-left" | "chevrons-right" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "play-filled" | "pause-filled" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
|
|
120
120
|
onClose: () => void;
|
|
121
121
|
message: string;
|
|
122
122
|
closable: boolean;
|
|
@@ -93,7 +93,7 @@ export declare const Notification: import("vue").DefineComponent<import("vue").E
|
|
|
93
93
|
default: undefined;
|
|
94
94
|
};
|
|
95
95
|
}>> & Readonly<{}>, {
|
|
96
|
-
icon: boolean | "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
|
|
96
|
+
icon: boolean | "search" | "link" | "filter" | "copy" | "help" | "table" | "menu" | "delete" | "image" | "close" | "pause" | "play" | "key" | "application" | "client" | "service" | "schema" | "compose" | "log" | "mcp" | "agent" | "server" | "exposure" | "openapi" | "loading" | "info" | "alert" | "chevron-left" | "chevron-right" | "chevron-down" | "chevron-up" | "chevrons-left" | "chevrons-right" | "check" | "user" | "download" | "back" | "folder" | "folder-open" | "file" | "file-code" | "file-json" | "file-text" | "terminal" | "shield" | "tool" | "plus" | "notification" | "settings" | "logout" | "home" | "workbench" | "apps" | "favorite" | "page-title" | "favorite-filled" | "drag-handle" | "edit" | "refresh" | "upload" | "save" | "more" | "preview" | "external-link" | "minus" | "plus-circle" | "close-circle" | "info-circle" | "check-circle" | "alert-circle" | "play-filled" | "pause-filled" | "list" | "calendar" | "clock" | "lock" | "unlock" | "users" | "archive" | "package" | "plug" | "branch" | "tag" | "ai" | "shield-check" | "shield-alert" | "history";
|
|
97
97
|
title: string;
|
|
98
98
|
onClose: () => void;
|
|
99
99
|
closable: boolean;
|
|
@@ -3,7 +3,7 @@ import type { ControlSize } from '../control-size';
|
|
|
3
3
|
/** 页码窗口里的一项:页码,或省略号 */
|
|
4
4
|
export type PaginationPageItem = number | 'ellipsis';
|
|
5
5
|
/**
|
|
6
|
-
* 分页条(**自绘**;总数文案 + 每页条数 + 页码窗口 +
|
|
6
|
+
* 分页条(**自绘**;总数文案 + 每页条数 + 页码窗口 + 相邻 / 直达箭头 + 跳页)。
|
|
7
7
|
*
|
|
8
8
|
* ## 四个形态的判据
|
|
9
9
|
*
|
|
@@ -12,6 +12,9 @@ export type PaginationPageItem = number | 'ellipsis';
|
|
|
12
12
|
* - `simple` → 只出「1 / 5」(位置窄、不需要跳页时用);
|
|
13
13
|
* - 缺省 → 完整档(可加 `boxed` 出外框、`showQuickJumper` 出跳页框)。
|
|
14
14
|
*
|
|
15
|
+
* 箭头有**两族语义**(缺省都出):`‹` / `›` 是相邻一格,`«` / `»` 直达首 / 末页 ——
|
|
16
|
+
* 页码窗口折了省略号时,「回第一页」不该逼用户连点(`showEdgeJump={false}` 只留相邻档)。
|
|
17
|
+
*
|
|
15
18
|
* ## 页码窗口怎么算
|
|
16
19
|
*
|
|
17
20
|
* 总页数 ≤ 7 全铺;> 7 取**首末 + 当前页±1**、其余折成省略号(规范取向)。这个计算是 JS 该干的事
|
|
@@ -55,6 +58,11 @@ export declare const Pagination: import("vue").DefineComponent<import("vue").Ext
|
|
|
55
58
|
type: BooleanConstructor;
|
|
56
59
|
default: boolean;
|
|
57
60
|
};
|
|
61
|
+
/** 是否显示首 / 末页直达按钮(页码窗口折省略号时,回到第一页不必连点) */
|
|
62
|
+
showEdgeJump: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
};
|
|
58
66
|
/** 只有一页时整件不渲染(列表页常见) */
|
|
59
67
|
hideOnSinglePage: {
|
|
60
68
|
type: BooleanConstructor;
|
|
@@ -117,6 +125,11 @@ export declare const Pagination: import("vue").DefineComponent<import("vue").Ext
|
|
|
117
125
|
type: BooleanConstructor;
|
|
118
126
|
default: boolean;
|
|
119
127
|
};
|
|
128
|
+
/** 是否显示首 / 末页直达按钮(页码窗口折省略号时,回到第一页不必连点) */
|
|
129
|
+
showEdgeJump: {
|
|
130
|
+
type: BooleanConstructor;
|
|
131
|
+
default: boolean;
|
|
132
|
+
};
|
|
120
133
|
/** 只有一页时整件不渲染(列表页常见) */
|
|
121
134
|
hideOnSinglePage: {
|
|
122
135
|
type: BooleanConstructor;
|
|
@@ -157,6 +170,7 @@ export declare const Pagination: import("vue").DefineComponent<import("vue").Ext
|
|
|
157
170
|
pageSizeOptions: number[];
|
|
158
171
|
showSizeChanger: boolean;
|
|
159
172
|
showQuickJumper: boolean;
|
|
173
|
+
showEdgeJump: boolean;
|
|
160
174
|
hideOnSinglePage: boolean;
|
|
161
175
|
simple: boolean;
|
|
162
176
|
boxed: boolean;
|
|
@@ -34,6 +34,11 @@ const Pagination = /* @__PURE__ */ defineComponent({
|
|
|
34
34
|
type: Boolean,
|
|
35
35
|
default: false
|
|
36
36
|
},
|
|
37
|
+
/** 是否显示首 / 末页直达按钮(页码窗口折省略号时,回到第一页不必连点) */
|
|
38
|
+
showEdgeJump: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: true
|
|
41
|
+
},
|
|
37
42
|
/** 只有一页时整件不渲染(列表页常见) */
|
|
38
43
|
hideOnSinglePage: {
|
|
39
44
|
type: Boolean,
|
|
@@ -175,7 +180,15 @@ const Pagination = /* @__PURE__ */ defineComponent({
|
|
|
175
180
|
"onChange": () => commitSize(size)
|
|
176
181
|
}, null), createVNode("span", null, [size, createTextVNode(" 条/页")])]))]), createVNode("span", {
|
|
177
182
|
"class": "mh-pagination__pages"
|
|
178
|
-
}, [createVNode("button", {
|
|
183
|
+
}, [props.showEdgeJump ? createVNode("button", {
|
|
184
|
+
"type": "button",
|
|
185
|
+
"class": "mh-pagination__btn mh-pagination__btn--arrow mh-pagination__btn--first",
|
|
186
|
+
"disabled": props.disabled || current.value <= 1,
|
|
187
|
+
"aria-label": "第一页",
|
|
188
|
+
"onClick": () => commitPage(1)
|
|
189
|
+
}, [createVNode(Icon, {
|
|
190
|
+
"name": "chevrons-left"
|
|
191
|
+
}, null)]) : null, createVNode("button", {
|
|
179
192
|
"type": "button",
|
|
180
193
|
"class": "mh-pagination__btn mh-pagination__btn--arrow mh-pagination__btn--prev",
|
|
181
194
|
"disabled": props.disabled || current.value <= 1,
|
|
@@ -202,7 +215,15 @@ const Pagination = /* @__PURE__ */ defineComponent({
|
|
|
202
215
|
"onClick": () => commitPage(current.value + 1)
|
|
203
216
|
}, [createVNode(Icon, {
|
|
204
217
|
"name": "chevron-right"
|
|
205
|
-
}, null)])
|
|
218
|
+
}, null)]), props.showEdgeJump ? createVNode("button", {
|
|
219
|
+
"type": "button",
|
|
220
|
+
"class": "mh-pagination__btn mh-pagination__btn--arrow mh-pagination__btn--last",
|
|
221
|
+
"disabled": props.disabled || current.value >= pageCount.value,
|
|
222
|
+
"aria-label": "最后一页",
|
|
223
|
+
"onClick": () => commitPage(pageCount.value)
|
|
224
|
+
}, [createVNode(Icon, {
|
|
225
|
+
"name": "chevrons-right"
|
|
226
|
+
}, null)]) : null]), props.showQuickJumper ? createVNode("span", {
|
|
206
227
|
"class": "mh-pagination__jump"
|
|
207
228
|
}, [createTextVNode("跳至"), createVNode("input", {
|
|
208
229
|
"class": "mh-pagination__jump-input",
|