mirror of
https://github.com/lc-soft/LCUI.git
synced 2026-11-30 16:48:21 +01:00
- add the breadcrumb family: root, list, item, link, page, separator, ellipsis - build from a path with a per-call label provider, append_item/append, or explicit data-path items - collapse overflowing items while keeping as many trailing nodes as fit; the ellipsis opens a Portal-based dropdown - emit change with the clicked node key; pages, disabled items, and custom append content never emit - add theme rules, integration tests, a preview scene, and zh-CN docs with C/XML/TSX demos
35 lines
1.2 KiB
TypeScript
35 lines
1.2 KiB
TypeScript
import { widgetFields, FieldData } from "./widget";
|
|
|
|
export const breadcrumbFields: FieldData[] = [
|
|
...widgetFields,
|
|
{
|
|
name: "path",
|
|
type: "string",
|
|
default: "-",
|
|
description: {
|
|
en: "Builds the items from a slash-separated path. Labels fall back to the path segments; use explicit items or the C API for custom labels.",
|
|
"zh-CN":
|
|
"按斜杠分隔的路径自动构建节点,标签回退为路径段;需要自定义标签时使用显式 item 或 C API。",
|
|
},
|
|
},
|
|
{
|
|
name: "separator",
|
|
type: "string",
|
|
default: '"chevron-right"',
|
|
description: {
|
|
en: "Fluent icon name used by the automatically generated separators.",
|
|
"zh-CN": "自动生成的分隔符使用的 Fluent 图标名。",
|
|
},
|
|
},
|
|
{
|
|
name: "collapse-from",
|
|
type: "number",
|
|
default: "1",
|
|
description: {
|
|
en: "Zero-based index where overflow collapsing starts. Trailing items are kept whenever they fit, and the last item is always visible.",
|
|
"zh-CN":
|
|
"溢出折叠的起始下标(从 0 开始);折叠时优先保留尾部节点,只有放不下才继续向左折叠。最后一项始终可见。",
|
|
},
|
|
},
|
|
];
|