2 lines
849 B
JavaScript
2 lines
849 B
JavaScript
import{G as e,H as n,J as o,K as t}from"./index.ebbbd618.js";const c=(n,o=!1,t)=>new Promise(((c,s)=>{let r=e();t&&(r=e().in(t)),r[o?"selectAll":"select"](n).boundingClientRect((function(e){return o&&Array.isArray(e)&&e.length||!o&&e?c(e):void s("找不到元素")})).exec()}));function s(e,c="navigateTo"){const s=e.query?`${e.path}?${function(e){let n="";for(const o of Object.keys(e)){const c=e[o],s=encodeURIComponent(o)+"=";if(!r(c))if(console.log(encodeURIComponent(o),t(c)),t(c)){for(const e of Object.keys(c))if(!r(c[e])){n+=encodeURIComponent(o+"["+e+"]")+"="+encodeURIComponent(c[e])+"&"}}else n+=s+encodeURIComponent(c)+"&"}return n.slice(0,-1)}(e.query)}`:e.path;"navigateTo"==c&&n({url:s}),"reLaunch"==c&&o({url:s})}const r=e=>null==e&&void 0===e;const i=(e,n="rpx")=>Object.is(Number(e),NaN)?e:`${e}${n}`;export{i as a,c as g,s as n};
|