mirror of
https://gitee.com/dromara/electron-egg.git
synced 2026-05-14 11:52:07 +08:00
vue updater
This commit is contained in:
@@ -12,7 +12,6 @@ export default {
|
||||
return {};
|
||||
},
|
||||
watch: {},
|
||||
mounted () {},
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -87,7 +87,7 @@ export default {
|
||||
'menu_412' : {
|
||||
icon: 'profile',
|
||||
title: '自动更新',
|
||||
pageName: 'DemoUpdaterIndex',
|
||||
pageName: 'BaseUpdaterIndex',
|
||||
params: {}
|
||||
},
|
||||
'menu_500' : {
|
||||
@@ -96,12 +96,6 @@ export default {
|
||||
pageName: 'BaseSoftwareIndex',
|
||||
params: {}
|
||||
},
|
||||
'menu_600' : {
|
||||
icon: 'profile',
|
||||
title: '系统',
|
||||
pageName: 'BaseSystemIndex',
|
||||
params: {}
|
||||
},
|
||||
'menu_900' : {
|
||||
icon: 'profile',
|
||||
title: '测试',
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { ipcApiRoute, specialIpcRoute } from '@/api/main'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
@@ -40,7 +41,8 @@ export default {
|
||||
methods: {
|
||||
init () {
|
||||
const self = this;
|
||||
self.$ipc.on('app.updater', (event, result) => {
|
||||
this.$ipc.removeAllListeners(specialIpcRoute.appUpdater);
|
||||
this.$ipc.on(specialIpcRoute.appUpdater, (event, result) => {
|
||||
result = JSON.parse(result);
|
||||
self.status = result.status;
|
||||
if (result.status == 3) {
|
||||
@@ -52,8 +54,7 @@ export default {
|
||||
})
|
||||
},
|
||||
checkForUpdater () {
|
||||
const self = this;
|
||||
self.$ipcCallMain('example.checkForUpdater').then(r => {
|
||||
this.$ipcCall(ipcApiRoute.checkForUpdater).then(r => {
|
||||
console.log(r);
|
||||
})
|
||||
},
|
||||
@@ -62,8 +63,7 @@ export default {
|
||||
this.$message.info('没有可用版本');
|
||||
return
|
||||
}
|
||||
const self = this;
|
||||
self.$ipcCallMain('example.downloadApp').then(r => {
|
||||
this.$ipcCall(ipcApiRoute.downloadApp).then(r => {
|
||||
console.log(r);
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user