File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
client/packages/lowcoder/src/comps/comps Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff 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} ) ( ) ;
You can’t perform that action at this time.
0 commit comments