UNPKG

weex-flymeui

Version:

A Flyme Style UI library based on Weex for Creator.

3 lines (2 loc) 8.45 kB
// { "framework": "Vue" } !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["npm/weex-flymeui/components/fm-loading/index"]=t():e["npm/weex-flymeui/components/fm-loading/index"]=t()}("undefined"!=typeof self?self:this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=134)}({0:function(e,t){e.exports=function(e,t,n,r,o){var i,s=e=e||{},a=typeof e.default;"object"!==a&&"function"!==a||(i=e,s=e.default);var u,c="function"==typeof s?s.options:s;if(t&&(c.render=t.render,c.staticRenderFns=t.staticRenderFns),r&&(c._scopeId=r),o?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},c._ssrRegister=u):n&&(u=n),u){var d=c.functional,f=d?c.render:c.beforeCreate;d?c.render=function(e,t){return u.call(t),f(e,t)}:c.beforeCreate=f?[].concat(f,u):[u]}return{esModule:i,exports:s,options:c}}},1:function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(r),i=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(i).concat([o]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<e.length;o++){var s=e[o];"number"==typeof s[0]&&r[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),t.push(s))}},t}},134:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(135);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return function(e){return e&&e.__esModule?e:{default:e}}(r).default}})},135:function(e,t,n){var r=!1;var o=n(0)(n(138),n(139),function(e){r||n(136)},"data-v-52c2c46d",null);o.options.__file="/Users/suen/Documents/develop/project/weex-flymeui/packages/fm-loading/index.vue",o.esModule&&Object.keys(o.esModule).some(function(e){return"default"!==e&&"__"!==e.substr(0,2)})&&console.error("named exports are not supported in *.vue files."),o.options.functional&&console.error("[vue-loader] index.vue: functional components are not supported with templates, they should use render functions."),e.exports=o.exports},136:function(e,t,n){var r=n(137);"string"==typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);n(2)("97aaeebc",r,!1,{})},137:function(e,t,n){(e.exports=n(1)(!1)).push([e.i,"\n.fm-loading[data-v-52c2c46d] {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n flex-direction: row;\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n -webkit-box-pack: center;\n -webkit-justify-content: center;\n justify-content: center;\n /*兼容H5异常*/\n z-index: 999;\n}\n.loading-wrapper[data-v-52c2c46d] {\n -webkit-box-align: center;\n -webkit-align-items: center;\n align-items: center;\n}\n.loading--text[data-v-52c2c46d] {\n font-size: 0.38889rem;\n font-family: sans-serif-medium;\n font-weight: 500;\n text-align: center;\n}\n",""])},138:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=weex.requireModule("animation");t.default={name:"FmLoading",props:{title:{type:String,default:""},backgroundColor:{type:String,default:"#FFFFFF"},canAutoClose:{type:Boolean,default:!0}},data:function(){return{show:!1,showIn:!1,loadingStart:0,animating:!1}},computed:{wrapperStyle:function(){var e=this.showIn;return{backgroundColor:this.backgroundColor,opacity:e?1:0}}},methods:{handleTouchEnd:function(e){e.preventDefault&&e.preventDefault()},appear:function(e){var t=this;if(!this.animating){var n=this.$refs["fm-loading"];n?(this.animating=!0,r.transition(n,{styles:{opacity:e?1:0},duration:320,timingFunction:"cubic-bezier(0.33, 0, 0.66, 1)"},function(){t.showIn=e,e?t.$emit("fmLoadingAppeared",!1):t.$emit("fmLoadingDisappeared",!1),t.animating=!1})):this.showIn=e}},warpperClicked:function(){this.animating||this.canAutoClose&&this.hide()},active:function(){var e=this;this.show||(this.show=!0,this.loadingStart=(new Date).getTime(),setTimeout(function(){e.appear(!0)},20))},hide:function(){var e=this;if(this.show){this.show=!1;var t=20;(new Date).getTime()-this.loadingStart<=500&&(t=500),setTimeout(function(){e.appear(!1)},t)}}}}},139:function(e,t,n){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[e.show||e.showIn?n("div",{ref:"fm-loading",staticClass:"fm-loading",staticStyle:e.$processStyle(void 0),style:e.$processStyle(e.wrapperStyle),on:{click:e.warpperClicked,touchend:e.handleTouchEnd}},[e.show||e.showIn?n("div",{staticClass:"loading-wrapper",staticStyle:e.$processStyle(void 0),style:e.$processStyle(void 0)},[n("FmLoading",{staticStyle:e.$processStyle(void 0),style:e.$processStyle(void 0),attrs:{text:e.title}})],1):e._e()]):e._e()])},staticRenderFns:[]},e.exports.render._withStripped=!0},2:function(e,t,n){var r="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!r)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var o=n(3),i={},s=r&&(document.head||document.getElementsByTagName("head")[0]),a=null,u=0,c=!1,d=function(){},f=null,l="data-vue-ssr-id",p="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function h(e){for(var t=0;t<e.length;t++){var n=e[t],r=i[n.id];if(r){r.refs++;for(var o=0;o<r.parts.length;o++)r.parts[o](n.parts[o]);for(;o<n.parts.length;o++)r.parts.push(v(n.parts[o]));r.parts.length>n.parts.length&&(r.parts.length=n.parts.length)}else{var s=[];for(o=0;o<n.parts.length;o++)s.push(v(n.parts[o]));i[n.id]={id:n.id,refs:1,parts:s}}}}function m(){var e=document.createElement("style");return e.type="text/css",s.appendChild(e),e}function v(e){var t,n,r=document.querySelector("style["+l+'~="'+e.id+'"]');if(r){if(c)return d;r.parentNode.removeChild(r)}if(p){var o=u++;r=a||(a=m()),t=y.bind(null,r,o,!1),n=y.bind(null,r,o,!0)}else r=m(),t=function(e,t){var n=t.css,r=t.media,o=t.sourceMap;r&&e.setAttribute("media",r);f.ssrId&&e.setAttribute(l,t.id);o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}e.exports=function(e,t,n,r){c=n,f=r||{};var s=o(e,t);return h(s),function(t){for(var n=[],r=0;r<s.length;r++){var a=s[r];(u=i[a.id]).refs--,n.push(u)}t?h(s=o(e,t)):s=[];for(r=0;r<n.length;r++){var u;if(0===(u=n[r]).refs){for(var c=0;c<u.parts.length;c++)u.parts[c]();delete i[u.id]}}}};var g=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function y(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=g(t,o);else{var i=document.createTextNode(o),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(i,s[t]):e.appendChild(i)}}},3:function(e,t){e.exports=function(e,t){for(var n=[],r={},o=0;o<t.length;o++){var i=t[o],s=i[0],a={id:e+":"+o,css:i[1],media:i[2],sourceMap:i[3]};r[s]?r[s].parts.push(a):n.push(r[s]={id:s,parts:[a]})}return n}}})});