This commit is contained in:
yumoqing 2023-10-13 15:53:33 +08:00
parent f1e493ca8e
commit 01442309d9
2 changed files with 13 additions and 1 deletions

View File

@ -26,7 +26,7 @@ from appPublic.myTE import string_template_render
from .utils import *
from .baseWidget import Text, HBox, VBox
from .scrollpanel import ScrollPanel
from .paging import Paging, RelatedLoader
from .paging import RelatedLoader
from .ready import WidgetReady
from .toolbar import Toolbar
from .bgcolorbehavior import BGColorBehavior

View File

@ -0,0 +1,12 @@
import inspect
import asyncio
from functools improt wraps
def eventhandler(func):
@wraps(func)
def wrapper_func(*args, **kw):
if inspect.inspect.iscoroutinefunction(func):
return asyncio.gather(func(*args, **kw))
return func(*args, **kw)
return wrapper_func