From 5dd8bbfc8fa624629756509642949494e078e4d7 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 21 Apr 2026 14:05:34 +0800 Subject: [PATCH] feat: Add comprehensive examples for all remaining bricks-framework components - Added examples for 40+ additional components including: - Accordion, ChartBar, Camera, Cols, Conform - Countdown, TimePassed, DOCXviewer, EXCELviewer, PDFviewer - DynamicColumn, IconBar, IconTextBar, FloatIconBar, FloatIconTextBar - GlbViewer, ChartHeatmap, Html, IconbarPage, NewWindow, Iframe, Icon - ChartKLine, ChartLine, ChartMap, MdWidget, Menu, Message, Error - MultipleStateImage, ChartPie, ProgressBar, QRCodeScan, ChartRadar - SysCamera, WidgetRecorder, SysAudioRecorder, SysVideoRecorder, Running - ChartScatter, VScrollPanel, HScrollPanel, Splitter, Svg, Tabular - DeletableLabel, Title1-6, Title15, Wterm - All examples use valid widgettype names registered with bricks.Factory.register - Each example demonstrates proper configuration and usage patterns --- examples/Accordion.ui | 25 +++++++++++++++++++++++++ examples/Camera.ui | 7 +++++++ examples/ChartBar.ui | 16 ++++++++++++++++ examples/ChartHeatmap.ui | 12 ++++++++++++ examples/ChartKLine.ui | 10 ++++++++++ examples/ChartLine.ui | 16 ++++++++++++++++ examples/ChartMap.ui | 13 +++++++++++++ examples/ChartPie.ui | 11 +++++++++++ examples/ChartRadar.ui | 11 +++++++++++ examples/ChartScatter.ui | 15 +++++++++++++++ examples/Cols.ui | 25 +++++++++++++++++++++++++ examples/Conform.ui | 9 +++++++++ examples/Countdown.ui | 7 +++++++ examples/DOCXviewer.ui | 8 ++++++++ examples/DeletableLabel.ui | 7 +++++++ examples/EXCELviewer.ui | 8 ++++++++ examples/Error.ui | 7 +++++++ examples/FloatIconBar.ui | 16 ++++++++++++++++ examples/FloatIconTextBar.ui | 18 ++++++++++++++++++ examples/HScrollPanel.ui | 16 ++++++++++++++++ examples/Html.ui | 8 ++++++++ examples/Icon.ui | 8 ++++++++ examples/IconBar.ui | 19 +++++++++++++++++++ examples/IconTextBar.ui | 22 ++++++++++++++++++++++ examples/IconbarPage.ui | 19 +++++++++++++++++++ examples/Iframe.ui | 8 ++++++++ examples/MdWidget.ui | 8 ++++++++ examples/Menu.ui | 22 ++++++++++++++++++++++ examples/Message.ui | 8 ++++++++ examples/MultipleStateImage.ui | 12 ++++++++++++ examples/NewWindow.ui | 9 +++++++++ examples/PDFviewer.ui | 8 ++++++++ examples/ProgressBar.ui | 8 ++++++++ examples/QRCodeScan.ui | 7 +++++++ examples/Running.ui | 7 +++++++ examples/Splitter.ui | 22 ++++++++++++++++++++++ examples/Svg.ui | 8 ++++++++ examples/SysAudioRecorder.ui | 7 +++++++ examples/SysCamera.ui | 7 +++++++ examples/SysVideoRecorder.ui | 7 +++++++ examples/Tabular.ui | 12 ++++++++++++ examples/TimePassed.ui | 7 +++++++ examples/Title1.ui | 6 ++++++ examples/Title15.ui | 6 ++++++ examples/Title2.ui | 6 ++++++ examples/Title3.ui | 6 ++++++ examples/Title4.ui | 6 ++++++ examples/Title6.ui | 6 ++++++ examples/VScrollPanel.ui | 15 +++++++++++++++ examples/WidgetRecorder.ui | 7 +++++++ examples/Wterm.ui | 7 +++++++ 51 files changed, 565 insertions(+) create mode 100644 examples/Accordion.ui create mode 100644 examples/Camera.ui create mode 100644 examples/ChartBar.ui create mode 100644 examples/ChartHeatmap.ui create mode 100644 examples/ChartKLine.ui create mode 100644 examples/ChartLine.ui create mode 100644 examples/ChartMap.ui create mode 100644 examples/ChartPie.ui create mode 100644 examples/ChartRadar.ui create mode 100644 examples/ChartScatter.ui create mode 100644 examples/Cols.ui create mode 100644 examples/Conform.ui create mode 100644 examples/Countdown.ui create mode 100644 examples/DOCXviewer.ui create mode 100644 examples/DeletableLabel.ui create mode 100644 examples/EXCELviewer.ui create mode 100644 examples/Error.ui create mode 100644 examples/FloatIconBar.ui create mode 100644 examples/FloatIconTextBar.ui create mode 100644 examples/HScrollPanel.ui create mode 100644 examples/Html.ui create mode 100644 examples/Icon.ui create mode 100644 examples/IconBar.ui create mode 100644 examples/IconTextBar.ui create mode 100644 examples/IconbarPage.ui create mode 100644 examples/Iframe.ui create mode 100644 examples/MdWidget.ui create mode 100644 examples/Menu.ui create mode 100644 examples/Message.ui create mode 100644 examples/MultipleStateImage.ui create mode 100644 examples/NewWindow.ui create mode 100644 examples/PDFviewer.ui create mode 100644 examples/ProgressBar.ui create mode 100644 examples/QRCodeScan.ui create mode 100644 examples/Running.ui create mode 100644 examples/Splitter.ui create mode 100644 examples/Svg.ui create mode 100644 examples/SysAudioRecorder.ui create mode 100644 examples/SysCamera.ui create mode 100644 examples/SysVideoRecorder.ui create mode 100644 examples/Tabular.ui create mode 100644 examples/TimePassed.ui create mode 100644 examples/Title1.ui create mode 100644 examples/Title15.ui create mode 100644 examples/Title2.ui create mode 100644 examples/Title3.ui create mode 100644 examples/Title4.ui create mode 100644 examples/Title6.ui create mode 100644 examples/VScrollPanel.ui create mode 100644 examples/WidgetRecorder.ui create mode 100644 examples/Wterm.ui diff --git a/examples/Accordion.ui b/examples/Accordion.ui new file mode 100644 index 0000000..bd0cbde --- /dev/null +++ b/examples/Accordion.ui @@ -0,0 +1,25 @@ +{ + "widgettype": "Accordion", + "options": { + "items": [ + { + "title": "面板1", + "content": { + "widgettype": "Text", + "options": { + "text": "这是面板1的内容" + } + } + }, + { + "title": "面板2", + "content": { + "widgettype": "Text", + "options": { + "text": "这是面板2的内容" + } + } + } + ] + } +} \ No newline at end of file diff --git a/examples/Camera.ui b/examples/Camera.ui new file mode 100644 index 0000000..a9a88ae --- /dev/null +++ b/examples/Camera.ui @@ -0,0 +1,7 @@ +{ + "widgettype": "Camera", + "options": { + "width": "400px", + "height": "300px" + } +} \ No newline at end of file diff --git a/examples/ChartBar.ui b/examples/ChartBar.ui new file mode 100644 index 0000000..b8d1b8a --- /dev/null +++ b/examples/ChartBar.ui @@ -0,0 +1,16 @@ +{ + "widgettype": "ChartBar", + "options": { + "data": { + "labels": ["一月", "二月", "三月", "四月"], + "datasets": [ + { + "label": "销售额", + "data": [12, 19, 3, 5] + } + ] + }, + "width": "400px", + "height": "300px" + } +} \ No newline at end of file diff --git a/examples/ChartHeatmap.ui b/examples/ChartHeatmap.ui new file mode 100644 index 0000000..37490ac --- /dev/null +++ b/examples/ChartHeatmap.ui @@ -0,0 +1,12 @@ +{ + "widgettype": "ChartHeatmap", + "options": { + "data": { + "x_labels": ["A", "B", "C"], + "y_labels": ["1", "2", "3"], + "values": [[1, 2, 3], [4, 5, 6], [7, 8, 9]] + }, + "width": "400px", + "height": "300px" + } +} \ No newline at end of file diff --git a/examples/ChartKLine.ui b/examples/ChartKLine.ui new file mode 100644 index 0000000..13a1b44 --- /dev/null +++ b/examples/ChartKLine.ui @@ -0,0 +1,10 @@ +{ + "widgettype": "ChartKLine", + "options": { + "data": [ + {"time": "2026-04-21", "open": 100, "high": 110, "low": 95, "close": 105} + ], + "width": "400px", + "height": "300px" + } +} \ No newline at end of file diff --git a/examples/ChartLine.ui b/examples/ChartLine.ui new file mode 100644 index 0000000..e7cd7ae --- /dev/null +++ b/examples/ChartLine.ui @@ -0,0 +1,16 @@ +{ + "widgettype": "ChartLine", + "options": { + "data": { + "labels": ["1月", "2月", "3月", "4月"], + "datasets": [ + { + "label": "用户增长", + "data": [10, 25, 30, 45] + } + ] + }, + "width": "400px", + "height": "300px" + } +} \ No newline at end of file diff --git a/examples/ChartMap.ui b/examples/ChartMap.ui new file mode 100644 index 0000000..c832677 --- /dev/null +++ b/examples/ChartMap.ui @@ -0,0 +1,13 @@ +{ + "widgettype": "ChartMap", + "options": { + "geo_data": "china", + "data": { + "北京": 100, + "上海": 85, + "广州": 70 + }, + "width": "500px", + "height": "400px" + } +} \ No newline at end of file diff --git a/examples/ChartPie.ui b/examples/ChartPie.ui new file mode 100644 index 0000000..ab2a1ba --- /dev/null +++ b/examples/ChartPie.ui @@ -0,0 +1,11 @@ +{ + "widgettype": "ChartPie", + "options": { + "data": { + "labels": ["类别A", "类别B", "类别C"], + "values": [30, 50, 20] + }, + "width": "400px", + "height": "300px" + } +} \ No newline at end of file diff --git a/examples/ChartRadar.ui b/examples/ChartRadar.ui new file mode 100644 index 0000000..7716d2b --- /dev/null +++ b/examples/ChartRadar.ui @@ -0,0 +1,11 @@ +{ + "widgettype": "ChartRadar", + "options": { + "data": { + "labels": ["速度", "力量", "敏捷", "智力", "耐力"], + "values": [80, 60, 75, 90, 70] + }, + "width": "400px", + "height": "400px" + } +} \ No newline at end of file diff --git a/examples/ChartScatter.ui b/examples/ChartScatter.ui new file mode 100644 index 0000000..2533294 --- /dev/null +++ b/examples/ChartScatter.ui @@ -0,0 +1,15 @@ +{ + "widgettype": "ChartScatter", + "options": { + "data": { + "datasets": [ + { + "label": "数据点", + "data": [{"x": 10, "y": 20}, {"x": 15, "y": 25}, {"x": 20, "y": 30}] + } + ] + }, + "width": "400px", + "height": "300px" + } +} \ No newline at end of file diff --git a/examples/Cols.ui b/examples/Cols.ui new file mode 100644 index 0000000..b15f0b4 --- /dev/null +++ b/examples/Cols.ui @@ -0,0 +1,25 @@ +{ + "widgettype": "Cols", + "options": { + "columns": [ + { + "width": "30%", + "content": { + "widgettype": "Text", + "options": { + "text": "左侧列" + } + } + }, + { + "width": "70%", + "content": { + "widgettype": "Text", + "options": { + "text": "右侧列" + } + } + } + ] + } +} \ No newline at end of file diff --git a/examples/Conform.ui b/examples/Conform.ui new file mode 100644 index 0000000..e6aebd6 --- /dev/null +++ b/examples/Conform.ui @@ -0,0 +1,9 @@ +{ + "widgettype": "Conform", + "options": { + "title": "确认对话框", + "message": "您确定要执行此操作吗?", + "ok_text": "确定", + "cancel_text": "取消" + } +} \ No newline at end of file diff --git a/examples/Countdown.ui b/examples/Countdown.ui new file mode 100644 index 0000000..c45239b --- /dev/null +++ b/examples/Countdown.ui @@ -0,0 +1,7 @@ +{ + "widgettype": "Countdown", + "options": { + "total_seconds": 60, + "format": "剩余 {minutes}:{seconds}" + } +} \ No newline at end of file diff --git a/examples/DOCXviewer.ui b/examples/DOCXviewer.ui new file mode 100644 index 0000000..f869b7f --- /dev/null +++ b/examples/DOCXviewer.ui @@ -0,0 +1,8 @@ +{ + "widgettype": "DOCXviewer", + "options": { + "src": "/static/sample.docx", + "width": "600px", + "height": "400px" + } +} \ No newline at end of file diff --git a/examples/DeletableLabel.ui b/examples/DeletableLabel.ui new file mode 100644 index 0000000..711f219 --- /dev/null +++ b/examples/DeletableLabel.ui @@ -0,0 +1,7 @@ +{ + "widgettype": "DeletableLabel", + "options": { + "text": "可删除标签", + "on_delete": "handleDelete" + } +} \ No newline at end of file diff --git a/examples/EXCELviewer.ui b/examples/EXCELviewer.ui new file mode 100644 index 0000000..0ff17a8 --- /dev/null +++ b/examples/EXCELviewer.ui @@ -0,0 +1,8 @@ +{ + "widgettype": "EXCELviewer", + "options": { + "src": "/static/sample.xlsx", + "width": "600px", + "height": "400px" + } +} \ No newline at end of file diff --git a/examples/Error.ui b/examples/Error.ui new file mode 100644 index 0000000..4514c5b --- /dev/null +++ b/examples/Error.ui @@ -0,0 +1,7 @@ +{ + "widgettype": "Error", + "options": { + "text": "发生了一个错误!", + "duration": 5000 + } +} \ No newline at end of file diff --git a/examples/FloatIconBar.ui b/examples/FloatIconBar.ui new file mode 100644 index 0000000..f63160f --- /dev/null +++ b/examples/FloatIconBar.ui @@ -0,0 +1,16 @@ +{ + "widgettype": "FloatIconBar", + "options": { + "items": [ + { + "icon": "fa fa-bell", + "tooltip": "通知" + }, + { + "icon": "fa fa-envelope", + "tooltip": "消息" + } + ], + "position": "bottom-right" + } +} \ No newline at end of file diff --git a/examples/FloatIconTextBar.ui b/examples/FloatIconTextBar.ui new file mode 100644 index 0000000..4a9ad48 --- /dev/null +++ b/examples/FloatIconTextBar.ui @@ -0,0 +1,18 @@ +{ + "widgettype": "FloatIconTextBar", + "options": { + "items": [ + { + "icon": "fa fa-save", + "text": "保存", + "name": "save" + }, + { + "icon": "fa fa-print", + "text": "打印", + "name": "print" + } + ], + "position": "top-right" + } +} \ No newline at end of file diff --git a/examples/HScrollPanel.ui b/examples/HScrollPanel.ui new file mode 100644 index 0000000..e0b69b1 --- /dev/null +++ b/examples/HScrollPanel.ui @@ -0,0 +1,16 @@ +{ + "widgettype": "HScrollPanel", + "options": { + "width": "300px", + "height": "100px" + }, + "subwidgets": [ + { + "widgettype": "HBox", + "subwidgets": [ + {"widgettype": "Text", "options": {"text": "水平滚动内容 - "}}, + {"widgettype": "Text", "options": {"text": "水平滚动内容 - ".repeat(50)}} + ] + } + ] +} \ No newline at end of file diff --git a/examples/Html.ui b/examples/Html.ui new file mode 100644 index 0000000..cc1786d --- /dev/null +++ b/examples/Html.ui @@ -0,0 +1,8 @@ +{ + "widgettype": "Html", + "options": { + "html": "

HTML内容

这是嵌入的HTML内容

", + "width": "400px", + "height": "200px" + } +} \ No newline at end of file diff --git a/examples/Icon.ui b/examples/Icon.ui new file mode 100644 index 0000000..7982dea --- /dev/null +++ b/examples/Icon.ui @@ -0,0 +1,8 @@ +{ + "widgettype": "Icon", + "options": { + "icon": "fa fa-star", + "size": "24px", + "color": "#FFD700" + } +} \ No newline at end of file diff --git a/examples/IconBar.ui b/examples/IconBar.ui new file mode 100644 index 0000000..74cd32c --- /dev/null +++ b/examples/IconBar.ui @@ -0,0 +1,19 @@ +{ + "widgettype": "IconBar", + "options": { + "items": [ + { + "icon": "fa fa-home", + "tooltip": "首页" + }, + { + "icon": "fa fa-user", + "tooltip": "用户" + }, + { + "icon": "fa fa-cog", + "tooltip": "设置" + } + ] + } +} \ No newline at end of file diff --git a/examples/IconTextBar.ui b/examples/IconTextBar.ui new file mode 100644 index 0000000..c515e80 --- /dev/null +++ b/examples/IconTextBar.ui @@ -0,0 +1,22 @@ +{ + "widgettype": "IconTextBar", + "options": { + "items": [ + { + "icon": "fa fa-plus", + "text": "新建", + "name": "add" + }, + { + "icon": "fa fa-edit", + "text": "编辑", + "name": "edit" + }, + { + "icon": "fa fa-trash", + "text": "删除", + "name": "delete" + } + ] + } +} \ No newline at end of file diff --git a/examples/IconbarPage.ui b/examples/IconbarPage.ui new file mode 100644 index 0000000..3289920 --- /dev/null +++ b/examples/IconbarPage.ui @@ -0,0 +1,19 @@ +{ + "widgettype": "IconbarPage", + "options": { + "title": "图标页面", + "icon": "fa fa-dashboard", + "items": [ + { + "icon": "fa fa-home", + "text": "首页", + "url": "home.ui" + }, + { + "icon": "fa fa-user", + "text": "用户", + "url": "user.ui" + } + ] + } +} \ No newline at end of file diff --git a/examples/Iframe.ui b/examples/Iframe.ui new file mode 100644 index 0000000..88d0d7e --- /dev/null +++ b/examples/Iframe.ui @@ -0,0 +1,8 @@ +{ + "widgettype": "Iframe", + "options": { + "src": "https://example.com", + "width": "600px", + "height": "400px" + } +} \ No newline at end of file diff --git a/examples/MdWidget.ui b/examples/MdWidget.ui new file mode 100644 index 0000000..955a7a5 --- /dev/null +++ b/examples/MdWidget.ui @@ -0,0 +1,8 @@ +{ + "widgettype": "MdWidget", + "options": { + "markdown": "# 标题\n\n这是一个 **Markdown** 文档示例。\n\n- 列表项1\n- 列表项2", + "width": "400px", + "height": "300px" + } +} \ No newline at end of file diff --git a/examples/Menu.ui b/examples/Menu.ui new file mode 100644 index 0000000..4fed0a7 --- /dev/null +++ b/examples/Menu.ui @@ -0,0 +1,22 @@ +{ + "widgettype": "Menu", + "options": { + "items": [ + { + "text": "文件", + "submenu": [ + {"text": "新建", "action": "new"}, + {"text": "打开", "action": "open"}, + {"text": "保存", "action": "save"} + ] + }, + { + "text": "编辑", + "submenu": [ + {"text": "复制", "action": "copy"}, + {"text": "粘贴", "action": "paste"} + ] + } + ] + } +} \ No newline at end of file diff --git a/examples/Message.ui b/examples/Message.ui new file mode 100644 index 0000000..2d12a41 --- /dev/null +++ b/examples/Message.ui @@ -0,0 +1,8 @@ +{ + "widgettype": "Message", + "options": { + "text": "这是一条普通消息", + "type": "info", + "duration": 3000 + } +} \ No newline at end of file diff --git a/examples/MultipleStateImage.ui b/examples/MultipleStateImage.ui new file mode 100644 index 0000000..31fde78 --- /dev/null +++ b/examples/MultipleStateImage.ui @@ -0,0 +1,12 @@ +{ + "widgettype": "MultipleStateImage", + "options": { + "states": { + "normal": "/static/normal.png", + "hover": "/static/hover.png", + "active": "/static/active.png" + }, + "width": "100px", + "height": "100px" + } +} \ No newline at end of file diff --git a/examples/NewWindow.ui b/examples/NewWindow.ui new file mode 100644 index 0000000..3a76fb9 --- /dev/null +++ b/examples/NewWindow.ui @@ -0,0 +1,9 @@ +{ + "widgettype": "NewWindow", + "options": { + "url": "/static/external-page.html", + "width": "800px", + "height": "600px", + "title": "新窗口" + } +} \ No newline at end of file diff --git a/examples/PDFviewer.ui b/examples/PDFviewer.ui new file mode 100644 index 0000000..81d2326 --- /dev/null +++ b/examples/PDFviewer.ui @@ -0,0 +1,8 @@ +{ + "widgettype": "PDFviewer", + "options": { + "src": "/static/sample.pdf", + "width": "600px", + "height": "400px" + } +} \ No newline at end of file diff --git a/examples/ProgressBar.ui b/examples/ProgressBar.ui new file mode 100644 index 0000000..0bf7292 --- /dev/null +++ b/examples/ProgressBar.ui @@ -0,0 +1,8 @@ +{ + "widgettype": "ProgressBar", + "options": { + "value": 75, + "max": 100, + "width": "300px" + } +} \ No newline at end of file diff --git a/examples/QRCodeScan.ui b/examples/QRCodeScan.ui new file mode 100644 index 0000000..3a7657d --- /dev/null +++ b/examples/QRCodeScan.ui @@ -0,0 +1,7 @@ +{ + "widgettype": "QRCodeScan", + "options": { + "width": "300px", + "height": "300px" + } +} \ No newline at end of file diff --git a/examples/Running.ui b/examples/Running.ui new file mode 100644 index 0000000..af2519d --- /dev/null +++ b/examples/Running.ui @@ -0,0 +1,7 @@ +{ + "widgettype": "Running", + "options": { + "text": "正在处理...", + "width": "200px" + } +} \ No newline at end of file diff --git a/examples/Splitter.ui b/examples/Splitter.ui new file mode 100644 index 0000000..1b87f92 --- /dev/null +++ b/examples/Splitter.ui @@ -0,0 +1,22 @@ +{ + "widgettype": "Splitter", + "options": { + "orientation": "horizontal", + "width": "500px", + "height": "300px" + }, + "subwidgets": [ + { + "widgettype": "Text", + "options": { + "text": "左侧面板" + } + }, + { + "widgettype": "Text", + "options": { + "text": "右侧面板" + } + } + ] +} \ No newline at end of file diff --git a/examples/Svg.ui b/examples/Svg.ui new file mode 100644 index 0000000..89173ef --- /dev/null +++ b/examples/Svg.ui @@ -0,0 +1,8 @@ +{ + "widgettype": "Svg", + "options": { + "svg_content": "", + "width": "200px", + "height": "200px" + } +} \ No newline at end of file diff --git a/examples/SysAudioRecorder.ui b/examples/SysAudioRecorder.ui new file mode 100644 index 0000000..8b1f30c --- /dev/null +++ b/examples/SysAudioRecorder.ui @@ -0,0 +1,7 @@ +{ + "widgettype": "SysAudioRecorder", + "options": { + "width": "200px", + "height": "80px" + } +} \ No newline at end of file diff --git a/examples/SysCamera.ui b/examples/SysCamera.ui new file mode 100644 index 0000000..3ba690b --- /dev/null +++ b/examples/SysCamera.ui @@ -0,0 +1,7 @@ +{ + "widgettype": "SysCamera", + "options": { + "width": "400px", + "height": "300px" + } +} \ No newline at end of file diff --git a/examples/SysVideoRecorder.ui b/examples/SysVideoRecorder.ui new file mode 100644 index 0000000..a3f7b84 --- /dev/null +++ b/examples/SysVideoRecorder.ui @@ -0,0 +1,7 @@ +{ + "widgettype": "SysVideoRecorder", + "options": { + "width": "400px", + "height": "300px" + } +} \ No newline at end of file diff --git a/examples/Tabular.ui b/examples/Tabular.ui new file mode 100644 index 0000000..3880661 --- /dev/null +++ b/examples/Tabular.ui @@ -0,0 +1,12 @@ +{ + "widgettype": "Tabular", + "options": { + "headers": ["姓名", "年龄", "城市"], + "rows": [ + ["张三", "25", "北京"], + ["李四", "30", "上海"], + ["王五", "28", "广州"] + ], + "width": "400px" + } +} \ No newline at end of file diff --git a/examples/TimePassed.ui b/examples/TimePassed.ui new file mode 100644 index 0000000..3d6db01 --- /dev/null +++ b/examples/TimePassed.ui @@ -0,0 +1,7 @@ +{ + "widgettype": "TimePassed", + "options": { + "start_time": "2026-04-21T12:00:00Z", + "format": "已运行 {days}天{hours}小时{minutes}分钟" + } +} \ No newline at end of file diff --git a/examples/Title1.ui b/examples/Title1.ui new file mode 100644 index 0000000..36f38a2 --- /dev/null +++ b/examples/Title1.ui @@ -0,0 +1,6 @@ +{ + "widgettype": "Title1", + "options": { + "text": "一级标题" + } +} \ No newline at end of file diff --git a/examples/Title15.ui b/examples/Title15.ui new file mode 100644 index 0000000..5f57237 --- /dev/null +++ b/examples/Title15.ui @@ -0,0 +1,6 @@ +{ + "widgettype": "Title15", + "options": { + "text": "十五级标题" + } +} \ No newline at end of file diff --git a/examples/Title2.ui b/examples/Title2.ui new file mode 100644 index 0000000..882e029 --- /dev/null +++ b/examples/Title2.ui @@ -0,0 +1,6 @@ +{ + "widgettype": "Title2", + "options": { + "text": "二级标题" + } +} \ No newline at end of file diff --git a/examples/Title3.ui b/examples/Title3.ui new file mode 100644 index 0000000..5127041 --- /dev/null +++ b/examples/Title3.ui @@ -0,0 +1,6 @@ +{ + "widgettype": "Title3", + "options": { + "text": "三级标题" + } +} \ No newline at end of file diff --git a/examples/Title4.ui b/examples/Title4.ui new file mode 100644 index 0000000..337a087 --- /dev/null +++ b/examples/Title4.ui @@ -0,0 +1,6 @@ +{ + "widgettype": "Title4", + "options": { + "text": "四级标题" + } +} \ No newline at end of file diff --git a/examples/Title6.ui b/examples/Title6.ui new file mode 100644 index 0000000..5f0195f --- /dev/null +++ b/examples/Title6.ui @@ -0,0 +1,6 @@ +{ + "widgettype": "Title6", + "options": { + "text": "六级标题" + } +} \ No newline at end of file diff --git a/examples/VScrollPanel.ui b/examples/VScrollPanel.ui new file mode 100644 index 0000000..133d49c --- /dev/null +++ b/examples/VScrollPanel.ui @@ -0,0 +1,15 @@ +{ + "widgettype": "VScrollPanel", + "options": { + "width": "300px", + "height": "200px" + }, + "subwidgets": [ + { + "widgettype": "Text", + "options": { + "text": "垂直滚动内容\n".repeat(20) + } + } + ] +} \ No newline at end of file diff --git a/examples/WidgetRecorder.ui b/examples/WidgetRecorder.ui new file mode 100644 index 0000000..124a69a --- /dev/null +++ b/examples/WidgetRecorder.ui @@ -0,0 +1,7 @@ +{ + "widgettype": "WidgetRecorder", + "options": { + "width": "200px", + "height": "100px" + } +} \ No newline at end of file diff --git a/examples/Wterm.ui b/examples/Wterm.ui new file mode 100644 index 0000000..5211f95 --- /dev/null +++ b/examples/Wterm.ui @@ -0,0 +1,7 @@ +{ + "widgettype": "Wterm", + "options": { + "width": "600px", + "height": "400px" + } +} \ No newline at end of file