systemPreferences - systemPreferences.openApplicationInfoEntry()

概述

打开 "系统设置"并进入应用程序信息页面。

基本信息

属性
模块 systemPreferences
类型 Method
鸿蒙支持 支持

OHOS 依赖与基本表现

属性
系统权限依赖 无需申请,module.json5中已经包含所需权限
添加JIT权限 支持
坚盾模式 支持

使用方式差异

属性
使用方式差异 存在差异
差异说明 鸿蒙平台独有接口,单独提供使用Demo,详见Demo

Demo

const { app, BrowserWindow, systemPreferences } = require('electron');
const path = require('path');

function createWindow() {
  const win = new BrowserWindow({
    width: 1000,
    height: 800,
    webPreferences: {
      nodeIntegration: true,
      contextIsolation: false
    }
  });
  // 打开 "系统设置"并进入应用程序信息页面。
  console.log('electron call systemPreferences.openApplicationInfoEntry() result is:',systemPreferences.openApplicationInfoEntry());
}

app.whenReady().then(createWindow);