wip fix
This commit is contained in:
parent
af094f44f2
commit
603e687d70
|
|
@ -70,24 +70,28 @@ export const parseJs = (meta: IMeta) => {
|
||||||
attr.type === "JSXAttribute" &&
|
attr.type === "JSXAttribute" &&
|
||||||
attr.name.type === "JSXIdentifier"
|
attr.name.type === "JSXIdentifier"
|
||||||
) {
|
) {
|
||||||
if (attr.value) {
|
passprop[attr.name.name] = {
|
||||||
if (
|
value: '0',
|
||||||
attr.value.type === "JSXExpressionContainer" &&
|
index: 0,
|
||||||
attr.value.expression.loc
|
};
|
||||||
) {
|
// if (attr.value) {
|
||||||
const loc = attr.value.expression.loc as any;
|
// if (
|
||||||
passprop[attr.name.name] = {
|
// attr.value.type === "JSXExpressionContainer" &&
|
||||||
value: code.substring(loc.start.index, loc.end.index),
|
// attr.value.expression.loc
|
||||||
index: loc.start.index,
|
// ) {
|
||||||
};
|
// const loc = attr.value.expression.loc as any;
|
||||||
} else if (attr.value.loc) {
|
// passprop[attr.name.name] = {
|
||||||
const loc = attr.value.loc as any;
|
// value: code.substring(loc.start.index, loc.end.index),
|
||||||
passprop[attr.name.name] = {
|
// index: loc.start.index,
|
||||||
value: code.substring(loc.start.index, loc.end.index),
|
// };
|
||||||
index: loc.start.index,
|
// } else if (attr.value.loc) {
|
||||||
};
|
// const loc = attr.value.loc as any;
|
||||||
}
|
// passprop[attr.name.name] = {
|
||||||
}
|
// value: code.substring(loc.start.index, loc.end.index),
|
||||||
|
// index: loc.start.index,
|
||||||
|
// };
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ effect={async (local) => {
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Passprop/>
|
<PassProp/>
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue