This commit is contained in:
yumoqing 2024-04-12 14:05:13 +08:00
parent 127882d669
commit 16c8ed4c70
3 changed files with 26 additions and 22 deletions

View File

@ -94,7 +94,8 @@ bricks.TabPanel = class extends bricks.Layout {
this.cur_tab_name = name;
return;
}
w = await bricks.widgetBuild(items[i].content);
try {
w = await bricks.widgetBuild(items[i].content, this, {});
if (! w){
bricks.debug('TabPanel():create content error', items[i].content);
return;
@ -105,6 +106,10 @@ bricks.TabPanel = class extends bricks.Layout {
this.cur_tab_name = tdesc.name;
return;
}
catch (e) {
console.log('except ', e)
}
}
}
bricks.debug('TabPanel(): click event handled but noting to do', tdesc)
}

View File

@ -64,20 +64,19 @@
"uitype":"email",
"name":"email",
"label":"Email",
'required':true
"required":true
},
{
"uitype":"tel",
"name":"tel",
"pattern":"{\d}3-{\d}4-{\d}4",
"label":"Tel",
'required':true
"required":true
},
{
"uitype":"file",
"name":"file",
"label":"File",
'required':true
"required":true
},
{
"uitype":"str",
@ -86,7 +85,7 @@
"value":"tlegre",
"name":"name",
"label":"Name",
'required':true
"required":true
},
{
"uitype":"int",
@ -95,7 +94,7 @@
"value":12432,
"name":"integer",
"label":"Integer",
'required':true
"required":true
},
{
"uitype":"float",
@ -108,7 +107,7 @@
"uitype":"date",
"name":"date",
"label":"Date",
'required':true
"required":true
},
{
"uitype":"password",
@ -116,7 +115,7 @@
"length":30,
"name":"password",
"label":"Password",
'required':true
"required":true
},
{
"uitype":"checkbox",
@ -125,7 +124,7 @@
"label":"CheckBox",
"value":2,
"dataurl":"test_code.json",
'required':true
"required":true
},
{
"uitype":"code",
@ -133,14 +132,14 @@
"label":"Code",
"value":2,
"dataurl":"test_code.json",
'required':true
"required":true
},
{
"uitype":"text",
"name":"text",
"value":"This is a test",
"label":"Text",
'required':true
"required":true
},
{
"uitype":"audiotext",
@ -148,7 +147,7 @@
"name":"atext",
"value":"This is a test",
"label":"Text",
'required':true
"required":true
}
]
}

View File

@ -47,9 +47,9 @@
"name":"python",
"label":"Python",
"content":{
"widgettype":"Text",
"widgettype":"urlwidget",
"options":{
"text":"This is Python language documents"
"url":"{{entire_url('form.ui')}}"
}
},
"icon":null