import{_ as e,aO as s,aP as a,o as t,p as n,w as r,f as d,k as c,t as o,i,$ as u,R as l,b as m,d as f,am as p,H as _}from"./index-2PZN6pGH.js";const v=e({components:{reciver:e({data:()=>({msg:""}),created(){s("cc",this.recive)},beforeDestroy(){a("cc",this.recive)},methods:{recive(e){this.msg=e.msg}}},[["render",function(e,s,a,u,l,m){const f=i;return t(),n(f,null,{default:r((()=>[d(f,{class:"reciver"},{default:r((()=>[c(o(""===l.msg?"等待发送":"收到消息：")+o(l.msg),1)])),_:1})])),_:1})}],["__scopeId","data-v-81cc0f62"]]),sender:e({methods:{send(){let e=parseInt(1e4*Math.random());u("cc",{msg:"From uni.$emit -> "+e})}}},[["render",function(e,s,a,o,u,m){const f=l,p=i;return t(),n(p,{class:"sender-container"},{default:r((()=>[d(f,{type:"primary",onClick:m.send},{default:r((()=>[c("点击发送消息")])),_:1},8,["onClick"])])),_:1})}],["__scopeId","data-v-e6fa5a6e"]]),senderBus:e({methods:{send(){let e=parseInt(1e4*Math.random());u("cc",{msg:"From event bus -> "+e})}}},[["render",function(e,s,a,o,u,m){const f=l,p=i;return t(),n(p,{class:"sender-container"},{default:r((()=>[d(f,{type:"primary",onClick:m.send},{default:r((()=>[c("自定义EventBus")])),_:1},8,["onClick"])])),_:1})}],["__scopeId","data-v-63f0290a"]])},data:()=>({}),methods:{}},[["render",function(e,s,a,c,o,u){const l=m(f("page-head"),_),v=p("reciver"),h=p("sender"),g=p("sender-bus"),b=i;return t(),n(b,null,{default:r((()=>[d(l,{title:"组件通讯示例"}),d(b,{class:"uni-padding-wrap"},{default:r((()=>[d(b,{class:"uni-btn-v"},{default:r((()=>[d(v),d(h),d(g)])),_:1})])),_:1})])),_:1})}]]);export{v as default};
