build: add files of vant-cli 2

This commit is contained in:
陈嘉涵
2019-11-18 16:27:12 +08:00
parent 28e2849087
commit 6514b650d0
46 changed files with 12125 additions and 249 deletions

View File

@@ -0,0 +1,26 @@
function iframeReady(iframe, callback) {
const doc = iframe.contentDocument || iframe.contentWindow.document;
const interval = () => {
if (iframe.contentWindow.changePath) {
callback();
} else {
setTimeout(() => {
interval();
}, 50);
}
};
if (doc.readyState === 'complete') {
interval();
} else {
iframe.onload = interval;
}
}
const ua = navigator.userAgent.toLowerCase();
const isMobile = /ios|iphone|ipod|ipad|android/.test(ua);
export {
isMobile,
iframeReady
};