Giter Site home page Giter Site logo

electron-vue-typescript-demo's Introduction

归档

因本项目太拉胯了,又因项目里还有一个B站的二维码登陆流程以后可以参考,就不删了,归档了

electron vue ts 完美方案

创建electron-vue+typescript项目

请直接用@vue/cli+electron-builder

下载@vue/cli后,使用命令

vue create projectName
# 选择自定义配置 并选上 TypeScript
# 进入项目目录
cd projectName
# 添加 electron-builder
vue add electron-builder

详情:vue-cli-plugin-electron-builder

electron-vue-typescript-demo

该项目使用 electron-vue 创建,项目javascript全部替换成了typescript

本项目用于学习交流,自带一个完善的 B 站的二维码登录(其实是懒得删)


各种功能

  • .electron-vue webpack、electron 打包配置

  • main/index.js electron 窗口设置

  • src/renderer/

    • main.ts 程序入口
    • enums/ 枚举类
    • router/index.ts 路由,vue-router typescript 版
    • store/index.ts vuex 引入 modules 文件夹中的 index.ts,然后把所有 modules 放进 vuex
    • store/modules/index.ts 导出该文件夹下其他文件,如果有新的,可以参考 User.ts 添加
    • components/ 组件,有顶部控制栏、左侧列表、右侧还不知道干嘛用的侧边栏
    • views/ 页面,也就是中间显示的东西,用 router 控制
  • src/types/ 类型声明,有需要可在 global.d.ts 增加类型

  • src/utils/ 工具,也会自动导出所有工具,具体详情请查看 index.ts 中的说明

electron-vue-typescript-demo's People

Contributors

imba97 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.