tencent cloud

Feedback

Basic Function

Last updated: 2024-11-28 10:37:30

    console

    Print the log to the debug panel. console Is a global object that can be accessed directly. In the WeChat client, to vConsole Output log in.

    method

    Print to Debug Panel debug journal;
    Print to Debug Panel log journal;
    Print to Debug Panel info journal;
    Print to Debug Panel warn journal;
    Print to Debug Panel error journal;
    Create a new grouping in the debug panel. Any subsequent output is indented to indicate that it belongs to the current group. call console.groupEnd after the group;
    Ending by console.group Group created.

    Be careful

    Due to the limited functionality of vConsole and the variations in support for console methods across clients, it is recommended that developers only use the methods provided in this document in their mini programs.

    Timer

    setTimeout

    This API uses number setTimeout(function callback, number delay, any rest)
    Function: Set a timer. Execute the registered callback function after the timer expires.
    Parameters and description:
    function callback, callback function;
    number delay, the delay time, the function will be called after the delay, in ms;
    any rest, param1, param2, ... , paramN, etc., which are passed as arguments to the callback function.
    Return value: number, the number of the timer, this value can be passed to clearTimeout to cancel the timer.

    clearTimeout

    The API method is clearTimeout(number timeoutID).
    Function: cancels the timer set by setTimeout.
    Arguments and description: number timeoutID, the ID of the timer to be cancelled.

    setInterval

    The API uses number setInterval(function callback, number delay, any rest)
    Function: Set a timer. Execute the registered callback function according to the specified period (in milliseconds).
    Parameters and description:
    function callback, the callback function;
    number delay, the time interval between the execution of the callback function, in ms;
    any rest, param1, param2, ... , paramN and so on, which will be passed as parameters to the callback function.
    Return value: number, the number of the timer, this value can be passed to clearInterval to cancel the timer.

    clearInterval

    The API method is clearInterval(number intervalID)
    Function: cancels the timer set by setInterval.
    Parameters and description: number intervalID, the ID of the timer to be cancelled.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support