import { config } from './package.json' const { files,sqlOp } = config import appInit, { electronUseFile, browserInit } from 'electron.main.nx' const appUsePath = electronUseFile({...files}) // import path from 'path' // path.normalize appInit({ icon: appUsePath('icon.png'), appname: "xxxxx" }) .then(async ({ trayInit, browserMenuInit }) => { const { load } = browserInit({ icon: appUsePath('icon.png'), width: 1400, backgroundColor: '#FFFFFF', webPreferences: { // preload: appUsePath('curd.js') } }) // await import('../edsql0/publicsql').then(v=>new v.default(sqlOp,{}).serveInit()) // await import('../edsql0/src/electronServe').then(c => new c.default(sqlOp)) await load.urlDefault('https://www.taobao.com/') }) .catch(console.error) // appexitConfig: { // lebel: 'exit', title: '11111', message: '2222222' // }, // trayWinInit: () => { // const c = browserInit({ // icon: appUseFile('indexicon.png'), // backgroundColor: '#FFFFFF', // webPreferences: { // preload: appUseFile('indexpreload.js') // }, // }) // c.onClose.hideOrShow() // return c.loadUrlDefaultConfig('https://www.taobao.com/') // }, // const browserMenuOp = [ // { // label: 'tb', // click() { // browserInit({}) // .loadUrlDefaultConfig('https://www.taobao.com/') // } // }, // { // label: 'bd', // click() { // browserInit({}) // .loadUrlDefaultConfig('https://www.baidu.com/') // } // }, // { // label: 'jd', // click() { // browserInit({}) // .loadUrlDefaultConfig('https://www.jd.com/') // } // }, // { // label: 'ymx', // click() { // browserInit({}) // .loadUrlDefaultConfig('https://www.amazon.cn/') // } // }, // { // label: 'xx', // click() { // browserInit({}) // .loadUrlDefaultConfig('http://post.eurasia.edu/') // } // }, // { // label: "拖拽生网页", // click: () => browserInit({}) // .loadUrlDefaultConfig("https://landing.ant.design/edit/#uid=5fbecc831ed8fc4de19645f4") // }, // { // label: 'View', // submenu: [ // { role: 'reload' }, // { role: 'forceReload' }, // { role: 'toggleDevTools' }, // { type: 'separator' }, // { role: 'resetZoom' }, // { role: 'zoomIn' }, // { role: 'zoomOut' }, // { type: 'separator' }, // { role: 'togglefullscreen' } // ] // }, // { // label: 'Edit', // submenu: [ // { role: 'undo' }, // { role: 'redo' }, // { type: 'separator' }, // { role: 'cut' }, // { role: 'copy' }, // { role: 'paste' }, // { role: 'pasteAndMatchStyle' }, // { role: 'delete' }, // { role: 'selectAll' }, // { type: 'separator' }, // { // label: 'Speech', // submenu: [ // { role: 'startSpeaking' }, // { role: 'stopSpeaking' } // ] // } // ] // }, // { // label: app.name, // submenu: [ // { role: 'about' }, // { type: 'separator' }, // { role: 'services' }, // { type: 'separator' }, // { role: 'hide' }, // { role: 'unhide' }, // { type: 'separator' }, // { role: 'quit' } // ] // } // ]