桌面应用打开默认全屏功能

 1.修改package.json

在main属性上面引入新的html页面

{
  "main": "/index.html",
  "name": "phadcloud",
  "description": "名称",
  "version": "1.0",
  "keywords": ["名称"],
  "window": {
    "title": "名称",
    "icon": "logo.png",
    "toolbar": true,
    "frame": true,
    "position": "center",
    "min_width": 600,
    "min_height": 400,
    "width": 1920,
    "height": 1080,
    "resizable": true
  },
  "webkit": {
    "plugin": true
  },
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC"
}

2.新建html页面

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script language="javascript" type="text/javascript">
        window.location.href = 'https://跳转的地址';
        var win = require('nw.gui').Window.get();
        win.maximize();
        win.show();

    </script>
</body>

</html>

其他步骤

vue项目使用nw.js打包成桌面应用并修改图标 封装桌面应用_nw.js换图标-CSDN博客

相关推荐

  1. 桌面应用打开默认功能

    2024-07-20 20:02:01       23 阅读
  2. Android 默认打开应用的权限

    2024-07-20 20:02:01       54 阅读
  3. Android去除折叠两边的黑边,默认显示

    2024-07-20 20:02:01       88 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-20 20:02:01       101 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-20 20:02:01       109 阅读
  3. 在Django里面运行非项目文件

    2024-07-20 20:02:01       87 阅读
  4. Python语言-面向对象

    2024-07-20 20:02:01       96 阅读

热门阅读

  1. sqlalchemy打印query的SQL和参数

    2024-07-20 20:02:01       21 阅读
  2. 力扣2336.无限集中的最小数字

    2024-07-20 20:02:01       23 阅读
  3. Perl 语言入门学习

    2024-07-20 20:02:01       24 阅读
  4. 简单工厂模式

    2024-07-20 20:02:01       25 阅读
  5. MySQL基本语法规则 By 尚硅谷

    2024-07-20 20:02:01       21 阅读
  6. 一个线程进入线程池后的工作流程

    2024-07-20 20:02:01       24 阅读
  7. Redis 内部的字符串和字典

    2024-07-20 20:02:01       26 阅读
  8. cordova使用vue进行开发

    2024-07-20 20:02:01       27 阅读
  9. 千字长文讲解python闭包

    2024-07-20 20:02:01       21 阅读
  10. 网友提问:display:flex和display:box有什么区别?

    2024-07-20 20:02:01       24 阅读
  11. 每天一个数据分析题(四百三十八)- A/Btest

    2024-07-20 20:02:01       25 阅读
  12. 为了Python换源,我开发了一个库「pipco 0.0.19」

    2024-07-20 20:02:01       23 阅读
  13. Python3 第十九课 -- 迭代器与生成器

    2024-07-20 20:02:01       28 阅读
  14. SQL

    SQL

    2024-07-20 20:02:01      19 阅读