1 |
- !function(){var t=document.createElement("style");t.innerHTML="._colHeader_a7v8p_1{--van-font-weight-bold: 600}._colHeader_a7v8p_1 .van-nav-bar__title,._colHeader_a7v8p_1 .van-icon{color:inherit}._colHeader_a7v8p_1 .van-nav-bar__right>div{line-height:0}._colHeader_a7v8p_1._transparent_a7v8p_11{background-color:transparent}._headerSection_a7v8p_14{position:relative}\n",document.head.appendChild(t),System.register(["./index-legacy.f8641610.js","./index-legacy.90f7f902.js"],(function(t){"use strict";var e,i,n,a,o,r;return{setters:[function(t){e=t.d,i=t.p,n=t.b,a=t.i,o=t.F},function(t){r=t.N}],execute:function(){var c="_colHeader_a7v8p_1",s="_headerSection_a7v8p_14";t("C",e({name:"col-header",props:{title:String,isBack:{type:Boolean,default:!1},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:"#323233"},rightText:String,onClickRight:{type:Function,default:function(){}},border:{type:Boolean,default:!0},onHeaderBack:{type:Function,default:function(){}}},watch:{backIconColor:function(){i({api:"backIconChange",content:{iconStyle:this.backIconColor}})}},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(){i({api:"setBarStatus",content:{status:1}}),i({api:"backIconChange",content:{iconStyle:"black"}})},methods:{navBarInit:function(t){var e=this;i({api:"setBarStatus",content:{status:0}}),i({api:"backIconChange",content:{iconStyle:this.backIconColor||"black"}});var a=sessionStorage.getItem("navHeight"),o=sessionStorage.getItem("titleHeight");a&&o?(this.navBarHeight=Number(a),t&&t()):i({api:"getNavHeight"},(function(i){var n=i.content,a=n.dpi||2;if(n.navHeight){var o=n.navHeight/a;sessionStorage.setItem("navHeight",String(o)),e.navBarHeight=o}if(n.titleHeight){var r=n.titleHeight/a;sessionStorage.setItem("titleHeight",String(r)),e.titleHeight=r}t&&t()})),!n().isApp&&t&&t()},onClickLeft:function(){this.$router.back()},clickRight:function(){this.onClickRight&&this.onClickRight()}},render:function(){var t=this;return a("div",null,[this.$slots.content?a("div",{style:{paddingTop:"".concat(this.navBarHeight,"px"),background:this.background},class:s},[this.$slots.content(this.navBarHeight)]):a(o,null,[a("div",{style:{minHeight:"calc(var(--van-nav-bar-height) + ".concat(this.navBarHeight,"px)")},class:s},[a(r,{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}})]),this.$slots.default?this.$slots.default():null])])}}))}}}))}();
|