//enquire.js 纯 JavaScript 实现的 CSS 媒体查询库importenquireJsfrom"enquire.js";exportfunctionisDef(v){returnv!==undefined&&v!==null;}/** * Remove an item from an array. */exportfunctionremove(arr,item){if(arr.length){constindex=arr.indexOf(item);if(index>-1){returnarr.splice(index,1);}}}exportfunctionisRegExp(v){return_toString.call(v)==="[object RegExp]";}exportfunctionenquireScreen(call){consthandler={match:function(){call&&call(true);},unmatch:function(){call&&call(false);},};enquireJs.register("only screen and (max-width: 767.99px)",handler);}const_toString=Object.prototype.toString;