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") {
|
if (p.ui.popup.script.mode === "js") {
|
||||||
|
const w = window as any;
|
||||||
const types: any = {};
|
const types: any = {};
|
||||||
for (const prop of p.global_prop) {
|
for (const prop_name of p.global_prop) {
|
||||||
types[prop] = "any";
|
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(
|
await monacoTypings(
|
||||||
{
|
{
|
||||||
site_dts: p.site_dts,
|
site_dts: p.site_dts,
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,15 @@ else metaOptions = resOpt;
|
||||||
|
|
||||||
let mode = prop.meta?.option_mode;
|
let mode = prop.meta?.option_mode;
|
||||||
if (!mode) mode = "button";
|
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 (
|
return (
|
||||||
<div className="flex items-stretch min-h-[28px]">
|
<div className="flex items-stretch min-h-[28px]">
|
||||||
<EdPropLabel name={name} labelClick={labelClick} />
|
<EdPropLabel name={name} labelClick={labelClick} />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue