|
|
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ef3e31dc"],{a358:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var a=n("b775"),o={outApi:"/api/v1/outApi",openDir:"/api/v1/example/openLocalDir",uploadFile:"/api/v1/example/uploadFile",executeJS:"/api/v1/example/executeJS",setShortcut:"/api/v1/example/setShortcut",autoLaunchEnable:"/api/v1/example/autoLaunchEnable",autoLaunchDisable:"/api/v1/example/autoLaunchDisable",autoLaunchIsEnabled:"/api/v1/example/autoLaunchIsEnabled",openSoftware:"/api/v1/example/openSoftware"};function l(e,t){return Object(a["b"])({url:o[e],method:"post",data:t})}},a90d:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",[n("h3",{style:{marginBottom:"16px"}},[e._v(" demo3-1 渲染进程与主进程IPC通信 ")]),n("a-list",{attrs:{bordered:""}},[n("a-input-search",{on:{search:e.helloHandle},model:{value:e.content,callback:function(t){e.content=t},expression:"content"}},[n("a-button",{attrs:{slot:"enterButton"},slot:"enterButton"},[e._v(" send ")])],1)],1)],1),n("div",{staticStyle:{"margin-top":"20px"}},[n("h3",{style:{marginBottom:"16px"}},[e._v(" demo3-2 主进程API执行网页函数 ")]),n("a-list",{attrs:{bordered:""}},[n("a-input-search",{on:{search:e.executeJSHandle},model:{value:e.content2,callback:function(t){e.content2=t},expression:"content2"}},[n("a-button",{attrs:{slot:"enterButton"},slot:"enterButton"},[e._v(" send ")])],1)],1)],1)])},o=[],l=n("a358"),c={data:function(){return{content:"hello",content2:"hello world",reply:""}},methods:{helloHandle:function(e){var t=this;this.$callMain("example.hello",e).then((function(e){t.$message.info(e)}))},executeJSHandle:function(e){Object(l["a"])("executeJS",{str:e}).then((function(e){0==e.code&&console.log(e.data)})).catch((function(e){console.log("err:",e)}))}}},u=c,i=n("2877"),r=Object(i["a"])(u,a,o,!1,null,null,null);t["default"]=r.exports}}]);
|