Delegate in jquery used in vue does not take effect.

I introduced jquery, into the vue project and used the delegate method, as follows:

mounted () {
    this._initTreeData();
    let func = function () {
        console.log("PPPPPP");
    };
    $(".category-tree-wrapper").delegate("span[name="span_addCategory"]", "click", func)
}

but clicking the button on the page does not take effect. What is the reason

Mar.04,2021

, what is your jquery version and whether the corresponding element exists. This method has been deprecated in jQuery 3.0, please use on () instead.

Menu