Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbf68435

Browse files
author
FalkWolsky
committed
Adding function Calls to Timer Component
1 parent6560014 commitbf68435

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

‎client/packages/lowcoder/src/comps/comps/timerComp.tsx

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,42 @@ let TimerCompBasic = (function () {
299299
comp.children.actionHandler.dispatch(comp.children.actionHandler.changeValueAction('reset'))
300300
},
301301
},
302+
{
303+
method:{
304+
name:"start",
305+
description:trans("timer.start"),
306+
params:[],
307+
},
308+
execute:async(comp,params)=>{
309+
if(comp.children.timerState.value==='stoped'){
310+
comp.children.actionHandler.dispatch(comp.children.actionHandler.changeValueAction('start'))
311+
}
312+
},
313+
},
314+
{
315+
method:{
316+
name:"pause",
317+
description:trans("timer.pause"),
318+
params:[],
319+
},
320+
execute:async(comp,params)=>{
321+
if(comp.children.timerState.value==='started'){
322+
comp.children.actionHandler.dispatch(comp.children.actionHandler.changeValueAction('pause'))
323+
}
324+
},
325+
},
326+
{
327+
method:{
328+
name:"resume",
329+
description:trans("timer.resume"),
330+
params:[],
331+
},
332+
execute:async(comp,params)=>{
333+
if(comp.children.timerState.value==='paused'){
334+
comp.children.actionHandler.dispatch(comp.children.actionHandler.changeValueAction('resume'))
335+
}
336+
}
337+
}
302338
])
303339
.build();
304340
})();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp