vue-jquery
Version:
A Vue.js project
2 lines • 3.36 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("vueJquery",[],t):"object"==typeof exports?exports.vueJquery=t():e.vueJquery=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/dist/",t(t.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o={};o.install=function(e,t){e.prototype.$getoffsetWidth=function(e){return e.offsetWidth},e.prototype.$getoffsetHeight=function(e){return e.offsetHeight},e.prototype.$getClient=function(){return void 0!==window.innerHeight?{width:window.innerWidth,height:window.innerHeight}:"CSS1Compat"===document.compatMode?{width:document.documentElement.clientWidth,height:document.documentElement.clientHeight}:{width:document.body.clientWidth,height:document.body.clientHeight}},e.prototype.$getStyle=function(e,t){return e.currentStyle?e.currentStyle[t]:getComputedStyle(e,!1)[t]},e.prototype.$setCss=function(e,t,n){if(3==arguments.length){var o=0;for(o=0;o<e.length;o++)e[o].style[t]=n}else if(2==arguments.length){if("string"==typeof t)return this.getStyle(e[0],t);for(o=0;o<e.length;o++){var r="";for(r in t)e[o].style[r]=t[r]}}},e.prototype.$setAttr=function(e,t,n){if(3==arguments.length){var o=0;for(o=0;o<e.length;o++)e[o][t]=n}else if(2==arguments.length){if("string"==typeof t)return e[0][t];for(o=0;o<e.length;o++){var r="";for(r in t)e[o][r]=t[r]}}return this},e.prototype.$getTop=function(e){var t=e.offsetTop,n=this;return null!=e.offsetParent&&(t+=n.$getTop(e.offsetParent)),t},e.prototype.$getLeft=function(e){var t=e.offsetLeft,n=this;return null!=e.offsetParent&&(t+=n.$getLeft(e.offsetParent)),t},e.prototype.$removeClass=function(e,t){for(var n=0,o=e.length;n<o;n++)e[n].className.indexOf(t)<0||(e[n].className=e[n].className.replace(t,""))},e.prototype.$addClass=function(e,t){for(var n=0,o=e.length;n<o;n++)""==e[n].className?e[n].className+=t:e[n].className+=" "+t},e.prototype.$setCookie=function(e,t,n){if(3==arguments.length){var o=new Date;o.setTime(n),document.cookie=e+"="+escape(t)+";expires="+o.toGMTString()}else document.cookie=e+"="+escape(t)},e.prototype.$getCookie=function(e){var t=void 0,n=new RegExp("(^| )"+e+"=([^;]*)(;|$)");return(t=document.cookie.match(n))?unescape(t[2]):null},e.prototype.$issupportStorge=function(){if("undefined"==typeof Storage)return alert("当前浏览器不支持Web Storage"),!1},e.prototype.$createRandom=function(e,t,n){for(var o=[],r={};o.length<e;){var i=Math.ceil(Math.random()*(n-t))+t;r[i]||(r[i]=1,o.push(i))}return o},e.prototype.$formatSecond=function(e){var t=parseInt(e),n=0;t>60&&(n="0"+parseInt(t/60))>60&&(n=parseInt(t%60));var o=e-60*n;return o<10&&(o="0"+o),n>0&&(o=n+":"+o),o<=60&&(o="00:"+o),o},e.prototype.$extend=function(e,t){for(var n in t)e[n]=t[n];return e},e.prototype.$back=function(){return!1}},t.default=o}])});
//# sourceMappingURL=vueJquery.js.map