mirror of
https://github.com/ArvinLovegood/go-stock.git
synced 2025-07-19 00:00:09 +08:00
feat(frontend):更新页面标题和优化错误处理
- 更新页面标题为 "go-stock:AI赋能股票分析" - 改进全局错误处理,增加错误信息的控制台输出 - 优化设置组件中的错误提示和表单重置逻辑
This commit is contained in:
parent
863e88c579
commit
d79bdc8bc1
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8"/>
|
<meta charset="UTF-8"/>
|
||||||
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
||||||
<title>wails-naive-demo</title>
|
<title>go-stock:AI赋能股票分析</title>
|
||||||
<link href="./src/style.css" rel="stylesheet">
|
<link href="./src/style.css" rel="stylesheet">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -145,7 +145,7 @@ function importConfig(){
|
|||||||
prompt:config.prompt,
|
prompt:config.prompt,
|
||||||
timeout:config.openAiApiTimeOut
|
timeout:config.openAiApiTimeOut
|
||||||
}
|
}
|
||||||
formRef.value.resetFields()
|
// formRef.value.resetFields()
|
||||||
};
|
};
|
||||||
reader.readAsText(file);
|
reader.readAsText(file);
|
||||||
};
|
};
|
||||||
@ -153,25 +153,27 @@ function importConfig(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
window.onerror = function (msg, source, lineno, colno, error) {
|
window.onerror = function (event, source, lineno, colno, error) {
|
||||||
|
console.log(event, source, lineno, colno, error)
|
||||||
// 将错误信息发送给后端
|
// 将错误信息发送给后端
|
||||||
EventsEmit("frontendError", {
|
EventsEmit("frontendError", {
|
||||||
page: "settings.vue",
|
page: "settings.vue",
|
||||||
message: msg,
|
message: event,
|
||||||
source: source,
|
source: source,
|
||||||
lineno: lineno,
|
lineno: lineno,
|
||||||
colno: colno,
|
colno: colno,
|
||||||
error: error ? error.stack : null
|
error: error ? error.stack : null
|
||||||
});
|
});
|
||||||
|
|
||||||
message.error("发生错误:"+msg)
|
|
||||||
|
message.error("发生错误:"+event)
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<n-flex justify="left" style="margin-top: 12px;padding-left: 12px">
|
<n-flex justify="left" style="margin-top: 12px;padding-left: 12px">
|
||||||
<n-form ref="formRef" :model="formValue" :label-placement="'left'" :label-align="'left'" style="width: 100%;height: 100%">
|
<n-form ref="formRef" :label-placement="'left'" :label-align="'left'">
|
||||||
<n-grid :cols="24" :x-gap="24" style="text-align: left">
|
<n-grid :cols="24" :x-gap="24" style="text-align: left">
|
||||||
<n-gi :span="24">
|
<n-gi :span="24">
|
||||||
<n-text type="default" style="font-size: 25px;font-weight: bold">基础设置</n-text>
|
<n-text type="default" style="font-size: 25px;font-weight: bold">基础设置</n-text>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user