|
|
+(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ae66c8d4"],{"2e16":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",{attrs:{id:"app-demo-window"}},[t._m(0),n("div",{staticClass:"one-block-2"},[n("a-space",[n("a-button",{on:{click:function(e){return t.checkForUpdater()}}},[t._v("检查更新")]),n("a-button",{on:{click:function(e){return t.download()}}},[t._v("下载并安装")])],1)],1),t._m(1),n("div",{staticClass:"one-block-2"},[n("a-progress",{attrs:{percent:t.percentNumber,status:"active"}}),n("a-space",[t._v(" "+t._s(t.progress)+" ")])],1)])},c=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"one-block-1"},[n("span",[t._v(" 1. 自动更新 ")])])},function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"one-block-1"},[n("span",[t._v(" 2. 下载进度 ")])])}],a={data:function(){return{status:0,progress:"",percentNumber:0}},mounted:function(){this.init()},methods:{init:function(){var t=this;t.$ipc.on("app.updater",(function(e,n){n=JSON.parse(n),t.status=n.status,3==n.status?(t.progress=n.desc,t.percentNumber=n.percentNumber):t.$message.info(n.desc)}))},checkForUpdater:function(){var t=this;t.$ipcCallMain("example.checkForUpdater").then((function(t){console.log(t)}))},download:function(){if(1===this.status){var t=this;t.$ipcCallMain("example.downloadApp").then((function(t){console.log(t)}))}else this.$message.info("没有可用版本")}}},o=a,i=(n("e4d1"),n("2877")),r=Object(i["a"])(o,s,c,!1,null,"4c883c70",null);e["default"]=r.exports},a00b:function(t,e,n){},e4d1:function(t,e,n){"use strict";n("a00b")}}]);
|