feat: update package.json to remove lint-staged, add eslint configuration and dependencies

feat: add state management for recording in RecordeReplayPage component

refactor: remove bridge and storage services as they are no longer needed

chore: update tsconfig.json for improved type checking and module resolution

fix: update downloadHtml function to use eventWithTime type and improve formatting

fix: add error logging in formatWithZone function for better debugging
This commit is contained in:
雨霖铃
2026-01-31 18:00:01 +08:00
parent 88a612f9cf
commit 4213e70697
18 changed files with 3437 additions and 135 deletions
+6 -6
View File
@@ -1,8 +1,8 @@
// import rrwebPlayer from 'rrweb-player';
import { eventWithTime } from 'rrweb';
export const downloadHtml = (events) => {
export const downloadHtml = (events: eventWithTime[]) => {
if (events.length === 0) return;
// 1. 构建 HTML 模板字符串
// 我们将 events 数据直接注入到 <script> 标签中
const htmlContent = `
@@ -39,9 +39,9 @@ export const downloadHtml = (events) => {
</body>
</html>
`;
// 2. 创建 Blob 并下载
const blob = new Blob([htmlContent], {type: 'text/html'});
const blob = new Blob([htmlContent], { type: 'text/html' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
@@ -50,4 +50,4 @@ export const downloadHtml = (events) => {
a.click();
document.body.removeChild(a);
URL.revokeObjectURL(url);
};
};