From 499d91bb3f4d7014884c4e038fe977ca6878f04c Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 9 Jul 2026 13:33:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20add=20editable=20config=20to=20Tabular?= =?UTF-8?q?=20=E2=80=94=20toolbar=20add/edit/delete=20URLs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/index.ui | 96 +++++++----------------------------------------- 1 file changed, 13 insertions(+), 83 deletions(-) diff --git a/wwwroot/index.ui b/wwwroot/index.ui index fde9183..3256801 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -1,40 +1,23 @@ { "widgettype": "VBox", - "options": { - "width": "100%", - "height": "100%", - "padding": "16px", - "gap": "12px" - }, + "options": {"width": "100%", "height": "100%", "padding": "16px", "gap": "12px"}, "subwidgets": [ - { - "widgettype": "Text", - "options": { - "text": "租户域名管理", - "fontSize": "22px", - "fontWeight": "700", - "color": "#F1F5F9" - } - }, - { - "widgettype": "Text", - "options": { - "text": "管理各分销商的独立域名,客户通过域名注册后自动归属到对应分销商", - "fontSize": "13px", - "color": "#94A3B8" - } - }, + {"widgettype": "Text", "options": {"text": "租户域名管理", "fontSize": "22px", "fontWeight": "700", "color": "#F1F5F9"}}, + {"widgettype": "Text", "options": {"text": "管理各分销商的独立域名,客户通过域名注册后自动归属到对应分销商", "fontSize": "13px", "color": "#94A3B8"}}, { "widgettype": "Tabular", "id": "domain_table", "options": { - "width": "100%", - "height": "100%", - "css": "card", + "width": "100%", "height": "100%", "css": "card", "title": "域名列表", "data_url": "{{entire_url('/tenant/api/tenant_domain_get.dspy')}}", "data_method": "GET", "page_rows": 20, + "editable": { + "new_data_url": "{{entire_url('/tenant/api/tenant_domain_create.dspy')}}", + "delete_data_url": "{{entire_url('/tenant/api/tenant_domain_delete.dspy')}}", + "update_data_url": "{{entire_url('/tenant/api/tenant_domain_update.dspy')}}" + }, "toolbar": { "tools": [ {"name": "add", "label": "新增域名"}, @@ -46,25 +29,10 @@ "browserfields": { "exclouded": ["id"], "alters": { - "status": { - "uitype": "code", - "data": [ - {"value": "active", "text": "启用"}, - {"value": "inactive", "text": "停用"} - ] - }, - "resellerid": { - "uitype": "code", - "valueField": "resellerid", - "textField": "resellerid_text" - } + "status": {"uitype": "code", "data": [{"value": "active", "text": "启用"}, {"value": "inactive", "text": "停用"}]}, + "resellerid": {"uitype": "code", "valueField": "resellerid", "textField": "resellerid_text"} }, - "cwidths": { - "domain": 20, - "resellerid": 15, - "status": 6, - "created_at": 12 - } + "cwidths": {"domain": 20, "resellerid": 15, "status": 6, "created_at": 12} }, "fields": [ {"name": "domain", "type": "str", "length": 200, "cwidth": 20, "uitype": "str", "label": "域名"}, @@ -73,45 +41,7 @@ {"name": "created_at", "type": "timestamp", "cwidth": 12, "uitype": "timestamp", "label": "创建时间"} ] } - }, - "binds": [ - { - "wid": "self", - "event": "add", - "actiontype": "urlwidget", - "target": "PopupWindow", - "popup_options": { - "title": "新增域名", - "dismiss_events": ["cancel", "submited"] - }, - "options": { - "url": "{{entire_url('/tenant/api/tenant_domain_get.dspy')}}" - } - }, - { - "wid": "self", - "event": "edit", - "actiontype": "urlwidget", - "target": "PopupWindow", - "popup_options": { - "title": "编辑域名", - "dismiss_events": ["cancel", "submited"] - }, - "options": { - "url": "{{entire_url('/tenant/api/tenant_domain_get.dspy')}}" - } - }, - { - "wid": "self", - "event": "delete", - "actiontype": "method", - "target": "self", - "method": "delete_rows", - "options": { - "url": "{{entire_url('/tenant/api/tenant_domain_get.dspy')}}" - } - } - ] + } } ] }