electron-vue 踩坑记录

electron-vue 踩坑记录

问题解决
element-ui 的 <el-table> 没有显示.electron-vue/webpack.renderer.config.js 里的
let whiteListedModules = [‘vue’]
改为 let whiteListedModules = [‘vue’,’element-ui’]
远程图片报403错误src/index.ejs
加上
<meta name=”referrer” content=”no-referrer”>
视频403
视频只有声音没图像
打包时, build.js的 tasks 出错代码有bug,重复定义了,在 .electron-vue/build.js 把其中一个task命名改掉
打包时,ReferenceError: Multispinner is not defined代码bug,
先安装
npm install multispinner -D
然后在 .electron-vue/build.js 加上
const Multispinner = require(‘multispinner’)
隐藏菜单栏src/main/index.jsnew BrowserWindow
加上
autoHideMenuBar: true
隐藏标题栏src/main/index.jsnew BrowserWindow
加上 frame: false, 要自己写个头部了
禁止多开src/main/index.js

app.on(‘second-instance’, (event, commandLine, workingDirectory) => {
// 当尝试打开第二个实例时,聚焦到已有的窗口
if (mainWindow) {
if (mainWindow.isMinimized()) {
mainWindow.restore();
}
mainWindow.focus();
}
});

留下回复


Warning: is_dir(): open_basedir restriction in effect. File(/www/wwwroot/my-wordpress/index.php/2023/08/23/electron-vue-%E8%B8%A9%E5%9D%91%E8%AE%B0%E5%BD%95/) is not within the allowed path(s): (/www/wwwroot/my-wordpress/:/tmp/) in /www/wwwroot/my-wordpress/wp-content/plugins/matomo/classes/WpMatomo/AIBotTracking.php on line 175