electron+vue+golang实现GUI

1. electron使用其golang的框架,非官方:astilectron

2. vue打包需要注意

  • 需要指定生成dist目录,加个app,astilection好像默认给加了个app目录
  • 需要指定公用路径
  • route需要使用hash路由,history路由不行
  • eslint在运行的时候会报错,需要去掉

vue.config.js

module.exports = {
  publicPath: '',
  outputDir: 'dist/app',  
    devServer: {
      host: "0.0.0.0",
      port: 9001,         
    }
lintOnSave: false 
  }

router.js

const routerHistory = createWebHashHistory()

const baseUrl = "/platform"
const Router = createRouter({     
    history: routerHistory,
...........

你可能感兴趣的:(electron+vue+golang实现GUI)