@lark-apaas/devtool-kits 1.0.2 → 1.0.3
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 -10
- package/package.json +1 -1
package/dist/error.html
CHANGED
|
@@ -132,31 +132,22 @@
|
|
|
132
132
|
let errorData = {
|
|
133
133
|
message: `{{.errorData.message}}`,
|
|
134
134
|
};
|
|
135
|
-
let locationData = null;
|
|
136
|
-
|
|
137
135
|
// 初始化页面
|
|
138
136
|
function init() {
|
|
139
137
|
// 绑定事件
|
|
140
138
|
document.getElementById('copyBtn').addEventListener('click', handleCopy);
|
|
141
139
|
document.getElementById('repairBtn').addEventListener('click', handleRepair);
|
|
142
140
|
|
|
143
|
-
// 获取当前位置信息
|
|
144
|
-
locationData = {
|
|
145
|
-
pathname: window.location.pathname,
|
|
146
|
-
search: window.location.search,
|
|
147
|
-
hash: window.location.hash,
|
|
148
|
-
};
|
|
149
141
|
// 通知前端,渲染错误页面已准备就绪
|
|
150
142
|
sendPostMessage({
|
|
151
143
|
type: 'PreviewReady'
|
|
152
144
|
});
|
|
153
|
-
|
|
145
|
+
|
|
154
146
|
// 如果有错误对象,发送 postMessage
|
|
155
147
|
if (errorData) {
|
|
156
148
|
sendPostMessage({
|
|
157
149
|
type: 'RenderError',
|
|
158
150
|
data: errorData,
|
|
159
|
-
location: locationData,
|
|
160
151
|
});
|
|
161
152
|
}
|
|
162
153
|
}
|