chunk-2f42023a.5b250698.js 3.8 KB

12
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2f42023a"],{"254e":function(e,t,o){},"27be":function(e,t,o){"use strict";o.r(t);var n=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{attrs:{id:"app-base-socket-ipc"}},[e._m(0),o("div",{staticClass:"one-block-2"},[o("a-list",{attrs:{bordered:""}},[o("a-input-search",{on:{search:e.helloHandle},model:{value:e.content,callback:function(t){e.content=t},expression:"content"}},[o("a-button",{attrs:{slot:"enterButton"},slot:"enterButton"},[e._v(" send ")])],1)],1)],1),e._m(1),o("div",{staticClass:"one-block-2"},[o("a-list",{attrs:{bordered:""}},[o("a-input-search",{on:{search:e.executeJSHandle},model:{value:e.content2,callback:function(t){e.content2=t},expression:"content2"}},[o("a-button",{attrs:{slot:"enterButton"},slot:"enterButton"},[e._v(" send ")])],1)],1)],1),e._m(2),o("div",{staticClass:"one-block-2"},[o("a-space",[o("a-button",{on:{click:e.socketMsgStart}},[e._v("开始")]),o("a-button",{on:{click:e.socketMsgStop}},[e._v("结束")]),e._v(" 结果:"+e._s(e.socketMessageString)+" ")],1)],1)])},s=[function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"one-block-1"},[o("span",[e._v(" 1. 渲染进程与主进程IPC通信 ")])])},function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"one-block-1"},[o("span",[e._v(" 2. 主进程API执行网页函数 ")])])},function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"one-block-1"},[o("span",[e._v(" 3. 长消息: 服务端持续向前端页面发消息 ")])])}],l=o("a358"),a={data:function(){return{content:"hello",content2:"hello world",reply:"",socketMessageString:""}},mounted:function(){this.init()},methods:{init:function(){var e=this;this.$ipc.removeAllListeners(l["a"].socketMessageStart),this.$ipc.removeAllListeners(l["a"].socketMessageStop),this.$ipc.on(l["a"].socketMessageStart,(function(t,o){console.log("[ipcRenderer] [socketMsgStart] result:",o),e.socketMessageString=o})),this.$ipc.on(l["a"].socketMessageStop,(function(t,o){console.log("[ipcRenderer] [socketMsgStop] result:",o),e.socketMessageString=o}))},helloHandle:function(e){var t=this;this.$ipcCall(l["a"].hello,e).then((function(e){t.$message.info(e)}))},executeJSHandle:function(e){this.$ipcCall(l["a"].executeJS,e).then((function(e){console.log(e)}))},socketMsgStart:function(){this.$ipc.send(l["a"].socketMessageStart,"时间")},socketMsgStop:function(){this.$ipc.send(l["a"].socketMessageStop,"")}}},c=a,r=(o("ef68"),o("2877")),i=Object(r["a"])(c,n,s,!1,null,"19858933",null);t["default"]=i.exports},a358:function(e,t,o){"use strict";o.d(t,"a",(function(){return n})),o.d(t,"b",(function(){return s}));o("b775");var n={messageShow:"controller.example.messageShow",messageShowConfirm:"controller.example.messageShowConfirm",selectFolder:"controller.example.selectFolder",openDirectory:"controller.example.openDirectory",socketMessageStart:"controller.example.socketMessageStart",socketMessageStop:"controller.example.socketMessageStop",hello:"controller.example.hello",executeJS:"controller.example.executeJS",loadViewContent:"controller.example.loadViewContent",removeViewContent:"controller.example.removeViewContent",createWindow:"controller.example.createWindow",sendNotification:"controller.example.sendNotification",initPowerMonitor:"controller.example.initPowerMonitor",getScreen:"controller.example.getScreen",openSoftware:"controller.example.openSoftware",autoLaunch:"controller.example.autoLaunch",setTheme:"controller.example.setTheme",getTheme:"controller.example.getTheme",checkForUpdater:"controller.example.checkForUpdater",downloadApp:"controller.example.downloadApp",dbOperation:"controller.example.dbOperation",uploadFile:"controller.example.uploadFile"},s={appUpdater:"app.updater"}},ef68:function(e,t,o){"use strict";o("254e")}}]);
  2. //# sourceMappingURL=chunk-2f42023a.5b250698.js.map