*.Vue

<template>
  <div id="wrapper">
    <input type="search" name id="search-content" v-model="content" />
    <label for="search-content" @click="openbaidu(content)">百度爬虫</label>
  </div>
</template>

Js

openbaidu (content) {
	if (content) {
		console.log(content)
		this.$electron.ipcRenderer.send('baidu', content)
	}

main/index.js

ipcMain.on('baidu', function (event, arg) {
	console.log(arg)
}
Logo

前往低代码交流专区

更多推荐