From 0e0c40a69d0ff2c6496c6467fab1fa03e94bc91b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Mon, 31 Aug 2026 19:16:38 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=20UI=20=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E5=B0=BA=E5=AF=B8=E6=9A=B4=E9=9C=B2=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除 --ui-design-width 与 --ui-design-height 自定义属性 不再在树元数据注释中暴露设计图宽高 --- .../src-tauri/src/ui_editor/html_renderer/mod.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/html_renderer/mod.rs b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/html_renderer/mod.rs index 275d1371d..ce53ef471 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/ui_editor/html_renderer/mod.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/ui_editor/html_renderer/mod.rs @@ -66,14 +66,10 @@ fn render_tree(state: &State, tree: &UITree) -> Result { / finite_positive(image.pixels_per_unit.get(), "UI design pixelsPerUnit")?; let tree_comment = html_comment( "genarrative-ui-tree", - json!({ - "srcUiDesign": tree.src_ui_design.as_str(), - "width": width, - "height": height, - }), + json!({"srcUiDesign": tree.src_ui_design.as_str()}), ); let style = format!( - "position:relative;width:100%;height:auto;min-height:0;aspect-ratio:{width} / {height};--ui-design-width:{width}px;--ui-design-height:{height}px;" + "position:relative;width:100%;height:auto;min-height:0;aspect-ratio:{width} / {height};" ); Ok(html! { (tree_comment)