index-legacy.87bcd48f.js 7.4 KB

1
  1. !function(){function t(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var a,r,i=[],o=!0,l=!1;try{for(n=n.call(t);!(o=(a=n.next()).done)&&(i.push(a.value),!e||i.length!==e);o=!0);}catch(c){l=!0,r=c}finally{try{o||null==n.return||n.return()}finally{if(l)throw r}}return i}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return n(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);"Object"===a&&t.constructor&&(a=t.constructor.name);if("Map"===a||"Set"===a)return Array.from(t);if("Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return n(t,e)}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,a=new Array(e);n<e;n++)a[n]=t[n];return a}var a=document.createElement("style");a.innerHTML=":root{--van-nav-bar-height: 1.22667rem;--van-nav-bar-background-color: var(--van-background-color-light);--van-nav-bar-arrow-size: .42667rem;--van-nav-bar-icon-color: var(--van-primary-color);--van-nav-bar-text-color: var(--van-primary-color);--van-nav-bar-title-font-size: var(--van-font-size-lg);--van-nav-bar-title-text-color: var(--van-text-color);--van-nav-bar-z-index: 1}.van-nav-bar{position:relative;z-index:var(--van-nav-bar-z-index);line-height:var(--van-line-height-lg);text-align:center;background:var(--van-nav-bar-background-color);-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-nav-bar--fixed{position:fixed;top:0;left:0;width:100%}.van-nav-bar--safe-area-inset-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.van-nav-bar .van-icon{color:var(--van-nav-bar-icon-color)}.van-nav-bar__content{position:relative;display:flex;align-items:center;height:var(--van-nav-bar-height)}.van-nav-bar__arrow{margin-right:var(--van-padding-base);font-size:var(--van-nav-bar-arrow-size)}.van-nav-bar__title{max-width:60%;margin:0 auto;color:var(--van-nav-bar-title-text-color);font-weight:var(--van-font-weight-bold);font-size:var(--van-nav-bar-title-font-size)}.van-nav-bar__left,.van-nav-bar__right{position:absolute;top:0;bottom:0;display:flex;align-items:center;padding:0 var(--van-padding-md);font-size:var(--van-font-size-md)}.van-nav-bar__left{left:0}.van-nav-bar__right{right:0}.van-nav-bar__text{color:var(--van-nav-bar-text-color)}._colHeader_nq1uz_1{--van-font-weight-bold: 600}._colHeader_nq1uz_1 .van-nav-bar__left{padding:0 .34667rem}._colHeader_nq1uz_1 .van-nav-bar__title,._colHeader_nq1uz_1 .van-icon{color:inherit}._colHeader_nq1uz_1 .van-nav-bar__title{font-size:.48rem}._colHeader_nq1uz_1 .van-icon{font-size:.64rem}._colHeader_nq1uz_1 .van-nav-bar__right>div{line-height:0}._colHeader_nq1uz_1._transparent_nq1uz_20{background-color:transparent}._headerSection_nq1uz_23{position:relative;--van-nav-bar-arrow-size: .58667rem}\n",document.head.appendChild(a),System.register(["./ResizeObserver.es-legacy.8d60aee1.js"],(function(n){"use strict";var a,r,i,o,l,c,s,v,u,h,d,f,g,b,p,_,m;return{setters:[function(t){a=t.U,r=t.V,i=t.X,o=t.Y,l=t.j,c=t.E,s=t.G,v=t.H,u=t.d,h=t.ae,d=t.aU,f=t.aV,g=t.N,b=t.O,p=t.n,_=t.f,m=t.F}],execute:function(){var k=n("u",(function(t){var e=a(),n=function(){e.value=o(t).height};return r((function(){i(n),setTimeout(n,100)})),e}));var x=e(c("nav-bar"),2),y=x[0],H=x[1],z={title:String,fixed:Boolean,zIndex:s,border:v,leftText:String,rightText:String,leftArrow:Boolean,placeholder:Boolean,safeAreaInsetTop:Boolean},S=u({name:y,props:z,emits:["click-left","click-right"],setup:function(e,n){var r=n.emit,i=n.slots,o=a(),c=function(t,e){var n=k(t);return function(t){return l("div",{class:e("placeholder"),style:{height:n.value?"".concat(n.value,"px"):void 0}},[t()])}}(o,H),s=function(t){return r("click-left",t)},v=function(t){return r("click-right",t)},u=function(){var n,a=e.title,r=e.fixed,c=e.border,u=e.zIndex,b=h(u),p=e.leftArrow||e.leftText||i.left,_=e.rightText||i.right;return l("div",{ref:o,style:b,class:[H({fixed:r}),(n={},t(n,f,c),t(n,"van-safe-area-top",e.safeAreaInsetTop),n)]},[l("div",{class:H("content")},[p&&l("div",{class:[H("left"),d],onClick:s},[i.left?i.left():[e.leftArrow&&l(g,{class:H("arrow"),name:"arrow-left"},null),e.leftText&&l("span",{class:H("text")},[e.leftText])]]),l("div",{class:[H("title"),"van-ellipsis"]},[i.title?i.title():a]),_&&l("div",{class:[H("right"),d],onClick:v},[i.right?i.right():l("span",{class:H("text")},[e.rightText])])])])};return function(){return e.fixed&&e.placeholder?c(u):u()}}}),B=n("N",b(S)),C="_colHeader_nq1uz_1",T="_headerSection_nq1uz_23";n("C",u({name:"col-header",props:{title:String,isBack:{type:Boolean,default:!0},backIconColor:{type:String,default:"black"},isFixed:{type:Boolean,default:!0},styleName:{type:Object,default:function(){return{}}},titleClass:String,background:{type:String,default:"white"},color:{type:String,default:"#131415"},rightText:String,onClickRight:{type:Function,default:function(){}},border:{type:Boolean,default:!0},onHeaderBack:{type:Function,default:function(){}},hideHeader:{type:Boolean,default:!1},leftClickDefault:{type:Boolean,default:!0}},emits:["leftClick"],watch:{backIconColor:function(){p({api:"backIconChange",content:{iconStyle:this.backIconColor}})},title:function(){this.headerTitle=this.title}},data:function(){return{headerTitle:null,navBarHeight:0,titleHeight:44}},mounted:function(){var t=this;this.headerTitle=this.title||this.$route.meta.title,this.navBarInit((function(){t.onHeaderBack&&t.onHeaderBack()}))},unmounted:function(){p({api:"setBarStatus",content:{status:1}}),p({api:"backIconChange",content:{iconStyle:"black"}})},methods:{navBarInit:function(t){var e=this;p({api:"setBarStatus",content:{status:0}}),p({api:"backIconChange",content:{iconStyle:this.backIconColor||"black"}});var n=sessionStorage.getItem("navHeight"),a=sessionStorage.getItem("titleHeight");n&&a?(this.navBarHeight=Number(n),t&&t()):p({api:"getNavHeight"},(function(n){var a=n.content,r=a.dpi||2;if(a.navHeight){var i=a.navHeight/r;sessionStorage.setItem("navHeight",String(i)),e.navBarHeight=i}if(a.titleHeight){var o=a.titleHeight/r;sessionStorage.setItem("titleHeight",String(o)),e.titleHeight=o}t&&t()})),!_().isApp&&t&&t()},onClickLeft:function(){this.$emit("leftClick",null),p({api:"setStatusBarTextColor",content:{statusBarTextColor:!1}}),this.leftClickDefault&&(_().isApp?p({api:"goBack"}):this.$router.back())},clickRight:function(){this.onClickRight&&this.onClickRight()}},render:function(){var t=this;return this.hideHeader?l("div",null,null):l("div",null,[this.$slots.content?l("div",{style:{paddingTop:"".concat(this.navBarHeight,"px"),background:this.background},class:T},[this.$slots.content(this.navBarHeight)]):l(m,null,[l("div",{style:{minHeight:"calc(var(--van-nav-bar-height) + ".concat(this.navBarHeight,"px)")},class:T},[l(B,{title:this.headerTitle,class:[C],style:{background:this.background,color:this.color,paddingTop:"".concat(this.navBarHeight,"px"),zIndex:99},"left-arrow":this.isBack,rightText:this.rightText,fixed:this.isFixed,border:this.border,"onClick-right":this.clickRight,"onClick-left":this.onClickLeft},{right:function(){return t.$slots.right&&t.$slots.right()||t.rightText},title:function(){return t.$slots.title&&t.$slots.title()||t.headerTitle}})]),this.$slots.default?this.$slots.default():null])])}}))}}}))}();