1 Star 1 Fork 0

Wicon.Wang / AntDesignVueWithElectron

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Electron + Ant Design 初始框架

结构

使用 Vue 3 + Vite + Electron + Ant Design 为便于展示,添加了一个很小的模块 tts,另做他用时,在View层删除即可

安装

  1. 请自行安装 node及npm,并建议使用npmmirror至中国区或者cnpm npm install
  2. 在.env.*中配置各环境所使用的后端接口地址
  3. 请在上线前。关闭 app.config.js 文件中的 openDevTools

命令解释

npm run dev   # 本地开发   
npm run build:web # 打包出 Html 至 build-production 目录   
npm run build:electron  # 打包出对应系统的可执行程序至Dist目录 

Web编译支持docker,Linux/MacOS平台可以使用 sh start_docker_web.sh

问题及错误

受GitHub过慢的问题,Windows平台初次编译经常依赖包下载不下来, package.json 中已经使用了镜像,如果还是无法下载,可以在这里(https://registry.npmmirror.com/binary.html)下载到对应包, 然后放置到 C:\Users\你的用户名\AppData\Local\electron-builder\Cache,再重新编译

技术细节

关于路由

本程序添加了自动路由注册,除可以在router/index.ts中指定路由外,您可以在vue文件中添加

  name: 'tts', //路由组件名称
  isRouter: true,  //是否自动为路由
  isComponents: false,  // 是否自动注册为公共组件

会检测到并自动将tts注册为路由,具体的注册项为: {path: '/tts', name: 'TTS'}

可以使用以下代码,进行路由跳转

    const router = useRouter();
    const goHomePage = () => {
      console.log(router);
      router.push({ name: "TEMPFILE" });
    };
MIT License Copyright (c) 2022 Wicon.Wang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

初始框架,可以用于同类技术选型 的后续开发。整合antdesign Vue (ANTD) + electron 使用Typescript 以及Vite 展开 收起
NodeJS
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
NodeJS
1
https://gitee.com/wiconwang/AntDesignVueWithElectron.git
git@gitee.com:wiconwang/AntDesignVueWithElectron.git
wiconwang
AntDesignVueWithElectron
AntDesignVueWithElectron
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891