瀏覽代碼

fix(api.js): add `fileDropEnabled` to `WindowOptions`, closes #2968 (#2989)

Amr Bashir 3 年之前
父節點
當前提交
1bfc32a3b2
共有 2 個文件被更改,包括 11 次插入0 次删除
  1. 5 0
      .changes/api-WebviewWindow-fileDropEnabled.md
  2. 6 0
      tooling/api/src/window.ts

+ 5 - 0
.changes/api-WebviewWindow-fileDropEnabled.md

@@ -0,0 +1,5 @@
+---
+"api": patch
+---
+
+Add `fileDropEnabled` property to `WindowOptions` so you can now disable it when creating windows from js.

+ 6 - 0
tooling/api/src/window.ts

@@ -1185,6 +1185,12 @@ interface WindowOptions {
   alwaysOnTop?: boolean
   /** Whether or not the window icon should be added to the taskbar. */
   skipTaskbar?: boolean
+  /**
+   * Whether the file drop is enabled or not on the webview. By default it is enabled.
+   *
+   * Disabling it is required to use drag and drop on the frontend on Windows.
+   */
+  fileDropEnabled?: boolean
 }
 
 /**