12345 |
- /**
- * Skipped minification because the original files appears to be already minified.
- * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
- */
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.RemFit=t():e.RemFit=t()}(self,(function(){return(()=>{"use strict";var e={579:(e,t,r)=>{var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),i=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.proportion=t,this.useDpr=r,"boolean"!=typeof this.useDpr&&(this.useDpr=!1)}return n(e,[{key:"init",value:function(){var e=document.documentElement,t=1;this.useDpr&&(t=Math.round(window.devicePixelRatio||1));var r=Number((1/t).toFixed(2)),n=document.querySelector('meta[name="viewport"]');n?n.setAttribute("content","width=device-width,user-scalable=no, initial-scale="+r+",maximum-scale="+r+", minimum-scale="+r):((n=document.createElement("meta")).setAttribute("name","viewport"),n.setAttribute("content","width=device-width,user-scalable=no, initial-scale="+r+",maximum-scale="+r+", minimum-scale="+r),document.getElementsByTagName("head")[0].appendChild(n));var i=Number((window.innerWidth/this.proportion).toFixed(2));e.setAttribute("data-standard",this.proportion),e.setAttribute("data-dpr",t),e.style.setProperty("font-size",i+"px","important")}}],[{key:"remove",value:function(){var e=document.documentElement,t=document.querySelector('meta[name="viewport"]');t&&t.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"),e.removeAttribute("data-standard"),e.removeAttribute("data-dpr"),e.style.fontSize=""}}]),e}(),o=r(306);console.log("%c感谢使用"+o.name+",当前版本:%c v"+o.version+"\n%c如果你觉得"+o.name+"还不错,不妨去github点个star\ngithub地址:%c"+o.repository.url,"color:#808080;","color:#008a00","color:#808080;","color:#008a00"),e.exports=i},306:e=>{e.exports=JSON.parse('{"name":"rem-fit","version":"1.4.2","description":"一款使用rem适配web页面的轻量级插件","main":"dist/rem-fit.js","private":false,"scripts":{"serve":"cross-env NODE_ENV=development webpack","build":"cross-env NODE_ENV=production webpack"},"author":"lingkai","license":"MIT","dependencies":{},"babel":{"presets":["env"],"plugins":[]},"devDependencies":{"babel-core":"^6.26.3","babel-loader":"^7.1.5","babel-preset-env":"^1.7.0","cross-env":"^7.0.3"},"repository":{"type":"git","url":"https://github.com/lovelin0523/rem-fit"}}')}},t={};return function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}(579)})()}));
|