bugfic
This commit is contained in:
parent
7dea373f13
commit
c5bed1d5a1
@ -1,7 +1,7 @@
|
||||
from ahserver.serverenv import ServerEnv
|
||||
|
||||
def UiConform(title="请确认",message="请确认", binds=[]):
|
||||
return {
|
||||
def UiConform(title="请确认",message="请确认", binds=[], **kw):
|
||||
dic = {
|
||||
"widgettype":"Conform",
|
||||
"options":{
|
||||
"width":"50%",
|
||||
@ -13,8 +13,11 @@ def UiConform(title="请确认",message="请确认", binds=[]):
|
||||
},
|
||||
binds:json.dump(binds, indent=4, ensure_ascii=False)
|
||||
}
|
||||
if kw:
|
||||
dic.update(kw)
|
||||
return dic
|
||||
|
||||
def UiWindow(title, icon, content, cheight=10, cwidth=15):
|
||||
def UiWindow(title, icon, content, cheight=10, cwidth=15, **kw):
|
||||
return {
|
||||
"widgettype":"PopupWindow",
|
||||
"options":{
|
||||
@ -28,6 +31,9 @@ def UiWindow(title, icon, content, cheight=10, cwidth=15):
|
||||
"auto_open":True
|
||||
}
|
||||
}
|
||||
if kw:
|
||||
dic.update(kw)
|
||||
return dic
|
||||
|
||||
def UiError(title="出错", message="出错啦", timeout=5, **kw):
|
||||
dic = {
|
||||
@ -40,7 +46,9 @@ def UiError(title="出错", message="出错啦", timeout=5, **kw):
|
||||
"title":title,
|
||||
"message":message
|
||||
}
|
||||
}.update(kw)
|
||||
}
|
||||
if kw:
|
||||
dic.update(kw)
|
||||
return dic
|
||||
|
||||
def UiMessage(title="消息", message="后台消息", timeout=5, **kw):
|
||||
@ -54,7 +62,9 @@ def UiMessage(title="消息", message="后台消息", timeout=5, **kw):
|
||||
"title":title,
|
||||
"message":message
|
||||
}
|
||||
}.update(kw)
|
||||
}
|
||||
if kw:
|
||||
dic.update(kw)
|
||||
return dic
|
||||
|
||||
def load_pybricks():
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user