Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

mc.nextTick(Function callback)

延迟一部分操作到下一个时间片再执行。(类似于 setTimeout)

参数

参数类型默认值必填说明
callbackObject是下个时间片再执行的方法
console.log('run 1');
mc.nextTick(() => {
  console.log('run 2 我在nextTick中');
})
console.log('run 3');