From 5e9dd4e4c9c3e6aee458d80cd281f7c2ecdbc375 Mon Sep 17 00:00:00 2001 From: Rizky Date: Sat, 20 Jul 2024 14:02:37 +0700 Subject: [PATCH] fix option --- .../ed/panel/side/prop-instance/prop-option.tsx | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/app/web/src/nova/ed/panel/side/prop-instance/prop-option.tsx b/app/web/src/nova/ed/panel/side/prop-instance/prop-option.tsx index 87c7d1be..fa0d3846 100644 --- a/app/web/src/nova/ed/panel/side/prop-instance/prop-option.tsx +++ b/app/web/src/nova/ed/panel/side/prop-instance/prop-option.tsx @@ -12,6 +12,7 @@ import { propInstanceOnChange } from "./on-change"; type MetaOption = { label: string; + alt?: string; value: any; checked?: boolean; options?: MetaOption[]; @@ -84,8 +85,7 @@ export const EdPropInstanceOptions: FC<{ try { const evn = new Function("arg", `arg["${k}"] = ${v.value}`); evn(arg); - } catch (e) { - } + } catch (e) {} } } } @@ -394,7 +394,7 @@ export const EdPropInstanceOptions: FC<{ ref={(el) => { if (!local.checkbox.width && el) { const bound = el.getBoundingClientRect(); - local.checkbox.width = bound.width; + local.checkbox.width = bound.width + 100; setTimeout(local.render, 500); } }} @@ -529,7 +529,16 @@ const SingleCheckbox = ({ }} > {!is_check ? unchecked : checked} -
{item.label}
+
{item.label}
+
+ {item.alt} +
{item.options &&