electron-egg electron-egg
首页
  • v4.x
  • v3.x
  • v2.x
插件
  • v4.x
  • v3.x
demo
支持
知识点
案例
交流
  • GitHub (opens new window)
  • Gitee (opens new window)
首页
  • v4.x
  • v3.x
  • v2.x
插件
  • v4.x
  • v3.x
demo
支持
知识点
案例
交流
  • GitHub (opens new window)
  • Gitee (opens new window)
❤️成为赞助商
  • 教程

  • ee-bin

  • ee-core

    • addon

    • bin
    • config
    • const
    • const/channel
    • controller
    • core
    • cross
    • ee
    • electron
    • electron/app
    • electron/window
    • exception
    • httpclient
    • jobs
    • jobs/ChildJob
    • jobs/ChildPoolJob
    • loader
    • log
    • message
    • message/childMessage
    • ps
    • services
    • socket
    • storage
    • storage/jsondb
    • storage/sqlite
    • tools
    • this-app

      • app对象说明
      • 插件模块
      • 配置
        • electron
        • http客户端
        • 日志
        • request
        • response
        • service
      • utils
      • utils/helper
      • utils/is
      • utils/json
      • utils/time
      • utils/ip
      • utils/get-port
      • oldUtils
    • ee-go

    目录

    配置

    # 介绍

    获取配置文件对象;该对象根据当前环境变量的不同,返回的结果不同。

    # 推荐

    请升级 ee-core >= v2.2.0 ,使用模块化的api。

    # 使用方法:

    this.app.config
    

    属性说明:

    # env

    环境变量,local-本地,prod-生产环境

    # name

    应用名称

    # baseDir

    框架中electron目录路径。如果使用加密功能,打包后路径为 ./public/electron

    # HOME

    APP根目录路径

    # homeDir

    APP根目录路径

    # root

    获取root目录 (dev:项目根目录,prod:APP在操作系统中的数据目录)

    # appUserDataDir

    APP在操作系统中的数据目录,与环境变量无关

    # userHome

    操作系统用户的home目录

    # appVersion

    APP版本号

    # isPackaged

    APP是否已经打包

    # execDir

    APP安装后,可执行程序(exe、dmg、dep)的根目录

    # logger

    APP日志配置

    # socketServer

    内置socket服务配置

    # developmentMode

    APP类型配置

    # openDevTools

    开发者工具栏

    # openAppMenu

    APP顶部菜单栏

    # windowsOption

    主窗口属性配置

    # remoteUrl

    APP远程类型(web)

    # autoUpdate

    自动升级配置

    # awakeProtocol

    唤醒协议配置

    # tray

    托盘栏配置

    # testConfig

    用户自定义配置

    # config值举例

    # 值
    {
      "env": "local",
      "name": "ee",
      "baseDir": "D:\\www\\xing\\ee\\electron",
      "HOME": "D:\\www\\xing\\ee",
      "rundir": "D:\\www\\xing\\ee\\electron\\run",
      "dump": {
        "ignore": {}
      },
      "homeDir": "D:\\www\\xing\\ee",
      "root": "D:\\www\\xing\\ee",
      "appUserDataDir": "C:\\Users\\gaoshuaixing\\AppData\\Roaming\\ee",
      "userHome": "C:\\Users\\gaoshuaixing",
      "appVersion": "2.0.3",
      "isPackaged": false,
      "execDir": "D:\\www\\xing\\ee",
      "logger": {
        "dir": "D:\\www\\xing\\ee\\logs",
        "encoding": "utf8",
        "env": "local",
        "level": "INFO",
        "consoleLevel": "INFO",
        "disableConsoleAfterReady": false,
        "outputJSON": false,
        "buffer": true,
        "appLogName": "ee-2022-03-04.log",
        "coreLogName": "ee-core.log",
        "agentLogName": "ee-agent.log",
        "errorLogName": "ee-error-2022-03-04.log",
        "coreLogger": {},
        "allowDebugAtProd": false,
        "enablePerformanceTimer": false,
        "type": "application"
      },
      "httpclient": {
        "enableDNSCache": false,
        "dnsCacheLookupInterval": 10000,
        "dnsCacheMaxLength": 1000,
        "request": {
          "timeout": 5000
        },
        "httpAgent": {
          "keepAlive": true,
          "freeSocketTimeout": 4000,
          "maxSockets": 9007199254740991,
          "maxFreeSockets": 256
        },
        "httpsAgent": {
          "keepAlive": true,
          "freeSocketTimeout": 4000,
          "maxSockets": 9007199254740991,
          "maxFreeSockets": 256
        }
      },
      "socketServer": {
        "port": 7070,
        "isDynamic": false
      },
      "developmentMode": {
        "default": "vue",
        "mode": {
          "vue": {
            "hostname": "localhost",
            "port": 8080
          },
          "react": {
            "hostname": "localhost",
            "port": 3000
          },
          "html": {
            "hostname": "localhost",
            "indexPage": "index.html"
          }
        }
      },
      "openDevTools": false,
      "openAppMenu": true,
      "windowsOption": {
        "width": 980,
        "height": 650,
        "minWidth": 800,
        "minHeight": 650,
        "webPreferences": {
          "contextIsolation": false,
          "nodeIntegration": true
        },
        "frame": true
      },
      "remoteUrl": {
        "enable": false,
        "url": "https://discuz.chat/"
      },
      "autoUpdate": {
        "windows": false,
        "macOS": false,
        "linux": false,
        "options": {
          "provider": "generic",
          "url": "http://kodo.qiniu.com/"
        },
        "force": false
      },
      "awakeProtocol": {
        "protocol": "ee",
        "args": []
      },
      "tray": {
        "title": "EE程序",
        "icon": "/public/images/tray_logo.png"
      },
      "testConfig": {
        "login": "http://local.com/api/login"
      },
      "coreMiddlewares": [],
      "coreMiddleware": [],
      "appMiddlewares": [],
      "appMiddleware": []
    }
    
    上次更新: 2025/06/06, 07:21:49
    插件模块
    electron

    ← 插件模块 electron→

    Theme by Vdoing | Copyright © 2023-2025 哆啦好梦 | 京ICP备15041380号-2
    • 跟随系统
    • 浅色模式
    • 深色模式
    • 阅读模式
    ×