index-legacy.dda51a96.js 5.7 KB

1234567891011
  1. ;(function(){var __vite_style__=document.createElement('style');__vite_style__.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_9vc6f_1{--van-font-weight-bold: 600}._colHeader_9vc6f_1 .van-nav-bar__title,._colHeader_9vc6f_1 .van-icon{color:inherit}._colHeader_9vc6f_1 .van-nav-bar__right>div{line-height:0}._colHeader_9vc6f_1._transparent_9vc6f_11{background-color:transparent}._headerSection_9vc6f_14{position:relative;--van-nav-bar-arrow-size: .58667rem}\n";document.head.appendChild(__vite_style__);System.register(['./index-legacy.4b2d517a.js','./vendor-legacy.73abbe39.js'],function(exports){'use strict';var postMessage,browser,defineComponent,createVNode,Fragment,NavBar;return{setters:[function(module){postMessage=module.p;browser=module.d;},function(module){defineComponent=module.d;createVNode=module.b;Fragment=module.F;NavBar=module.N;}],execute:function execute(){var index='';var colHeader="_colHeader_9vc6f_1";var transparent="_transparent_9vc6f_11";var headerSection="_headerSection_9vc6f_14";var styles={colHeader:colHeader,transparent:transparent,headerSection:headerSection};var ColHeader=exports('C',defineComponent({name:'col-header',props:{title:String,isBack:{type:Boolean,default:false},backIconColor:{// 返回按钮颜色
  2. type:String,default:'black'},isFixed:{type:Boolean,default:true},styleName:{type:Object,default:function _default(){return{};}},titleClass:String,background:{type:String,default:'white'},color:{type:String,default:'#323233'},rightText:String,onClickRight:{type:Function,default:function _default(){}},border:{type:Boolean,default:true},onHeaderBack:{// 头部高度设置后返回
  3. type:Function,default:function _default(){}}},watch:{backIconColor:function backIconColor(){// 设置返回按钮颜色
  4. postMessage({api:'backIconChange',content:{iconStyle:this.backIconColor}});}},data:function data(){return{headerTitle:null,navBarHeight:0,// 顶部导航栏高度
  5. titleHeight:44// 顶部导航高度(默认44px)
  6. };},mounted:function mounted(){var _this=this;this.headerTitle=this.title||this.$route.meta.title;this.navBarInit(function(){_this.onHeaderBack&&_this.onHeaderBack();});},unmounted:function unmounted(){// 设置是否显示导航栏 0 显示 1 不显示
  7. postMessage({api:'setBarStatus',content:{status:1}});// 设置返回按钮颜色
  8. postMessage({api:'backIconChange',content:{iconStyle:'black'}});},methods:{navBarInit:function navBarInit(callBack){var _this2=this;// 设置是否显示导航栏 0 不显示 1 显示
  9. postMessage({api:'setBarStatus',content:{status:0}});// 设置返回按钮颜色
  10. postMessage({api:'backIconChange',content:{iconStyle:this.backIconColor||'black'}});var sNavHeight=sessionStorage.getItem('navHeight');var sTitleHeight=sessionStorage.getItem('titleHeight');if(sNavHeight&&sTitleHeight){this.navBarHeight=Number(sNavHeight);callBack&&callBack();}else{postMessage({api:'getNavHeight'},function(res){var content=res.content;var dpi=content.dpi||2;if(content.navHeight){var navHeight=content.navHeight/dpi;sessionStorage.setItem('navHeight',String(navHeight));_this2.navBarHeight=navHeight;}if(content.titleHeight){// 导航栏的高度
  11. var titleHeight=content.titleHeight/dpi;sessionStorage.setItem('titleHeight',String(titleHeight));_this2.titleHeight=titleHeight;}callBack&&callBack();});}!browser().isApp&&callBack&&callBack();},onClickLeft:function onClickLeft(){this.$router.back();},clickRight:function clickRight(){this.onClickRight&&this.onClickRight();}},render:function render(){var _this3=this;return createVNode("div",null,[this.$slots.content?createVNode("div",{"style":{paddingTop:"".concat(this.navBarHeight,"px"),background:this.background},"class":styles.headerSection},[this.$slots.content(this.navBarHeight)]):createVNode(Fragment,null,[createVNode("div",{"style":{minHeight:"calc(var(--van-nav-bar-height) + ".concat(this.navBarHeight,"px)")},"class":styles.headerSection},[createVNode(NavBar,{"title":this.headerTitle,"class":[styles.colHeader],"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 right(){return _this3.$slots.right&&_this3.$slots.right()||_this3.rightText;}})]),this.$slots.default?this.$slots.default():null])]);}}));}};});})();