fix: PopupWindow+Form with submit bind (bricks spec)
This commit is contained in:
parent
fa2120c731
commit
d09a3c886e
@ -13,7 +13,7 @@
|
|||||||
"subwidgets": [
|
"subwidgets": [
|
||||||
{"widgettype": "Text", "options": {"text": "知识库", "cfontsize": 22, "fontWeight": "bold", "color": "#333"}},
|
{"widgettype": "Text", "options": {"text": "知识库", "cfontsize": 22, "fontWeight": "bold", "color": "#333"}},
|
||||||
{"widgettype": "Button", "options": {"label": "+ 新建知识库", "bgcolor": "#4a90d9", "color": "#fff"}, "binds": [
|
{"widgettype": "Button", "options": {"label": "+ 新建知识库", "bgcolor": "#4a90d9", "color": "#fff"}, "binds": [
|
||||||
{"wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.rag_main_content", "mode": "replace",
|
{"wid": "self", "event": "click", "actiontype": "PopupWindow",
|
||||||
"options": {"url": "{{entire_url('/knowledge_bases_list/new_kb_form.ui')}}"}}
|
"options": {"url": "{{entire_url('/knowledge_bases_list/new_kb_form.ui')}}"}}
|
||||||
]}
|
]}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -1,21 +1,35 @@
|
|||||||
{
|
{
|
||||||
"widgettype": "VBox",
|
"id": "new_kb_window",
|
||||||
"options": {"spacing": "16px", "padding": "16px"},
|
"widgettype": "PopupWindow",
|
||||||
|
"options": {
|
||||||
|
"auto_open": true,
|
||||||
|
"anthor": "cc",
|
||||||
|
"cwidth": 18,
|
||||||
|
"cheight": 10,
|
||||||
|
"title": "新建知识库"
|
||||||
|
},
|
||||||
"subwidgets": [
|
"subwidgets": [
|
||||||
{"widgettype": "Text", "options": {"text": "新建知识库", "cfontsize": 20, "fontWeight": "bold"}},
|
|
||||||
{
|
{
|
||||||
"widgettype": "Form",
|
"widgettype": "Form",
|
||||||
|
"id": "kb_form",
|
||||||
"options": {
|
"options": {
|
||||||
|
"cols": 1,
|
||||||
"fields": [
|
"fields": [
|
||||||
{"name": "name", "title": "名称", "type": "str", "uitype": "str", "required": true},
|
{"name": "name", "label": "名称", "uitype": "str", "required": true},
|
||||||
{"name": "description", "title": "描述", "type": "text", "uitype": "text"}
|
{"name": "description", "label": "描述", "uitype": "text"}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
{"widgettype": "Button", "options": {"label": "创建", "bgcolor": "#4a90d9", "color": "#fff"}},
|
],
|
||||||
{"widgettype": "Button", "options": {"label": "取消", "bgcolor": "#e0e0e0", "color": "#666"}, "binds": [
|
"binds": [
|
||||||
{"wid": "self", "event": "click", "actiontype": "urlwidget", "target": "app.rag_main_content", "mode": "replace",
|
{
|
||||||
"options": {"url": "{{entire_url('/knowledge_bases_list/index.ui')}}"}}
|
"wid": "kb_form",
|
||||||
]}
|
"event": "submit",
|
||||||
|
"actiontype": "urlwidget",
|
||||||
|
"target": "self",
|
||||||
|
"options": {
|
||||||
|
"url": "{{entire_url('./create_kb.dspy')}}"
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user