渲染进程
<template>
<div class="hello">
<el-button @click="dowmExcel"> 模板下载</el-button>
</div>
</template>
<script>
export default {
name: 'changeLngLat',
props: {
msg: String
},
data(){
return {
}
},
mounted() {
},
methods: {
dowmExcel(){
window.ipcRenderer.send("dowmLnglat");
}
},
}
</script>
主进程
'use strict'
import {
app,
protocol,
BrowserWindow,
ipcMain,
shell
} from 'electron'
import {
createProtocol
} from 'vue-cli-plugin-electron-builder/lib'
import installExtension, {
VUEJS_DEVTOOLS
} from 'electron-devtools-installer'
var nodeXlsx = require('node-xlsx');
var fs = require('fs');
var path = require("path");
var request = require("request");
const isDevelopment = process.env