Yanzhen Yu
2026-04-01 12:00:00 +08:00
parent e65160697b
commit c7966070ef
2 changed files with 6 additions and 3 deletions

View File

@@ -309,8 +309,11 @@ function serializeNode(
}
if (needBlock) {
const { width, height } = (n as HTMLElement).getBoundingClientRect();
attributes.rr_width = `${width}px`;
attributes.rr_height = `${height}px`;
attributes = {
class: attributes.class,
rr_width: `${width}px`,
rr_height: `${height}px`,
};
}
return {
type: NodeType.Element,