This commit is contained in:
yumoqing 2021-01-17 09:51:04 +08:00
parent 02619b154b
commit d90131c193

View File

@ -397,6 +397,7 @@ class Blocks(EventDispatcher):
opts = desc.get('options').copy()
d = self.getActionData(widget,desc)
p = opts.get('options',{}).copy()
if d:
p.update(d)
opts['options'] = p
def doit(target,add_mode,o,w):
@ -483,6 +484,7 @@ class Blocks(EventDispatcher):
params = desc.get('params',{}).copy()
d = self.getActionData(widget,desc)
if d:
params.update(d)
func(target, *args, **params)
@ -502,6 +504,7 @@ class Blocks(EventDispatcher):
"self":target,
"args":args
}
if d:
ns.update(d)
try:
self.eval(script, ns)
@ -520,6 +523,7 @@ class Blocks(EventDispatcher):
f = getattr(target, method)
kwargs = desc.get('options',{}).copy()
d = self.getActionData(widget,desc)
if d:
kwargs.update(d)
f(*args, **kwargs)
else: