performance-helper 1.0.0 → 1.0.1

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.
@@ -158,13 +158,13 @@ export function highlightElement(element, options) {
158
158
  // 设置高亮样式
159
159
  const { borderColor = '#ff0000', borderWidth = '3px', backgroundColor = 'rgba(255, 255, 0, 0.2)', scrollIntoView = true, } = options || {};
160
160
  // 保存原始样式
161
- const originalOutline = element.style.outline;
161
+ const originalBorder = element.style.border;
162
162
  const originalBoxShadow = element.style.boxShadow;
163
163
  const originalBackgroundColor = element.style.backgroundColor;
164
164
  const originalZIndex = element.style.zIndex;
165
165
  const originalPosition = element.style.position;
166
166
  // 应用高亮样式
167
- element.style.outline = `${borderWidth} solid ${borderColor}`;
167
+ element.style.border = `${borderWidth} solid ${borderColor}`;
168
168
  element.style.boxShadow = `0 0 0 ${borderWidth} ${borderColor}`;
169
169
  element.style.backgroundColor = backgroundColor;
170
170
  element.style.zIndex = '9999';
@@ -177,7 +177,7 @@ export function highlightElement(element, options) {
177
177
  }
178
178
  // 返回移除高亮的函数
179
179
  return () => {
180
- element.style.outline = originalOutline;
180
+ element.style.border = originalBorder;
181
181
  element.style.boxShadow = originalBoxShadow;
182
182
  element.style.backgroundColor = originalBackgroundColor;
183
183
  element.style.zIndex = originalZIndex;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "performance-helper",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "前端性能监控 SDK",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",