refactor(browser): 更新浏览器窗口 HTML 加载方式

- 修复空指针bug:在 BrowserWindow 和 BrowserWindowJDialog 类中初始化 htmlUrl 变量为空字符串
This commit is contained in:
tzdwindows 7
2025-08-17 14:14:11 +08:00
parent 2598e25168
commit be88f3829a
3 changed files with 3 additions and 3 deletions

View File

@@ -52,7 +52,7 @@ public class BrowserWindow extends JFrame {
private boolean resizable = true; // 默认允许调整大小
private boolean maximizable = true; // 默认允许最大化
private boolean minimizable = true; // 默认允许最小化
private String htmlUrl;
private String htmlUrl = "";
public Builder resizable(boolean resizable) {

View File

@@ -53,7 +53,7 @@ public class BrowserWindowJDialog extends JDialog {
private boolean resizable = true; // 默认允许调整大小
private boolean maximizable = true; // 默认允许最大化
private boolean minimizable = true; // 默认允许最小化
private String htmlUrl;
private String htmlUrl = "";
public Builder resizable(boolean resizable) {

View File

@@ -41,7 +41,7 @@ public class MainApplication {
WindowRegistry.getInstance().createNewWindow("main", builder ->
window.set(builder.title("Axis Innovators Box AI 工具箱")
.size(1280, 720)
.htmlUrl("https://chat.deepseek.com/")
.htmlPath("C:\\Users\\Administrator\\Downloads\\deepseek_html_20250817_d94647.html")
.operationHandler(createOperationHandler())
.build())
);