mc.nextTick(Function callback)

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

参数

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

results matching ""

    No results matching ""

    results matching ""

      No results matching ""