UNPKG

@xysfe/actui

Version:

A fantastic mobile ui lib implement by Vue

1 lines 3.06 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["assets/mixins/fixed-input.js"]=t():e["assets/mixins/fixed-input.js"]=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(n){if(o[n])return o[n].exports;var i=o[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var o={};return t.m=e,t.c=o,t.d=function(e,o,n){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="../es",t(t.s=734)}({596:function(e,t,o){"use strict";t.a={data:function(){return{FixedToHtmlScrollY:""}},watch:{isVisible:function(e){e?this.addFixedToHtml():this.removeFixedToHtml()}},mounted:function(){/ip(hone|od).*(micromessenger|mqqbrowser)/i.test(navigator.userAgent)&&window.addEventListener("focusout",this.focusoutWindow,!1)},methods:{focusoutWindow:function(e){e.target&&/(input|select|textarea)/i.test(e.target.tagName)&&window.scrollTo(window.scrollX,window.scrollY)},addFixedToHtml:function(){var e=navigator.userAgent.toLocaleLowerCase().match(/.*os (\d+)_(\d+)_?(\d+)? like.*/);if(e&&e[1]&&e[1]<12&&e[2]&&e[2]<4){console.log("under 11.3.0");var t=document.querySelector("html").className;this.FixedToHtmlScrollY=document.documentElement.scrollTop||window.pageYOffset||document.body.scrollTop||window.scrollY||0,-1===t.indexOf("given_layer_html_fix")&&(document.querySelector("html").className=t+"given_layer_html_fix")}},removeFixedToHtml:function(){var e=document.querySelector("html").className;-1!==e.indexOf("given_layer_html_fix")&&(document.querySelector("html").className=e.replace("given_layer_html_fix",""),window.scrollTo(0,this.FixedToHtmlScrollY))}},destoryed:function(){window.removeEventListener("focusout",this.focusoutWindow,!1)}}},734:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(596),i=o(8),r=Object(i.a)(n.a,void 0,void 0,!1,null,null,null);r.options.__file="src\\mixins\\fixed-input.vue",t.default=r.exports},8:function(e,t,o){"use strict";function n(e,t,o,n,i,r,s,l){e=e||{};var c=typeof e.default;"object"!==c&&"function"!==c||(e=e.default);var u="function"==typeof e?e.options:e;t&&(u.render=t,u.staticRenderFns=o,u._compiled=!0),n&&(u.functional=!0),r&&(u._scopeId=r);var d;if(s?(d=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},u._ssrRegister=d):i&&(d=l?function(){i.call(this,this.$root.$options.shadowRoot)}:i),d)if(u.functional){u._injectStyles=d;var a=u.render;u.render=function(e,t){return d.call(t),a(e,t)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,d):[d]}return{exports:e,options:u}}t.a=n}})});