fix: wrap Tabular in VBox with cheight for proper scrolling
This commit is contained in:
parent
314b4763ae
commit
8f1b4d98ae
225
wwwroot/base.ui
225
wwwroot/base.ui
@ -1,114 +1,123 @@
|
||||
{
|
||||
"id": "customer_management",
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"height": "100%",
|
||||
"padding": "16px"
|
||||
},
|
||||
"subwidgets": [
|
||||
"id": "customer_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_customer",
|
||||
"options": {
|
||||
"label": "新增客户",
|
||||
"variant": "primary"
|
||||
}
|
||||
}
|
||||
]
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"text": "客户管理",
|
||||
"fontSize": "20px",
|
||||
"fontWeight": "bold"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Tabular",
|
||||
"id": "customer_grid",
|
||||
"options": {
|
||||
"data_url": "{{entire_url('api/customers_list.dspy')}}",
|
||||
"data_method": "GET",
|
||||
"row_options": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "customer_code",
|
||||
"title": "客户编码",
|
||||
"uitype": "str",
|
||||
"cwidth": 12
|
||||
},
|
||||
{
|
||||
"name": "customer_name",
|
||||
"title": "客户名称",
|
||||
"uitype": "str",
|
||||
"cwidth": 15
|
||||
},
|
||||
{
|
||||
"name": "customer_type",
|
||||
"title": "类型",
|
||||
"uitype": "str",
|
||||
"cwidth": 10
|
||||
},
|
||||
{
|
||||
"name": "industry",
|
||||
"title": "行业",
|
||||
"uitype": "str",
|
||||
"cwidth": 10
|
||||
},
|
||||
{
|
||||
"name": "contact_person",
|
||||
"title": "联系人",
|
||||
"uitype": "str",
|
||||
"cwidth": 10
|
||||
},
|
||||
{
|
||||
"name": "phone",
|
||||
"title": "电话",
|
||||
"uitype": "str",
|
||||
"cwidth": 12
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"title": "状态",
|
||||
"uitype": "str",
|
||||
"cwidth": 8
|
||||
}
|
||||
],
|
||||
"toolbar": [
|
||||
{
|
||||
"type": "button",
|
||||
"text": "新增",
|
||||
"icon": "add",
|
||||
"action": "navigate('customer_edit.ui')"
|
||||
},
|
||||
{
|
||||
"type": "button",
|
||||
"text": "编辑",
|
||||
"icon": "edit",
|
||||
"action": "navigate('customer_edit.ui?id={{selectedRow.id}}')"
|
||||
},
|
||||
{
|
||||
"type": "button",
|
||||
"text": "删除",
|
||||
"icon": "delete",
|
||||
"action": "doDelete('{{selectedRow.id}}')"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
"widgettype": "Filler",
|
||||
"options": {}
|
||||
},
|
||||
{
|
||||
"widgettype": "Button",
|
||||
"id": "btn_add_customer",
|
||||
"options": {
|
||||
"label": "新增客户",
|
||||
"variant": "primary"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"cheight": 38,
|
||||
"width": "100%"
|
||||
},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Tabular",
|
||||
"id": "customer_grid",
|
||||
"options": {
|
||||
"data_url": "{{entire_url('api/customers_list.dspy')}}",
|
||||
"data_method": "GET",
|
||||
"row_options": {
|
||||
"fields": [
|
||||
{
|
||||
"name": "customer_code",
|
||||
"title": "客户编码",
|
||||
"uitype": "str",
|
||||
"cwidth": 12
|
||||
},
|
||||
{
|
||||
"name": "customer_name",
|
||||
"title": "客户名称",
|
||||
"uitype": "str",
|
||||
"cwidth": 15
|
||||
},
|
||||
{
|
||||
"name": "customer_type",
|
||||
"title": "类型",
|
||||
"uitype": "str",
|
||||
"cwidth": 10
|
||||
},
|
||||
{
|
||||
"name": "industry",
|
||||
"title": "行业",
|
||||
"uitype": "str",
|
||||
"cwidth": 10
|
||||
},
|
||||
{
|
||||
"name": "contact_person",
|
||||
"title": "联系人",
|
||||
"uitype": "str",
|
||||
"cwidth": 10
|
||||
},
|
||||
{
|
||||
"name": "phone",
|
||||
"title": "电话",
|
||||
"uitype": "str",
|
||||
"cwidth": 12
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"title": "状态",
|
||||
"uitype": "str",
|
||||
"cwidth": 8
|
||||
}
|
||||
],
|
||||
"toolbar": [
|
||||
{
|
||||
"type": "button",
|
||||
"text": "新增",
|
||||
"icon": "add",
|
||||
"action": "navigate('customer_edit.ui')"
|
||||
},
|
||||
{
|
||||
"type": "button",
|
||||
"text": "编辑",
|
||||
"icon": "edit",
|
||||
"action": "navigate('customer_edit.ui?id={{selectedRow.id}}')"
|
||||
},
|
||||
{
|
||||
"type": "button",
|
||||
"text": "删除",
|
||||
"icon": "delete",
|
||||
"action": "doDelete('{{selectedRow.id}}')"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user