@lark-apaas/devtool-kits 0.1.0-alpha.10 → 0.1.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/error.html +1 -24
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/error.html
CHANGED
|
@@ -151,15 +151,6 @@
|
|
|
151
151
|
class="error-image"
|
|
152
152
|
/>
|
|
153
153
|
<p class="title">哎呀,写错代码了</p>
|
|
154
|
-
<p class="description">代理服务出现异常,请查看下方错误日志</p>
|
|
155
|
-
|
|
156
|
-
<div class="error-message" id="errorMessage"></div>
|
|
157
|
-
|
|
158
|
-
<div class="logs-container">
|
|
159
|
-
<div class="logs-box" id="logsBox">
|
|
160
|
-
正在加载日志...
|
|
161
|
-
</div>
|
|
162
|
-
</div>
|
|
163
154
|
|
|
164
155
|
<div class="button-group">
|
|
165
156
|
<button class="button button-copy" id="copyBtn">
|
|
@@ -175,26 +166,12 @@
|
|
|
175
166
|
<script>
|
|
176
167
|
// 全局错误对象
|
|
177
168
|
let errorData = {
|
|
178
|
-
message:
|
|
169
|
+
message: `{{.errorData.message}}`,
|
|
179
170
|
};
|
|
180
171
|
let locationData = null;
|
|
181
172
|
|
|
182
173
|
// 初始化页面
|
|
183
174
|
function init() {
|
|
184
|
-
// 显示错误信息
|
|
185
|
-
const errorMessageEl = document.getElementById('errorMessage');
|
|
186
|
-
const logsBoxEl = document.getElementById('logsBox');
|
|
187
|
-
|
|
188
|
-
if (errorData.message) {
|
|
189
|
-
errorMessageEl.textContent = errorData.message;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
if (errorData.logs) {
|
|
193
|
-
logsBoxEl.textContent = errorData.logs;
|
|
194
|
-
} else {
|
|
195
|
-
logsBoxEl.textContent = '未找到相关错误日志';
|
|
196
|
-
}
|
|
197
|
-
|
|
198
175
|
// 绑定事件
|
|
199
176
|
document.getElementById('copyBtn').addEventListener('click', handleCopy);
|
|
200
177
|
document.getElementById('repairBtn').addEventListener('click', handleRepair);
|
package/dist/index.cjs
CHANGED
|
@@ -28488,7 +28488,7 @@ function injectErrorData(template, errorLogs) {
|
|
|
28488
28488
|
} else {
|
|
28489
28489
|
logsText = "\u672A\u627E\u5230\u76F8\u5173\u9519\u8BEF\u65E5\u5FD7";
|
|
28490
28490
|
}
|
|
28491
|
-
return template.replace(
|
|
28491
|
+
return template.replace("{{.errorData.message}}", `server \u670D\u52A1\u542F\u52A8\u5F02\u5E38\uFF0C\u8BF7\u6839\u636E\u65E5\u5FD7\u4FEE\u590D\u76F8\u5173\u95EE\u9898
|
|
28492
28492
|
${JSON.stringify(logsText)}`);
|
|
28493
28493
|
}
|
|
28494
28494
|
__name(injectErrorData, "injectErrorData");
|