feat(原生桌面): 复用窗口新增标签
build.yaml / build (push) Successful in 45s

This commit is contained in:
xiaoqidun committed 2026-10-25 17:33:09 +08:00
1 parent 1c576bde18
commit 1de949abfc
8 files changed
+215 -23

No files matched your search

+7
View File
@@ -726,6 +726,13 @@ class NativeHost {
}
async start(onFiles, onError) {
let launching = Promise.resolve();
this.bridge.on("ofdgo.launch", values => {
launching = launching.then(async () => {
try { await onFiles(values.map(value => new NativeFile(value)), true); }
finally { await this.call("launch.done", {}); }
}).catch(onError);
});
this.bridge.on("ofdgo.files", async values => {
try { await onFiles(values.map(value => new NativeFile(value))); }
catch (error) { onError(error); }