|
|
+import{d as c,b as o,u as p,f as s,I as n,P as i}from"./vendor.f8cdf923.js";import"./index.a7c0c7b3.js";import"./index.16a831eb.js";import{a as r,i as d}from"./icon_checkbox_default.2fe5d57e.js";import{C as h}from"./index.4a6e1440.js";const f="_colProtocol_wgzww_1",m="_protocolText_wgzww_6",w="_boxStyle_wgzww_10";var e={colProtocol:f,protocolText:m,boxStyle:w},S=c({name:"protocol",props:{showHeader:{type:Boolean,default:!1},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(p,{modelValue:this.checked,"onUpdate:modelValue":t=>this.checked=t},{default:()=>[s("\u6211\u5DF2\u9605\u8BFB\u5E76\u540C\u610F")],icon:t=>o(n,{class:e.boxStyle,name:t.checked?r:d,size:"15"},null)}),o("span",{onClick:this.onPopupClose,class:e.protocolText},[s("\u300A\u9177\u4E50\u79C0\u5E73\u53F0\u670D\u52A1\u534F\u8BAE\u300B")]),o(i,{ref:this.protocolPopup,show:this.popupStatus,position:"bottom",style:{height:"100%"}},{default:()=>[this.showHeader&&o(h,{title:"\u9177\u4E50\u79C0\u5E73\u53F0\u670D\u52A1\u534F\u8BAE"},null),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{S as C};
|