https://github.com/juckz/linux-cockpit
Linux webOS,基于Electron,效果录屏:https://www.bilibili.com/video/BV1it4y11712
https://github.com/juckz/linux-cockpit
electron linux-desktop vue vue-router vuex webos
Last synced: about 2 months ago
JSON representation
Linux webOS,基于Electron,效果录屏:https://www.bilibili.com/video/BV1it4y11712
- Host: GitHub
- URL: https://github.com/juckz/linux-cockpit
- Owner: JuckZ
- Created: 2020-03-15T09:44:53.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-14T03:33:39.000Z (over 3 years ago)
- Last Synced: 2025-10-06T19:37:20.265Z (9 months ago)
- Topics: electron, linux-desktop, vue, vue-router, vuex, webos
- Language: Vue
- Homepage: https://www.bilibili.com/video/BV1it4y11712
- Size: 116 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# linux-cockpit
## Screen recording
[](https://www.bilibili.com/video/BV1it4y11712)
## Project setup
```
yarn install
```
### Compiles and hot-reloads for development
```
yarn serve
```
### Compiles and minifies for production
```
yarn build
```
### Lints and fixes files
```
yarn lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
## 项目创建步骤
// 工具 nodemon http-server 等 可以在测试时候使用
yarn global add typescript @vue/cli
vue create linux-cockpit
// 注意less版本一定是2.x.x,不然会报错,也可以使用3,但是需要配置
yarn add less@2.7.3 less-loader node-sass sass-loader electron babel-plugin-import -D //babel-plugin-import 是一个用于按需加载组件代码和样式的 babel 插件
yarn add ant-design-vue vue-router vuex ssh2 xterm koa koa-static @koa/router koa-views axios vue-axios @koa/cors@2 xterm-addon-attach xterm-addon-fit xterm-addon-search graphql vue-apollo apollo-boost apollo-server-koa socket.io
vue3安装graphql也可使用vue add apollo
使用 vue-cli 3 的小伙伴,修改babel.config.js文件,配置 babel-plugin-import
```babel.config.js
module.exports = {
presets: ["@vue/app"],
+ plugins: [
+ [
+ "import",
+ { libraryName: "ant-design-vue", libraryDirectory: "es", style: true }
+ ]
+ ]
};
```
package.json中修改vue的配置,将publicPath修改为合适的值,然后添加运行脚本,方便启动调试
vue.config.js中配置less,以便自定义antdesign主题,和支持less3版本以上
module.exports = {
css: {
loaderOptions: {
less: {
modifyVars: {
'primary-color': '#1DA57A',
'link-color': '#1DA57A',
'border-radius-base': '2px',
},
javascriptEnabled: true
}
}
}
}