(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d39eb"],{"5e16":function(t,e,n){"use strict";n.r(e);var s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("el-input",{staticStyle:{width:"20%"},attrs:{type:"text"},model:{value:t.url,callback:function(e){t.url=e},expression:"url"}}),t._v(" "),n("el-button",{attrs:{type:"primary"},on:{click:t.join}},[t._v("连接")]),n("el-button",{attrs:{type:"danger"},on:{click:t.exit}},[t._v("断开")]),n("br"),n("el-input",{attrs:{type:"textarea",rows:9},model:{value:t.message,callback:function(e){t.message=e},expression:"message"}}),n("el-button",{attrs:{type:"info"},on:{click:t.send}},[t._v("发送消息")]),n("br"),n("br"),n("el-input",{attrs:{type:"textarea",rows:9},model:{value:t.text_content,callback:function(e){t.text_content=e},expression:"text_content"}}),t._v(" 返回内容 "),n("br"),n("br")],1)},o=[],i=(n("a15b"),{data:function(){return{url:"ws://192.168.3.188:8080/websocket/message",message:"",text_content:"",ws:null}},created:function(){this.join()},methods:{join:function(){var t=this.url;this.ws=new WebSocket(t);var e=this;this.ws.onopen=function(t){e.text_content=e.text_content+"已经打开连接!\n"},this.ws.onmessage=function(t){console.log(t.data,"sssssssssss"),e.text_content=t.data+"\n"},this.ws.onclose=function(t){e.text_content=e.text_content+"已经关闭连接!\n"}},exit:function(){this.ws&&(this.ws.close(),this.ws=null)},send:function(){this.ws?this.ws.send(this.message):alert("未连接到服务器")}}}),c=i,a=n("2877"),l=Object(a["a"])(c,s,o,!1,null,null,null);e["default"]=l.exports}}]);