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.0 KiB
TypeScript
35 lines
1.0 KiB
TypeScript
import { widgetFields, FieldData } from "./widget";
|
|
|
|
export const breadcrumbItemFields: FieldData[] = [
|
|
...widgetFields,
|
|
{
|
|
name: "data-path",
|
|
type: "string",
|
|
default: "-",
|
|
description: {
|
|
en: "Node key for an explicit item. Items without a key cannot emit change and appear disabled in the collapsed menu.",
|
|
"zh-CN":
|
|
"显式 item 的节点 key。没有 key 的 item 不会发出 change,在折叠下拉中显示为禁用。",
|
|
},
|
|
},
|
|
{
|
|
name: "data-key",
|
|
type: "string",
|
|
default: "-",
|
|
description: {
|
|
en: "Node key for custom content appended with append().",
|
|
"zh-CN": "通过 append() 追加的自定义内容使用的节点 key。",
|
|
},
|
|
},
|
|
{
|
|
name: "data-label",
|
|
type: "string",
|
|
default: "-",
|
|
description: {
|
|
en: "Label shown in the collapsed menu. When omitted, the item text is used, then the node key.",
|
|
"zh-CN":
|
|
"折叠下拉中显示的文字;未设置时依次回退到 item 文本、节点 key。",
|
|
},
|
|
},
|
|
];
|