ax-custom-title.js 3.1 KB

12345678910
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/ax-custom-title/ax-custom-title"],{"148a":function(t,e,n){"use strict";n.r(e);var i=n("1e2f"),a=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=a.a},"1e2f":function(t,e,n){"use strict";(function(t){var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=i(n("7eb4")),o=i(n("ee10")),u=i(n("c053")),r={name:"ax-custom-title",props:{title:{type:String,default:""},unlock:{type:Boolean,default:!1}},data:function(){return{titleText:"",visible:!1,padding:"0px",height:"auto"}},created:function(){var e=this;return(0,o.default)(a.default.mark((function n(){var i,o,r,c,s,f,l,d,p,h;return a.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.systemInfo();case 2:if(i=n.sent,e.visible=i.windowHeight===i.screenHeight,0!=e.visible){n.next=6;break}return n.abrupt("return");case 6:o={top:0,left:0,right:0,bottom:0,width:0,height:0},0===i.uniPlatform.indexOf("mp-")&&(o=t.getMenuButtonBoundingClientRect()),r=i.windowWidth-(o.right||i.windowWidth-10),c={top:o.top,left:r,right:(o.width||-1*r)+2*r,bottom:r,componentHeight:o.top+o.height+r,statusBarHeight:i.statusBarHeight},s="".concat(c.top,"px"),f="".concat(c.left,"px"),l="".concat(c.right,"px"),d="".concat(c.bottom,"px"),["windows","mac"].includes(i.platform)&&(s=0,d=0,l=f,o.height=45,0!=e.unlock||e.$slots.default||(e.visible=!1)),e.padding=[s,l,d,f].join(" "),e.height="".concat(o.height||50,"px"),p=Array.from(getCurrentPages()).pop(),h=u.default.pages.find((function(t){return t.path==p.route})),e.titleText=h.style.navigationBarTitleText,e.$emit("display",c);case 21:case"end":return n.stop()}}),n)})))()},computed:{pages:function(){return getCurrentPages()}},methods:{systemInfo:function(){return new Promise((function(e,n){t.getSystemInfo({success:function(t){return e(t)},fail:function(t){return n(t)}})}))},back:function(){t.navigateBack({delta:1})}}};e.default=r}).call(this,n("df3c")["default"])},6448:function(t,e,n){},"6da2":function(t,e,n){"use strict";n.r(e);var i=n("e421"),a=n("148a");for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);n("cf53");var u=n("828b"),r=Object(u["a"])(a["default"],i["b"],i["c"],!1,null,"bb38a6d6",null,!1,i["a"],void 0);e["default"]=r.exports},cf53:function(t,e,n){"use strict";var i=n("6448"),a=n.n(i);a.a},e421:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this.$createElement,e=(this._self._c,this.visible?this.pages.length:null);this.$mp.data=Object.assign({},{$root:{g0:e}})},a=[]}}]);
  2. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  3. 'components/ax-custom-title/ax-custom-title-create-component',
  4. {
  5. 'components/ax-custom-title/ax-custom-title-create-component':(function(module, exports, __webpack_require__){
  6. __webpack_require__('df3c')['createComponent'](__webpack_require__("6da2"))
  7. })
  8. },
  9. [['components/ax-custom-title/ax-custom-title-create-component']]
  10. ]);