From 874bee20cb7d8e1515b599f64b8cabf997d174a7 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 29 May 2026 22:09:52 +0800 Subject: [PATCH] fix: wrap Tabular in VBox with cheight for proper scrolling --- wwwroot/base.ui | 225 +++++++++++++++++++++++++----------------------- 1 file changed, 117 insertions(+), 108 deletions(-) diff --git a/wwwroot/base.ui b/wwwroot/base.ui index 6214948..7448121 100644 --- a/wwwroot/base.ui +++ b/wwwroot/base.ui @@ -1,114 +1,123 @@ { - "id": "opportunity_management", - "widgettype": "VBox", - "options": { - "width": "100%", - "height": "100%", - "padding": "16px" - }, - "subwidgets": [ + "id": "opportunity_management", + "widgettype": "VBox", + "options": { + "width": "100%", + "height": "100%", + "padding": "16px" + }, + "subwidgets": [ + { + "widgettype": "HBox", + "options": { + "marginBottom": "16px", + "gap": "8px" + }, + "subwidgets": [ { - "widgettype": "HBox", - "options": { - "marginBottom": "16px", - "gap": "8px" - }, - "subwidgets": [ - { - "widgettype": "Text", - "options": { - "text": "商机管理", - "fontSize": "20px", - "fontWeight": "bold" - } - }, - { - "widgettype": "Filler", - "options": {} - }, - { - "widgettype": "Button", - "id": "btn_add_opportunity", - "options": { - "label": "新增商机", - "variant": "primary" - } - } - ] + "widgettype": "Text", + "options": { + "text": "商机管理", + "fontSize": "20px", + "fontWeight": "bold" + } }, { - "widgettype": "Tabular", - "id": "opportunity_grid", - "options": { - "data_url": "{{entire_url('api/opportunities_list.dspy')}}", - "data_method": "GET", - "row_options": { - "fields": [ - { - "name": "opportunity_code", - "title": "商机编码", - "uitype": "str", - "cwidth": 12 - }, - { - "name": "opportunity_name", - "title": "商机名称", - "uitype": "str", - "cwidth": 15 - }, - { - "name": "customer_name", - "title": "客户", - "uitype": "str", - "cwidth": 12 - }, - { - "name": "stage", - "title": "阶段", - "uitype": "str", - "cwidth": 10 - }, - { - "name": "amount", - "title": "金额", - "uitype": "str", - "cwidth": 12 - }, - { - "name": "probability", - "title": "概率", - "uitype": "str", - "cwidth": 8 - }, - { - "name": "expected_close_date", - "title": "预计关闭日期", - "uitype": "str", - "cwidth": 12 - } - ], - "toolbar": [ - { - "type": "button", - "text": "新增", - "icon": "add", - "action": "navigate('opportunity_edit.ui')" - }, - { - "type": "button", - "text": "编辑", - "icon": "edit", - "action": "navigate('opportunity_edit.ui?id={{selectedRow.id}}')" - }, - { - "type": "button", - "text": "删除", - "icon": "delete", - "action": "doDelete('{{selectedRow.id}}')" - } - ] - } - } + "widgettype": "Filler", + "options": {} + }, + { + "widgettype": "Button", + "id": "btn_add_opportunity", + "options": { + "label": "新增商机", + "variant": "primary" + } } - ] + ] + }, + { + "widgettype": "VBox", + "options": { + "cheight": 38, + "width": "100%" + }, + "subwidgets": [ + { + "widgettype": "Tabular", + "id": "opportunity_grid", + "options": { + "data_url": "{{entire_url('api/opportunities_list.dspy')}}", + "data_method": "GET", + "row_options": { + "fields": [ + { + "name": "opportunity_code", + "title": "商机编码", + "uitype": "str", + "cwidth": 12 + }, + { + "name": "opportunity_name", + "title": "商机名称", + "uitype": "str", + "cwidth": 15 + }, + { + "name": "customer_name", + "title": "客户", + "uitype": "str", + "cwidth": 12 + }, + { + "name": "stage", + "title": "阶段", + "uitype": "str", + "cwidth": 10 + }, + { + "name": "amount", + "title": "金额", + "uitype": "str", + "cwidth": 12 + }, + { + "name": "probability", + "title": "概率", + "uitype": "str", + "cwidth": 8 + }, + { + "name": "expected_close_date", + "title": "预计关闭日期", + "uitype": "str", + "cwidth": 12 + } + ], + "toolbar": [ + { + "type": "button", + "text": "新增", + "icon": "add", + "action": "navigate('opportunity_edit.ui')" + }, + { + "type": "button", + "text": "编辑", + "icon": "edit", + "action": "navigate('opportunity_edit.ui?id={{selectedRow.id}}')" + }, + { + "type": "button", + "text": "删除", + "icon": "delete", + "action": "doDelete('{{selectedRow.id}}')" + } + ] + } + } + } + ] + } + ] } \ No newline at end of file