yumoqing 6fe0cb4930 fix: Text widgets use 'text' not 'label', Button widgets use 'label' not 'text'
Per bricks-framework spec:
- Text/Title: use 'text' for non-i18n, 'otext'+'i18n:true' for i18n
- Button: use 'label' for button text
2026-05-05 19:28:22 +08:00

120 lines
4.0 KiB
XML

{
"id": "customer_management",
"widgettype": "VBox",
"options": {
"width": "100%",
"height": "100%",
"style": {
"padding": "16px"
}
},
"subwidgets": [
{
"widgettype": "HBox",
"options": {
"style": {
"marginBottom": "16px",
"gap": "8px"
}
},
"subwidgets": [
{
"widgettype": "Text",
"options": {
"style": {
"fontSize": "20px",
"fontWeight": "bold"
},
"text": "客户管理"
}
},
{
"widgettype": "Filler",
"options": {}
},
{
"widgettype": "Button",
"id": "btn_add_customer",
"options": {
"label": "新增客户",
"variant": "primary"
}
}
]
},
{
"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}}')"
}
]
}
}
}
]
}