@lark-apaas/devtool-kits 1.0.1 → 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.
Files changed (2) hide show
  1. package/dist/error.html +4 -9
  2. package/package.json +1 -1
package/dist/error.html CHANGED
@@ -132,27 +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
- };
141
+ // 通知前端,渲染错误页面已准备就绪
142
+ sendPostMessage({
143
+ type: 'PreviewReady'
144
+ });
149
145
 
150
146
  // 如果有错误对象,发送 postMessage
151
147
  if (errorData) {
152
148
  sendPostMessage({
153
149
  type: 'RenderError',
154
150
  data: errorData,
155
- location: locationData,
156
151
  });
157
152
  }
158
153
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lark-apaas/devtool-kits",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "FullStack Devtool Kits",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",