refactor(browser): 更新浏览器窗口 HTML 加载方式
- 修复空指针bug:在 BrowserWindow 和 BrowserWindowJDialog 类中初始化 htmlUrl 变量为空字符串
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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())
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user