From 2ccecd5c167b12f54d1320a8c709ad08dba18dcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B7=E7=94=B5=E8=8A=BD=E8=A1=A3?= Date: Mon, 5 Oct 2026 13:20:59 -0400 Subject: [PATCH] Docs: snippets match compiled Examples --- docs/components/062-pagination.md | 2 +- docs/components/067-toolbar.md | 2 +- docs/components/068-command-palette.md | 2 +- docs/components/095-skeleton.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/components/062-pagination.md b/docs/components/062-pagination.md index 1b4e370..3900d93 100644 --- a/docs/components/062-pagination.md +++ b/docs/components/062-pagination.md @@ -8,7 +8,7 @@ ```go if mujica.Pagination(c, &page, &size, mujica.PaginationOptions{Total: 420, PageSizes: []int{10, 20, 50}, Jump: true}).Changed() { - load(page, size) + fmt.Println("load page", page, "of size", size) } ``` diff --git a/docs/components/067-toolbar.md b/docs/components/067-toolbar.md index 7d05381..45aeda3 100644 --- a/docs/components/067-toolbar.md +++ b/docs/components/067-toolbar.md @@ -14,7 +14,7 @@ mujica.Toolbar(c, mujica.ToolbarOptions{Label: "Format"}, func() { }) mujica.ToolbarSeparator(c) if mujica.ToolbarButton(c, "Copy", mujica.ToolbarButtonOptions{Icon: icons.Must("copy"), ShowLabel: true}).Clicked() { - copySelection() + fmt.Println("copy") } }) ``` diff --git a/docs/components/068-command-palette.md b/docs/components/068-command-palette.md index c232838..4051dfd 100644 --- a/docs/components/068-command-palette.md +++ b/docs/components/068-command-palette.md @@ -12,7 +12,7 @@ res := mujica.CommandPalette(c, &open, []mujica.Command{ {ID: "theme", Label: "Toggle dark mode", Group: "View", Keywords: []string{"night"}}, }, mujica.CommandPaletteOptions{}) if id, ok := res.Chosen(); ok { - run(id) + fmt.Println("run", id) } ``` diff --git a/docs/components/095-skeleton.md b/docs/components/095-skeleton.md index 188319f..418cf1f 100644 --- a/docs/components/095-skeleton.md +++ b/docs/components/095-skeleton.md @@ -7,7 +7,7 @@ ## 最小示例 ```go -ui.Row(c).Gap(12).Children(func() { +ui.Row(c).Padding(16).Gap(12).Children(func() { mujica.Skeleton(c, mujica.SkeletonOptions{Shape: mujica.SkeletonCircle}) ui.Column(c).Grow(1).Children(func() { mujica.Skeleton(c, mujica.SkeletonOptions{Lines: 2})