wip fix
This commit is contained in:
parent
6a1a7cf126
commit
6412caff2e
|
|
@ -97,10 +97,19 @@ export const EdScriptMonaco: FC<{}> = () => {
|
|||
}
|
||||
|
||||
if (p.ui.popup.script.mode === "js") {
|
||||
const w = window as any;
|
||||
const types: any = {};
|
||||
for (const prop of p.global_prop) {
|
||||
types[prop] = "any";
|
||||
for (const prop_name of p.global_prop) {
|
||||
if (prop_name === "_types") continue;
|
||||
types[prop_name] = "any";
|
||||
}
|
||||
|
||||
if (w._types) {
|
||||
for (const [k, v] of Object.entries(w._types)) {
|
||||
types[k] = v;
|
||||
}
|
||||
}
|
||||
|
||||
await monacoTypings(
|
||||
{
|
||||
site_dts: p.site_dts,
|
||||
|
|
|
|||
|
|
@ -87,6 +87,15 @@ else metaOptions = resOpt;
|
|||
|
||||
let mode = prop.meta?.option_mode;
|
||||
if (!mode) mode = "button";
|
||||
|
||||
if (metaOptions && metaOptions.length > 0) {
|
||||
for (const [k, v] of Object.entries(metaOptions)) {
|
||||
if (typeof v === "string") {
|
||||
metaOptions[k as any] = { label: v, value: v };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex items-stretch min-h-[28px]">
|
||||
<EdPropLabel name={name} labelClick={labelClick} />
|
||||
|
|
|
|||
Loading…
Reference in New Issue