mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-02-23 14:39:32 +08:00
feat(blocksAntd): add method call button to Examples
This commit is contained in:
parent
82d27c1313
commit
4fdee9b12f
@ -84,14 +84,14 @@ const Examples = ({ type, Component }) => {
|
||||
)}
|
||||
{meta.test &&
|
||||
meta.test.methods &&
|
||||
meta.test.methods.map((method) => (
|
||||
meta.test.methods.map((method, i) => (
|
||||
<button
|
||||
key={method}
|
||||
key={i}
|
||||
onClick={() => {
|
||||
block.registeredMethods[method]();
|
||||
block.registeredMethods[method.name](method.args);
|
||||
}}
|
||||
>
|
||||
{method}
|
||||
{method.name}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user