source

Uncatched TypeError: o.widget이 mouse.min.js Wordpress에서 함수가 아닙니다.

nicesource 2023. 9. 11. 21:53
반응형

Uncatched TypeError: o.widget이 mouse.min.js Wordpress에서 함수가 아닙니다.

모바일 친화 테스트 후 워드프레스 웹사이트에서 오류가 발견되었습니다.

Uncatched TypeError: o.domain이 domain/wp-domain/js/jquery/ui/domain.min.js?ver=1.11.4:11:163에서 함수가 아닙니다.

이 파일의 코드는 다음과 같습니다.

!(function (e) {
    "function" == typeof define && define.amd ? define(["jquery", "./widget"], e) : e(jQuery);
})(function (o) {
    var u = !1;
    return (
        o(document).mouseup(function () {
            u = !1;
        }),
        o.widget("ui.mouse", {
            version: "1.11.4",
            options: { cancel: "input,textarea,button,select,option", distance: 1, delay: 0 },
            _mouseInit: function () {
                var t = this;
                this.element
                    .bind("mousedown." + this.widgetName, function (e) {
                        return t._mouseDown(e);
                    })
                    .bind("click." + this.widgetName, function (e) {
                        if (!0 === o.data(e.target, t.widgetName + ".preventClickEvent")) return o.removeData(e.target, t.widgetName + ".preventClickEvent"), e.stopImmediatePropagation(), !1;
                    }),
                    (this.started = !1);
            },
            _mouseDestroy: function () {
                this.element.unbind("." + this.widgetName), this._mouseMoveDelegate && this.document.unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate);
            },
            _mouseDown: function (e) {
                if (!u) {
                    (this._mouseMoved = !1), this._mouseStarted && this._mouseUp(e), (this._mouseDownEvent = e);
                    var t = this,
                        s = 1 === e.which,
                        i = !("string" != typeof this.options.cancel || !e.target.nodeName) && o(e.target).closest(this.options.cancel).length;
                    return (
                        !(s && !i && this._mouseCapture(e)) ||
                        ((this.mouseDelayMet = !this.options.delay),
                        this.mouseDelayMet ||
                            (this._mouseDelayTimer = setTimeout(function () {
                                t.mouseDelayMet = !0;
                            }, this.options.delay)),
                        this._mouseDistanceMet(e) && this._mouseDelayMet(e) && ((this._mouseStarted = !1 !== this._mouseStart(e)), !this._mouseStarted)
                            ? (e.preventDefault(), !0)
                            : (!0 === o.data(e.target, this.widgetName + ".preventClickEvent") && o.removeData(e.target, this.widgetName + ".preventClickEvent"),
                              (this._mouseMoveDelegate = function (e) {
                                  return t._mouseMove(e);
                              }),
                              (this._mouseUpDelegate = function (e) {
                                  return t._mouseUp(e);
                              }),
                              this.document.bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate),
                              e.preventDefault(),
                              (u = !0)))
                    );
                }
            },
            _mouseMove: function (e) {
                if (this._mouseMoved) {
                    if (o.ui.ie && (!document.documentMode || document.documentMode < 9) && !e.button) return this._mouseUp(e);
                    if (!e.which) return this._mouseUp(e);
                }
                return (
                    (e.which || e.button) && (this._mouseMoved = !0),
                    this._mouseStarted
                        ? (this._mouseDrag(e), e.preventDefault())
                        : (this._mouseDistanceMet(e) && this._mouseDelayMet(e) && ((this._mouseStarted = !1 !== this._mouseStart(this._mouseDownEvent, e)), this._mouseStarted ? this._mouseDrag(e) : this._mouseUp(e)), !this._mouseStarted)
                );
            },
            _mouseUp: function (e) {
                return (
                    this.document.unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate),
                    this._mouseStarted && ((this._mouseStarted = !1), e.target === this._mouseDownEvent.target && o.data(e.target, this.widgetName + ".preventClickEvent", !0), this._mouseStop(e)),
                    (u = !1)
                );
            },
            _mouseDistanceMet: function (e) {
                return Math.max(Math.abs(this._mouseDownEvent.pageX - e.pageX), Math.abs(this._mouseDownEvent.pageY - e.pageY)) >= this.options.distance;
            },
            _mouseDelayMet: function () {
                return this.mouseDelayMet;
            },
            _mouseStart: function () {},
            _mouseDrag: function () {},
            _mouseStop: function () {},
            _mouseCapture: function () {
                return !0;
            },
        })
    );
});

js와 jquery에 대한 더 나은 지식을 가진 사람이 어디에 문제가 있는지 그리고 그것을 고치는 방법을 알 수 있을까요?

언급URL : https://stackoverflow.com/questions/63830938/uncaught-typeerror-o-widget-is-not-a-function-at-mouse-min-js-wordpress

반응형