Subscribe on changes!

if (document.querySelector(`link[href="${e}"]${n}`)) return; 断网失败

avatar
Jun 4th 2021

What problem does this feature solve?

router: component: () => import(`

return Promise.all(t.map((e=>{
    if (e in Pa)
        return;
    Pa[e] = !0;
    const t = e.endsWith(".css")
      , n = t ? '[rel="stylesheet"]' : "";
    if (document.querySelector(`link[href="${e}"]${n}`))
        return;
    const r = document.createElement("link");
    return r.rel = t ? "stylesheet" : Na,
    t || (r.as = "script",
    r.crossOrigin = ""),
    r.href = e,
    document.head.appendChild(r),
    t ? new Promise(((e,t)=>{
        r.addEventListener("load", e),
        r.addEventListener("error", t)
    }
    )) : void 0
}
))).then((()=>e()))

 if (document.querySelector(`link[href="${e}"]${n}`))
        return;  

头已经加载 但是没加载 。。。 error 怎么加

What does the proposed API look like?

$

avatar
Jun 4th 2021

Hi, thanks for your interest but Github issues are for bug reports and feature requests only. You can ask questions on the forum, the Discord server or StackOverflow.