index.9956a85f.js 1.7 KB

1
  1. import{d as c,a as o,H as i,b as s,I as p,P as n}from"./vendor.74fe2de8.js";/* empty css *//* empty css */import{a as r,i as h}from"./icon_checkbox_default.2fe5d57e.js";const d="_colProtocol_1iira_1",m="_protocolText_1iira_6",f="_boxStyle_1iira_10";var e={colProtocol:d,protocolText:m,boxStyle:f},B=c({name:"protocol",props:{modelValue:{type:Boolean,default:!1}},data(){return{checked:!1,popupStatus:!1,protocolHTML:"",protocolPopup:null}},mounted(){this.checked=this.modelValue,window.addEventListener("hashchange",this.onHash,!1)},unmounted(){window.removeEventListener("hashchange",this.onHash,!1)},watch:{checked(t){this.$emit("update:modelValue",t)}},methods:{onHash(){this.popupStatus=!1},onPopupClose(){if(this.popupStatus=!this.popupStatus,this.popupStatus){const t=this.$route;let u=0;for(let x in t.query)u+=1;const l=window.location.href,a=u>0?"&pto="+ +new Date:"?pto="+ +new Date;history.pushState("","",`${l}${a}`)}else window.history.go(-1);this.protocolPopup&&(this.protocolPopup.scrollTop=0)}},render(){return o("div",{class:e.colProtocol},[o(i,{modelValue:this.checked,"onUpdate:modelValue":t=>this.checked=t},{default:()=>[s("\u6211\u5DF2\u9605\u8BFB\u5E76\u540C\u610F")],icon:t=>o(p,{class:e.boxStyle,name:t.checked?r:h,size:"15"},null)}),o("span",{onClick:this.onPopupClose,class:e.protocolText},[s("\u300A\u9177\u4E50\u79C0\u5E73\u53F0\u670D\u52A1\u534F\u8BAE\u300B")]),o(n,{ref:this.protocolPopup,show:this.popupStatus,position:"bottom",style:{height:"100%"}},{default:()=>[o("div",{class:e.protocolContent},[o("div",{class:e.protocolTitle},[s("\u9177\u4E50\u79C0\u5E73\u53F0\u670D\u52A1\u534F\u8BAE")]),o("div",{class:e.protocolContent},[s("\u5446\u5934\u5446\u8111\u7684\u534F\u8BAE\u5185\u5BB9")])])]})])}});export{B as C};