android webview检测屏幕

 

1)清单文件配置:

配置权限:
<uses-permission android:name="android.permission.INTERNET" />
注册activity:
<activity
    android:name=".TouchWebViewActivity"
    android:exported="true">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />

        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>

2)创建activity:

 布局文件
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".TouchWebViewActivity">

    <WebView
        android:id="@+id/webView"
        android:layout_width="0dp"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
 activity页面内容
import android.annotation.SuppressLint
import android.os.Bundle
import android.view.Window
import android.view.WindowManager
import android.webkit.WebChromeClient
import android.webkit.WebSettings
import android.webkit.WebView
import android.webkit.WebViewClient
import androidx.appcompat.app.AppCompatActivity

@SuppressLint("SetJavaScriptEnabled")
class TouchWebViewActivity : AppCompatActivity() {
    var webView: WebView? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        supportRequestWindowFeature(Window.FEATURE_NO_TITLE)
        window.setFlags(
            WindowManager.LayoutParams.FLAG_FULLSCREEN,
            WindowManager.LayoutParams.FLAG_FULLSCREEN
        )

        setContentView(R.layout.activity_touch_web_view)
        webView = findViewById(R.id.webView)

        val settings: WebSettings = webView!!.settings
        settings.javaScriptCanOpenWindowsAutomatically = true
        settings.javaScriptEnabled = true

        settings.setSupportMultipleWindows(true)

        settings.setSupportZoom(false)
        settings.displayZoomControls = false
        settings.builtInZoomControls = false

        settings.useWideViewPort = true
        settings.loadWithOverviewMode = true

        settings.layoutAlgorithm = WebSettings.LayoutAlgorithm.SINGLE_COLUMN

        settings.blockNetworkImage = false

        settings.databaseEnabled = true
        settings.domStorageEnabled = true

        settings.setGeolocationEnabled(true)

        settings.defaultTextEncodingName = "utf-8"
        settings.loadsImagesAutomatically = true
        settings.cacheMode = WebSettings.LOAD_CACHE_ELSE_NETWORK

        webView!!.webViewClient = WebViewClient()
        webView!!.webChromeClient = WebChromeClient()

        webView!!.loadUrl("file:///android_res/raw/touch_screen_test.html")
    }

    override fun onDestroy() {
        webView!!.loadDataWithBaseURL(null, "", "text/html", "utf-8", null)
        webView!!.clearHistory()
        webView!!.destroy()
        super.onDestroy()
    }

}

3)HTML内容:

**请注意**

html文件必须放在res/raw文件夹下,若没有raw文件夹创建便好。

<!DOCTYPE html>
<html lang="en">
    <script id="allow-copy_script">
        (function agent() {
            let unlock = false;
            document.addEventListener("allow_copy", (event) => {
                unlock = event.detail.unlock;
            });

            const copyEvents = ["copy", "cut", "contextmenu", "selectstart", "mousedown", "mouseup", "mousemove", "keydown", "keypress", "keyup"];
            const rejectOtherHandlers = (e) => {
                if (unlock) {
                    e.stopPropagation();
                    if (e.stopImmediatePropagation) e.stopImmediatePropagation();
                }
            };
            copyEvents.forEach((evt) => {
                document.documentElement.addEventListener(evt, rejectOtherHandlers, {
                    capture: true,
                });
            });
        })();
    </script>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

        <title>Touch Screen Test</title>
        <meta name="description" content="Simple touch position/counter test" />
        <meta name="viewport" content="width=device-width,initial-scale=1;viewport-fit=cover" />
        <style>
            body,
            html {
                margin: 0;
                padding: 0;
                overflow: hidden;
                min-height: 100%;
                font-family: system-ui, sans-serif;
                user-select: none;
            }
            .click-count {
                color: #ebebeb;
                font-size: 72vmin;
                width: 100%;
                text-align: center;
            }
            .clicker {
                width: 100%;
                height: 100%;
                position: fixed;
                top: 0;
                left: 0;
                z-index: 1;
            }
            .click-item {
                position: absolute;
                width: 2pc;
                height: 2pc;
                line-height: 2pc;
                color: #fff;
                text-shadow: 0 0 0.2rem #000;
                background: #f90;
                text-align: center;
                z-index: 0;
                border-radius: 50%;
            }
        </style>
    </head>
    <body>
        <div class="click-count">0</div>
        <div class="clicker"></div>
        <script type="isodata"></script>
        <script type="module">
            var _,
                e,
                n,
                t,
                o,
                r,
                l = {},
                i = [],
                u = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
            function c(_, e) {
                for (var n in e) _[n] = e[n];
                return _;
            }
            function s(_) {
                var e = _.parentNode;
                e && e.removeChild(_);
            }
            function f(e, n, t) {
                var o,
                    r,
                    l,
                    i = {};
                for (l in n) "key" == l ? (o = n[l]) : "ref" == l ? (r = n[l]) : (i[l] = n[l]);
                if ((arguments.length > 2 && (i.children = arguments.length > 3 ? _.call(arguments, 2) : t), "function" == typeof e && null != e.defaultProps)) for (l in e.defaultProps) void 0 === i[l] && (i[l] = e.defaultProps[l]);
                return a(e, i, o, r, null);
            }
            function a(_, t, o, r, l) {
                var i = { type: _, props: t, key: o, ref: r, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: null == l ? ++n : l };
                return null == l && null != e.vnode && e.vnode(i), i;
            }
            function p(_) {
                return _.children;
            }
            function h(_, e) {
                (this.props = _), (this.context = e);
            }
            function d(_, e) {
                if (null == e) return _.__ ? d(_.__, _.__.__k.indexOf(_) + 1) : null;
                for (var n; e < _.__k.length; e++) if (null != (n = _.__k[e]) && null != n.__e) return n.__e;
                return "function" == typeof _.type ? d(_) : null;
            }
            function v(_) {
                var e, n;
                if (null != (_ = _.__) && null != _.__c) {
                    for (_.__e = _.__c.base = null, e = 0; e < _.__k.length; e++)
                        if (null != (n = _.__k[e]) && null != n.__e) {
                            _.__e = _.__c.base = n.__e;
                            break;
                        }
                    return v(_);
                }
            }
            function y(_) {
                ((!_.__d && (_.__d = !0) && t.push(_) && !m.__r++) || o !== e.debounceRendering) && ((o = e.debounceRendering) || setTimeout)(m);
            }
            function m() {
                for (var _; (m.__r = t.length); )
                    (_ = t.sort(function (_, e) {
                        return _.__v.__b - e.__v.__b;
                    })),
                        (t = []),
                        _.some(function (_) {
                            var e, n, t, o, r, l;
                            _.__d &&
                                ((r = (o = (e = _).__v).__e),
                                (l = e.__P) && ((n = []), ((t = c({}, o)).__v = o.__v + 1), E(l, o, t, e.__n, void 0 !== l.ownerSVGElement, null != o.__h ? [r] : null, n, null == r ? d(o) : r, o.__h), w(n, o), o.__e != r && v(o)));
                        });
            }
            function g(_, e, n, t, o, r, u, c, s, f) {
                var h,
                    v,
                    y,
                    m,
                    g,
                    x,
                    C,
                    H = (t && t.__k) || i,
                    N = H.length;
                for (n.__k = [], h = 0; h < e.length; h++)
                    if (
                        null !=
                        (m = n.__k[h] =
                            null == (m = e[h]) || "boolean" == typeof m
                                ? null
                                : "string" == typeof m || "number" == typeof m || "bigint" == typeof m
                                ? a(null, m, null, null, m)
                                : Array.isArray(m)
                                ? a(p, { children: m }, null, null, null)
                                : m.__b > 0
                                ? a(m.type, m.props, m.key, m.ref ? m.ref : null, m.__v)
                                : m)
                    ) {
                        if (((m.__ = n), (m.__b = n.__b + 1), null === (y = H[h]) || (y && m.key == y.key && m.type === y.type))) H[h] = void 0;
                        else
                            for (v = 0; v < N; v++) {
                                if ((y = H[v]) && m.key == y.key && m.type === y.type) {
                                    H[v] = void 0;
                                    break;
                                }
                                y = null;
                            }
                        E(_, m, (y = y || l), o, r, u, c, s, f),
                            (g = m.__e),
                            (v = m.ref) && y.ref != v && (C || (C = []), y.ref && C.push(y.ref, null, m), C.push(v, m.__c || g, m)),
                            null != g
                                ? (null == x && (x = g), "function" == typeof m.type && m.__k === y.__k ? (m.__d = s = k(m, s, _)) : (s = b(_, m, y, H, g, s)), "function" == typeof n.type && (n.__d = s))
                                : s && y.__e == s && s.parentNode != _ && (s = d(y));
                    }
                for (n.__e = x, h = N; h--; ) null != H[h] && P(H[h], H[h]);
                if (C) for (h = 0; h < C.length; h++) M(C[h], C[++h], C[++h]);
            }
            function k(_, e, n) {
                for (var t, o = _.__k, r = 0; o && r < o.length; r++) (t = o[r]) && ((t.__ = _), (e = "function" == typeof t.type ? k(t, e, n) : b(n, t, t, o, t.__e, e)));
                return e;
            }
            function b(_, e, n, t, o, r) {
                var l, i, u;
                if (void 0 !== e.__d) (l = e.__d), (e.__d = void 0);
                else if (null == n || o != r || null == o.parentNode)
                    _: if (null == r || r.parentNode !== _) _.appendChild(o), (l = null);
                    else {
                        for (i = r, u = 0; (i = i.nextSibling) && u < t.length; u += 1) if (i == o) break _;
                        _.insertBefore(o, r), (l = r);
                    }
                return void 0 !== l ? l : o.nextSibling;
            }
            function x(_, e, n) {
                "-" === e[0] ? _.setProperty(e, n) : (_[e] = null == n ? "" : "number" != typeof n || u.test(e) ? n : n + "px");
            }
            function C(_, e, n, t, o) {
                var r;
                _: if ("style" === e)
                    if ("string" == typeof n) _.style.cssText = n;
                    else {
                        if (("string" == typeof t && (_.style.cssText = t = ""), t)) for (e in t) (n && e in n) || x(_.style, e, "");
                        if (n) for (e in n) (t && n[e] === t[e]) || x(_.style, e, n[e]);
                    }
                else if ("o" === e[0] && "n" === e[1])
                    (r = e !== (e = e.replace(/Capture$/, ""))),
                        (e = e.toLowerCase() in _ ? e.toLowerCase().slice(2) : e.slice(2)),
                        _.l || (_.l = {}),
                        (_.l[e + r] = n),
                        n ? t || _.addEventListener(e, r ? N : H, r) : _.removeEventListener(e, r ? N : H, r);
                else if ("dangerouslySetInnerHTML" !== e) {
                    if (o) e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
                    else if ("href" !== e && "list" !== e && "form" !== e && "tabIndex" !== e && "download" !== e && e in _)
                        try {
                            _[e] = null == n ? "" : n;
                            break _;
                        } catch (_) {}
                    "function" == typeof n || (null == n || (!1 === n && -1 == e.indexOf("-")) ? _.removeAttribute(e) : _.setAttribute(e, n));
                }
            }
            function H(_) {
                this.l[_.type + !1](e.event ? e.event(_) : _);
            }
            function N(_) {
                this.l[_.type + !0](e.event ? e.event(_) : _);
            }
            function E(_, n, t, o, r, l, i, u, s) {
                var f,
                    a,
                    d,
                    v,
                    y,
                    m,
                    k,
                    b,
                    x,
                    C,
                    H,
                    N,
                    E,
                    w,
                    M,
                    P = n.type;
                if (void 0 !== n.constructor) return null;
                null != t.__h && ((s = t.__h), (u = n.__e = t.__e), (n.__h = null), (l = [u])), (f = e.__b) && f(n);
                try {
                    _: if ("function" == typeof P) {
                        if (
                            ((b = n.props),
                            (x = (f = P.contextType) && o[f.__c]),
                            (C = f ? (x ? x.props.value : f.__) : o),
                            t.__c
                                ? (k = (a = n.__c = t.__c).__ = a.__E)
                                : ("prototype" in P && P.prototype.render ? (n.__c = a = new P(b, C)) : ((n.__c = a = new h(b, C)), (a.constructor = P), (a.render = U)),
                                  x && x.sub(a),
                                  (a.props = b),
                                  a.state || (a.state = {}),
                                  (a.context = C),
                                  (a.__n = o),
                                  (d = a.__d = !0),
                                  (a.__h = []),
                                  (a._sb = [])),
                            null == a.__s && (a.__s = a.state),
                            null != P.getDerivedStateFromProps && (a.__s == a.state && (a.__s = c({}, a.__s)), c(a.__s, P.getDerivedStateFromProps(b, a.__s))),
                            (v = a.props),
                            (y = a.state),
                            d)
                        )
                            null == P.getDerivedStateFromProps && null != a.componentWillMount && a.componentWillMount(), null != a.componentDidMount && a.__h.push(a.componentDidMount);
                        else {
                            if (
                                (null == P.getDerivedStateFromProps && b !== v && null != a.componentWillReceiveProps && a.componentWillReceiveProps(b, C),
                                (!a.__e && null != a.shouldComponentUpdate && !1 === a.shouldComponentUpdate(b, a.__s, C)) || n.__v === t.__v)
                            ) {
                                for (
                                    a.props = b,
                                        a.state = a.__s,
                                        n.__v !== t.__v && (a.__d = !1),
                                        a.__v = n,
                                        n.__e = t.__e,
                                        n.__k = t.__k,
                                        n.__k.forEach(function (_) {
                                            _ && (_.__ = n);
                                        }),
                                        H = 0;
                                    H < a._sb.length;
                                    H++
                                )
                                    a.__h.push(a._sb[H]);
                                (a._sb = []), a.__h.length && i.push(a);
                                break _;
                            }
                            null != a.componentWillUpdate && a.componentWillUpdate(b, a.__s, C),
                                null != a.componentDidUpdate &&
                                    a.__h.push(function () {
                                        a.componentDidUpdate(v, y, m);
                                    });
                        }
                        if (((a.context = C), (a.props = b), (a.__v = n), (a.__P = _), (N = e.__r), (E = 0), "prototype" in P && P.prototype.render)) {
                            for (a.state = a.__s, a.__d = !1, N && N(n), f = a.render(a.props, a.state, a.context), w = 0; w < a._sb.length; w++) a.__h.push(a._sb[w]);
                            a._sb = [];
                        } else
                            do {
                                (a.__d = !1), N && N(n), (f = a.render(a.props, a.state, a.context)), (a.state = a.__s);
                            } while (a.__d && ++E < 25);
                        (a.state = a.__s),
                            null != a.getChildContext && (o = c(c({}, o), a.getChildContext())),
                            d || null == a.getSnapshotBeforeUpdate || (m = a.getSnapshotBeforeUpdate(v, y)),
                            (M = null != f && f.type === p && null == f.key ? f.props.children : f),
                            g(_, Array.isArray(M) ? M : [M], n, t, o, r, l, i, u, s),
                            (a.base = n.__e),
                            (n.__h = null),
                            a.__h.length && i.push(a),
                            k && (a.__E = a.__ = null),
                            (a.__e = !1);
                    } else null == l && n.__v === t.__v ? ((n.__k = t.__k), (n.__e = t.__e)) : (n.__e = S(t.__e, n, t, o, r, l, i, s));
                    (f = e.diffed) && f(n);
                } catch (_) {
                    (n.__v = null), (s || null != l) && ((n.__e = u), (n.__h = !!s), (l[l.indexOf(u)] = null)), e.__e(_, n, t);
                }
            }
            function w(_, n) {
                e.__c && e.__c(n, _),
                    _.some(function (n) {
                        try {
                            (_ = n.__h),
                                (n.__h = []),
                                _.some(function (_) {
                                    _.call(n);
                                });
                        } catch (_) {
                            e.__e(_, n.__v);
                        }
                    });
            }
            function S(e, n, t, o, r, i, u, c) {
                var f,
                    a,
                    p,
                    h = t.props,
                    v = n.props,
                    y = n.type,
                    m = 0;
                if (("svg" === y && (r = !0), null != i))
                    for (; m < i.length; m++)
                        if ((f = i[m]) && "setAttribute" in f == !!y && (y ? f.localName === y : 3 === f.nodeType)) {
                            (e = f), (i[m] = null);
                            break;
                        }
                if (null == e) {
                    if (null === y) return document.createTextNode(v);
                    (e = r ? document.createElementNS("http://www.w3.org/2000/svg", y) : document.createElement(y, v.is && v)), (i = null), (c = !1);
                }
                if (null === y) h === v || (c && e.data === v) || (e.data = v);
                else {
                    if (((i = i && _.call(e.childNodes)), (a = (h = t.props || l).dangerouslySetInnerHTML), (p = v.dangerouslySetInnerHTML), !c)) {
                        if (null != i) for (h = {}, m = 0; m < e.attributes.length; m++) h[e.attributes[m].name] = e.attributes[m].value;
                        (p || a) && ((p && ((a && p.__html == a.__html) || p.__html === e.innerHTML)) || (e.innerHTML = (p && p.__html) || ""));
                    }
                    if (
                        ((function (_, e, n, t, o) {
                            var r;
                            for (r in n) "children" === r || "key" === r || r in e || C(_, r, null, n[r], t);
                            for (r in e) (o && "function" != typeof e[r]) || "children" === r || "key" === r || "value" === r || "checked" === r || n[r] === e[r] || C(_, r, e[r], n[r], t);
                        })(e, v, h, r, c),
                        p)
                    )
                        n.__k = [];
                    else if (((m = n.props.children), g(e, Array.isArray(m) ? m : [m], n, t, o, r && "foreignObject" !== y, i, u, i ? i[0] : t.__k && d(t, 0), c), null != i)) for (m = i.length; m--; ) null != i[m] && s(i[m]);
                    c ||
                        ("value" in v && void 0 !== (m = v.value) && (m !== e.value || ("progress" === y && !m) || ("option" === y && m !== h.value)) && C(e, "value", m, h.value, !1),
                        "checked" in v && void 0 !== (m = v.checked) && m !== e.checked && C(e, "checked", m, h.checked, !1));
                }
                return e;
            }
            function M(_, n, t) {
                try {
                    "function" == typeof _ ? _(n) : (_.current = n);
                } catch (_) {
                    e.__e(_, t);
                }
            }
            function P(_, n, t) {
                var o, r;
                if ((e.unmount && e.unmount(_), (o = _.ref) && ((o.current && o.current !== _.__e) || M(o, null, n)), null != (o = _.__c))) {
                    if (o.componentWillUnmount)
                        try {
                            o.componentWillUnmount();
                        } catch (_) {
                            e.__e(_, n);
                        }
                    (o.base = o.__P = null), (_.__c = void 0);
                }
                if ((o = _.__k)) for (r = 0; r < o.length; r++) o[r] && P(o[r], n, t || "function" != typeof _.type);
                t || null == _.__e || s(_.__e), (_.__ = _.__e = _.__d = void 0);
            }
            function U(_, e, n) {
                return this.constructor(_, n);
            }
            function T(n, t, o) {
                var r, i, u;
                e.__ && e.__(n, t),
                    (i = (r = "function" == typeof o) ? null : (o && o.__k) || t.__k),
                    (u = []),
                    E(t, (n = ((!r && o) || t).__k = f(p, null, [n])), i || l, l, void 0 !== t.ownerSVGElement, !r && o ? [o] : i ? null : t.firstChild ? _.call(t.childNodes) : null, u, !r && o ? o : i ? i.__e : t.firstChild, r),
                    w(u, n);
            }
            function A(_, e) {
                T(_, e, A);
            }
            function $(e, n, t) {
                var o,
                    r,
                    l,
                    i = c({}, e.props);
                for (l in n) "key" == l ? (o = n[l]) : "ref" == l ? (r = n[l]) : (i[l] = n[l]);
                return arguments.length > 2 && (i.children = arguments.length > 3 ? _.call(arguments, 2) : t), a(e.type, i, o || e.key, r || e.ref, null);
            }
            function D(_, e) {
                var n = {
                    __c: (e = "__cC" + r++),
                    __: _,
                    Consumer: function (_, e) {
                        return _.children(e);
                    },
                    Provider: function (_) {
                        var n, t;
                        return (
                            this.getChildContext ||
                                ((n = []),
                                ((t = {})[e] = this),
                                (this.getChildContext = function () {
                                    return t;
                                }),
                                (this.shouldComponentUpdate = function (_) {
                                    this.props.value !== _.value && n.some(y);
                                }),
                                (this.sub = function (_) {
                                    n.push(_);
                                    var e = _.componentWillUnmount;
                                    _.componentWillUnmount = function () {
                                        n.splice(n.indexOf(_), 1), e && e.call(_);
                                    };
                                })),
                            _.children
                        );
                    },
                };
                return (n.Provider.__ = n.Consumer.contextType = n);
            }
            (_ = i.slice),
                (e = {
                    __e: function (_, e, n, t) {
                        for (var o, r, l; (e = e.__); )
                            if ((o = e.__c) && !o.__)
                                try {
                                    if (
                                        ((r = o.constructor) && null != r.getDerivedStateFromError && (o.setState(r.getDerivedStateFromError(_)), (l = o.__d)),
                                        null != o.componentDidCatch && (o.componentDidCatch(_, t || {}), (l = o.__d)),
                                        l)
                                    )
                                        return (o.__E = o);
                                } catch (e) {
                                    _ = e;
                                }
                        throw _;
                    },
                }),
                (n = 0),
                (h.prototype.setState = function (_, e) {
                    var n;
                    (n = null != this.__s && this.__s !== this.state ? this.__s : (this.__s = c({}, this.state))),
                        "function" == typeof _ && (_ = _(c({}, n), this.props)),
                        _ && c(n, _),
                        null != _ && this.__v && (e && this._sb.push(e), y(this));
                }),
                (h.prototype.forceUpdate = function (_) {
                    this.__v && ((this.__e = !0), _ && this.__h.push(_), y(this));
                }),
                (h.prototype.render = p),
                (t = []),
                (m.__r = 0),
                (r = 0);
            var F = function (_, e, n, t) {
                    var o;
                    e[0] = 0;
                    for (var r = 1; r < e.length; r++) {
                        var l = e[r++],
                            i = e[r] ? ((e[0] |= l ? 1 : 2), n[e[r++]]) : e[++r];
                        3 === l
                            ? (t[0] = i)
                            : 4 === l
                            ? (t[1] = Object.assign(t[1] || {}, i))
                            : 5 === l
                            ? ((t[1] = t[1] || {})[e[++r]] = i)
                            : 6 === l
                            ? (t[1][e[++r]] += i + "")
                            : l
                            ? ((o = _.apply(i, F(_, i, n, ["", null]))), t.push(o), i[0] ? (e[0] |= 2) : ((e[r - 2] = 0), (e[r] = o)))
                            : t.push(i);
                    }
                    return t;
                },
                W = new Map();
            var L,
                V,
                O,
                q,
                I = function (_) {
                    var e = W.get(this);
                    return (
                        e || ((e = new Map()), W.set(this, e)),
                        (e = F(
                            this,
                            e.get(_) ||
                                (e.set(
                                    _,
                                    (e = (function (_) {
                                        for (
                                            var e,
                                                n,
                                                t = 1,
                                                o = "",
                                                r = "",
                                                l = [0],
                                                i = function (_) {
                                                    1 === t && (_ || (o = o.replace(/^\s*\n\s*|\s*\n\s*$/g, "")))
                                                        ? l.push(0, _, o)
                                                        : 3 === t && (_ || o)
                                                        ? (l.push(3, _, o), (t = 2))
                                                        : 2 === t && "..." === o && _
                                                        ? l.push(4, _, 0)
                                                        : 2 === t && o && !_
                                                        ? l.push(5, 0, !0, o)
                                                        : t >= 5 && ((o || (!_ && 5 === t)) && (l.push(t, 0, o, n), (t = 6)), _ && (l.push(t, _, 0, n), (t = 6))),
                                                        (o = "");
                                                },
                                                u = 0;
                                            u < _.length;
                                            u++
                                        ) {
                                            u && (1 === t && i(), i(u));
                                            for (var c = 0; c < _[u].length; c++)
                                                (e = _[u][c]),
                                                    1 === t
                                                        ? "<" === e
                                                            ? (i(), (l = [l]), (t = 3))
                                                            : (o += e)
                                                        : 4 === t
                                                        ? "--" === o && ">" === e
                                                            ? ((t = 1), (o = ""))
                                                            : (o = e + o[0])
                                                        : r
                                                        ? e === r
                                                            ? (r = "")
                                                            : (o += e)
                                                        : '"' === e || "'" === e
                                                        ? (r = e)
                                                        : ">" === e
                                                        ? (i(), (t = 1))
                                                        : t &&
                                                          ("=" === e
                                                              ? ((t = 5), (n = o), (o = ""))
                                                              : "/" === e && (t < 5 || ">" === _[u][c + 1])
                                                              ? (i(), 3 === t && (l = l[0]), (t = l), (l = l[0]).push(2, 0, t), (t = 0))
                                                              : " " === e || "\t" === e || "\n" === e || "\r" === e
                                                              ? (i(), (t = 2))
                                                              : (o += e)),
                                                    3 === t && "!--" === o && ((t = 4), (l = l[0]));
                                        }
                                        return i(), l;
                                    })(_))
                                ),
                                e),
                            arguments,
                            []
                        )).length > 1
                            ? e
                            : e[0]
                    );
                }.bind(f),
                R = 0,
                j = [],
                B = [],
                G = e.__b,
                z = e.__r,
                X = e.diffed,
                Y = e.__c,
                J = e.unmount;
            function K(_, n) {
                e.__h && e.__h(V, _, R || n), (R = 0);
                var t = V.__H || (V.__H = { __: [], __h: [] });
                return _ >= t.__.length && t.__.push({ __V: B }), t.__[_];
            }
            function Q(_) {
                return (
                    (R = 1),
                    (function (_, e, n) {
                        var t = K(L++, 2);
                        if (
                            ((t.t = _),
                            !t.__c &&
                                ((t.__ = [
                                    n ? n(e) : o_(void 0, e),
                                    function (_) {
                                        var e = t.__N ? t.__N[0] : t.__[0],
                                            n = t.t(e, _);
                                        e !== n && ((t.__N = [n, t.__[1]]), t.__c.setState({}));
                                    },
                                ]),
                                (t.__c = V),
                                !V.u))
                        ) {
                            V.u = !0;
                            var o = V.shouldComponentUpdate;
                            V.shouldComponentUpdate = function (_, e, n) {
                                if (!t.__c.__H) return !0;
                                var r = t.__c.__H.__.filter(function (_) {
                                    return _.__c;
                                });
                                if (
                                    r.every(function (_) {
                                        return !_.__N;
                                    })
                                )
                                    return !o || o.call(this, _, e, n);
                                var l = !1;
                                return (
                                    r.forEach(function (_) {
                                        if (_.__N) {
                                            var e = _.__[0];
                                            (_.__ = _.__N), (_.__N = void 0), e !== _.__[0] && (l = !0);
                                        }
                                    }),
                                    !(!l && t.__c.props === _) && (!o || o.call(this, _, e, n))
                                );
                            };
                        }
                        return t.__N || t.__;
                    })(o_, _)
                );
            }
            function Z() {
                for (var _; (_ = j.shift()); )
                    if (_.__P && _.__H)
                        try {
                            _.__H.__h.forEach(n_), _.__H.__h.forEach(t_), (_.__H.__h = []);
                        } catch (V) {
                            (_.__H.__h = []), e.__e(V, _.__v);
                        }
            }
            (e.__b = function (_) {
                (V = null), G && G(_);
            }),
                (e.__r = function (_) {
                    z && z(_), (L = 0);
                    var e = (V = _.__c).__H;
                    e &&
                        (O === V
                            ? ((e.__h = []),
                              (V.__h = []),
                              e.__.forEach(function (_) {
                                  _.__N && (_.__ = _.__N), (_.__V = B), (_.__N = _.i = void 0);
                              }))
                            : (e.__h.forEach(n_), e.__h.forEach(t_), (e.__h = []))),
                        (O = V);
                }),
                (e.diffed = function (_) {
                    X && X(_);
                    var n = _.__c;
                    n &&
                        n.__H &&
                        (n.__H.__h.length && ((1 !== j.push(n) && q === e.requestAnimationFrame) || ((q = e.requestAnimationFrame) || e_)(Z)),
                        n.__H.__.forEach(function (_) {
                            _.i && (_.__H = _.i), _.__V !== B && (_.__ = _.__V), (_.i = void 0), (_.__V = B);
                        })),
                        (O = V = null);
                }),
                (e.__c = function (_, n) {
                    n.some(function (_) {
                        try {
                            _.__h.forEach(n_),
                                (_.__h = _.__h.filter(function (_) {
                                    return !_.__ || t_(_);
                                }));
                        } catch (O) {
                            n.some(function (_) {
                                _.__h && (_.__h = []);
                            }),
                                (n = []),
                                e.__e(O, _.__v);
                        }
                    }),
                        Y && Y(_, n);
                }),
                (e.unmount = function (_) {
                    J && J(_);
                    var n,
                        t = _.__c;
                    t &&
                        t.__H &&
                        (t.__H.__.forEach(function (_) {
                            try {
                                n_(_);
                            } catch (_) {
                                n = _;
                            }
                        }),
                        (t.__H = void 0),
                        n && e.__e(n, t.__v));
                });
            var __ = "function" == typeof requestAnimationFrame;
            function e_(_) {
                var e,
                    n = function () {
                        clearTimeout(t), __ && cancelAnimationFrame(e), setTimeout(_);
                    },
                    t = setTimeout(n, 100);
                __ && (e = requestAnimationFrame(n));
            }
            function n_(_) {
                var e = V,
                    n = _.__c;
                "function" == typeof n && ((_.__c = void 0), n()), (V = e);
            }
            function t_(_) {
                var e = V;
                (_.__c = _.__()), (V = e);
            }
            function o_(_, e) {
                return "function" == typeof e ? e(_) : e;
            }
            Promise.resolve(), D({}), D({});
            const r_ = e.__e;
            let l_;
            function i_() {
                const [_, e] = Q([]);
                return I`<div class="click-count">${_.length}</div><div class="clicker" onClick=${(_) =>
                    e((e) => {
                        return [
                            ...e,
                            { x: _.clientX, y: _.clientY, color: ((n = 80), (t = 136), "rgba(" + (Math.floor(Math.random() * t) + n) + "," + (Math.floor(Math.random() * t) + n) + "," + (Math.floor(Math.random() * t) + n) + ",1)") },
                        ];
                        var n, t;
                    })}/>${_.map((_, e) => I`<div class="click-item" style=${{ top: `${_.y}px`, left: `${_.x}px`, backgroundColor: _.color }}>${e}</div>`)}`;
            }
            async function u_(_) {
                return await ((e = I`<${i_} ...${_}/>`), import("./chunks/prerender.1cfb3b94.js").then((_) => _.default(e, n)));
                var e, n;
            }
            (e.__e = (_, e, n) => {
                if (_ && _.then) {
                    let t = e;
                    for (; (t = t.__); ) if (t.__c && t.__c.__c) return null == e.__e && ((e.__e = n.__e), (e.__k = n.__k)), e.__k || (e.__k = []), t.__c.__c(_, e);
                }
                r_ && r_(_, e, n);
            }),
                (function (_, e) {
                    if ("undefined" == typeof window) return;
                    let n = document.querySelector("script[type=isodata]");
                    (e = e || (n && n.parentNode) || document.body), !l_ && n ? A(_, e) : T(_, e), (l_ = !0);
                })(I`<${i_}/>`);
            export { i_ as App, f as h, e as l, p, u_ as prerender, $ as q };
        </script>
    </body>
</html>

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/584498.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

基于随机森林和Xgboost对肥胖风险的多类别预测

基于随机森林和Xgboost对肥胖风险的多类别预测 作者&#xff1a;i阿极 作者简介&#xff1a;数据分析领域优质创作者、多项比赛获奖者&#xff1a;博主个人首页 &#x1f60a;&#x1f60a;&#x1f60a;如果觉得文章不错或能帮助到你学习&#xff0c;可以点赞&#x1f44d;收藏…

学习【Mysql运维篇】这一篇就够了

运维篇 1. 日志1-1. 错误日志1-2. 二进制日志1-3. 查询日志1-4. 慢查询日志 2. 主从复制2-1. 概述2-2. 原理2-3. 搭建 3. 分库分表3-1. 介绍3-2. Mycat概述3-3. Mycat入门3-4. Mycat配置3-5. Mycat分片3-6. Mycat管理及监控 4. 读写分类 1. 日志 1-1. 错误日志 错误日志是MyS…

计算机服务器中了mkp勒索病毒怎么办,mkp勒索病毒解密数据恢复流程

网络技术的不断应用与发展&#xff0c;为企业的生产运营带来了极大便利&#xff0c;越来越多的企业依赖网络开展各项工作业务&#xff0c;网络也大大提升了企业的生产运营效率&#xff0c;但网络是一把双刃剑&#xff0c;在为企业提供便利的同时&#xff0c;也为企业的数据安全…

云里物里家电运输新模式:实时定位、智能监控、降本增效

随着电商行业的飞速发展&#xff0c;大家电作为大宗商品&#xff0c;其物流运输过程中面临的痛点日益凸显。如何确保大家电在运输过程中的安全、及时送达以及成本控制&#xff0c;成为了物流企业亟待解决的问题。云里物里自研的物流资产监控管理方案&#xff0c;有效解决了大家…

JAVA面试题分享--集合

常见的数据结构&#xff08;了解&#xff09; 常用的数据结构有&#xff1a;数组&#xff0c;栈&#xff0c;队列&#xff0c;链表&#xff0c;树&#xff0c;散列&#xff0c;堆&#xff0c;图等 数组是最常用的数据结构&#xff0c;数组的特点是长度固定&#xff0c;数组的大…

一、交换网络基础

目录 1.交换机的转发行为 2.数据帧的类型 3.ARP地址解析步骤 Hub&#xff1a;物理层设备 交换机&#xff1a;数据链路层设备 1.交换机的转发行为 泛洪&#xff08;Flooding&#xff09;&#xff08;有可能是单播帧&#xff08;未知单播帧&#xff09;&#xff0c;也有可能是…

10GMAC层设计系列-(1)10G Ethernet PCS/PMA

一、引言 对于10G以太网MAC层的实现&#xff0c;Xilinx提供了 3种IP核&#xff0c;分别是 10G Ethernet MAC、10G Ethernet PCS/PMA、10G Ethernet Subsystem。 10G Ethernet MAC只包含MAC层&#xff0c;外部需要提供一个PHY芯片进行数据对齐&#xff0c;10G Ethernet MAC与P…

Python 深度学习(二)

原文&#xff1a;zh.annas-archive.org/md5/98cfb0b9095f1cf64732abfaa40d7b3a 译者&#xff1a;飞龙 协议&#xff1a;CC BY-NC-SA 4.0 第五章&#xff1a;图像识别 视觉可以说是人类最重要的感官之一。我们依赖视觉来识别食物&#xff0c;逃离危险&#xff0c;认出朋友和家人…

Kompas.ai的可持续内容生态:绿色营销的新选择

在全球环境保护意识日益增强的今天&#xff0c;绿色营销已成为企业树立品牌形象、展示社会责任的重要手段。绿色营销不仅关注产品的环保特性&#xff0c;还包括企业的整体可持续发展战略和对环境的积极贡献。本文将讨论企业如何通过绿色营销树立品牌形象&#xff0c;介绍Kompas…

el-cascader 数据回显 checkbox没有被勾选

需求&#xff1a; 需要支持多选以及能搜索&#xff0c;并且 点击所有队伍最新版本这个功能按钮时&#xff0c;要将用户勾选的数据保存的前提下&#xff0c;将满足条件的数据也一并勾选。最后保存的数据 只需要子级的id&#xff0c;组成数组就行了&#xff0c;所以我这里有用到…

ITMS-90426: Invalid Swift Support

原文 Please correct the following issues and upload a new binary to App Store Connect. ITMS-90426: Invalid Swift Support - The SwiftSupport folder is missing. Rebuild your app using the current public (GM) version of Xcode and resubmit it. 解决方式 ITMS-…

U盘提示“未初始化”?别慌,数据还有救!

当你满心期待地将U盘插入电脑&#xff0c;准备传输或读取重要文件时&#xff0c;突然弹出一个提示框&#xff1a;“U盘没有初始化”。遇到这样的情况&#xff0c;相信很多人都会感到焦虑和迷茫。别急&#xff0c;这篇文章将为你详细解析U盘未初始化的原因&#xff0c;并提供有效…

【设计模式】简单工厂模式(Simple Factory Pattern)

工厂模式&#xff08;Factory Pattern&#xff09; 用于创建不同类型的奖品对象。您可以创建一个奖品工厂&#xff0c;根据配置的类型来实例化相应的奖品对象。 public interface Prize {void award(); }public class MoneyPrize implements Prize {Overridepublic void awar…

一、初识Django

简介 Django 是一个用于构建 Web 应用程序的高级 Python Web 框架。 版本对应 不同版本的django框架是基于特定的不同的python版本开发的&#xff0c;所以不同版本的django框架要正常执行功能只能安装特定的python版本 Django安装 安装 Django # 全局安装 pip install dj…

实战干货|Spark 在袋鼠云数栈的深度探索与实践

Spark 是一个快速、通用、可扩展的大数据计算引擎&#xff0c;具有高性能、易用、容错、可以与 Hadoop 生态无缝集成、社区活跃度高等优点。在实际使用中&#xff0c;具有广泛的应用场景&#xff1a; 数据清洗和预处理&#xff1a;在大数据分析场景下&#xff0c;数据通常需要…

C/C++ 入门(9)编译链接

个人主页&#xff1a;仍有未知等待探索-CSDN博客 专题分栏&#xff1a;C 目录 一、域 1、分类 2、搜索顺序 二、编译链接 1、代码在形成可执行文件的过程 2、符号表 三、问题 1、带有缺省参数的函数声明和定义分离 一、域 1、分类 域&#xff1a;全局域、局部域、命…

CSS-IN-JS Emotion

为什么会有css-in-js 优点 缺点 使用emotion插件库 npm i emotion/core emotion/styled使用时需要解析css属性 使用方式一&#xff1a; 通过注释告诉babel不讲jsx转化为react.create Element的调用&#xff0c;而是转化为jsx语法。会导致一个警告react未使用。 使用方式二&am…

对虾病害分类数据集889张7类别

数据集类型&#xff1a;图像分类用&#xff0c;不可用于目标检测无标注文件 数据集格式&#xff1a;仅仅包含jpg图片&#xff0c;每个类别文件夹下面存放着对应图片 图片数量(jpg文件个数)&#xff1a;889 分类类别数&#xff1a;7 类别名称:["baibanbing","bai…

Vitis HLS 学习笔记--Schedule Viewer 调度查看器

目录 1. 简介 2. Schedule Viewer详解 2.1 视图说明 2.1.1 Operation\Control Step 2.1.2 周期关系图 2.1.3 Schedule Viewer 菜单栏 2.1.4 属性视图 2.2 内容说明 2.2.1 实参&#xff08;b&#xff09;解释 2.2.2 实参&#xff08;a&#xff09;解释 2.2.3 变量&am…

TCP协议在物联网中的实战

一、TCP协议介绍 网上对TCP协议介绍众多&#xff0c;本人按照自己的理解简单介绍一下。 TCP&#xff08;Transmission Control Protocol&#xff0c; 传输控制协议&#xff09;是一种面向连接的、可靠的、基于字节流的传输控制层通信协议。 1.1 协议机制 1.1.1 三次握手 &…
最新文章