Skip to content

Commit f62d8f5

Browse files
committed
选择表自动触发查询
1 parent fa57a4e commit f62d8f5

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

src/background.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict'
22

3-
import { app, protocol, BrowserWindow, Menu, shell } from 'electron'
3+
import { app, protocol, BrowserWindow, Menu } from 'electron'
44
import { createProtocol } from 'vue-cli-plugin-electron-builder/lib'
55
import api from './api'
66
// import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer'
@@ -103,6 +103,20 @@ app.on('ready', async () => {
103103
}
104104
]
105105
},
106+
{
107+
label: '&Window',
108+
submenu: [
109+
{ role: 'minimize' },
110+
{ role: 'zoom' },
111+
{ role: 'close' }
112+
]
113+
},
114+
{
115+
label: '&File',
116+
submenu: [
117+
{ role: 'quit' }
118+
]
119+
},
106120
{
107121
label: '&About',
108122
submenu: [
@@ -116,6 +130,9 @@ app.on('ready', async () => {
116130
}
117131
}
118132
]
133+
},
134+
{
135+
role: 'about'
119136
}
120137
]
121138
}

src/views/CustomBuild.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
</el-select>
2020
</el-form-item>
2121
<el-form-item label="" prop="">
22-
<el-button type="primary" @click="query">查询</el-button>
2322
<el-button type="warning" @click="nextStep">下一步</el-button>
2423
</el-form-item>
2524
</el-form>
@@ -135,6 +134,11 @@ export default {
135134
ipcRenderer.send('queryAllTables', val)
136135
}
137136
},
137+
'form.table': {
138+
handler () {
139+
this.query()
140+
}
141+
},
138142
connection () {
139143
ipcRenderer.send('showDatabase')
140144
},

0 commit comments

Comments
 (0)