This commit is contained in:
Rizky 2023-12-13 11:41:05 +07:00
parent 5ba16aa05d
commit 518a493084
3 changed files with 35 additions and 4 deletions

View File

@ -69,6 +69,33 @@ export const viEvalScript = (
...exports, ...exports,
...scope, ...scope,
}; };
if (meta.item.adv?.js?.includes("Table")) {
// meta.item.adv.jsBuilt = `render(
// React.createElement(
// React.Fragment,
// null,
// React.createElement(TableVirtuoso, {
// style: { height: "100%" },
// data: isEditor ? [list.items[0]] : list.items,
// overscan: 500,
// endReached: typeof end_scroll == "function" ? end_scroll : void 0,
// components: {
// Table: ({ style: e, ...t }) => {
// React.createElement("table", {
// ...t,
// style: { ...e, width: "100%" },
// })
// },
// },
// itemContent: local.renderRow,
// })
// )
// );
// `;
// scope.list.items = [];
console.log(scope.list);
}
const fn = new Function( const fn = new Function(
...Object.keys(arg), ...Object.keys(arg),
`// ${meta.item.name}: ${meta.item.id} `// ${meta.item.name}: ${meta.item.id}

View File

@ -11,6 +11,7 @@ export const createViPassProp = (
if (!meta.scope.val) { if (!meta.scope.val) {
meta.scope.val = {}; meta.scope.val = {};
} }
for (const [k, v] of Object.entries(arg)) { for (const [k, v] of Object.entries(arg)) {
if (k !== "children") { if (k !== "children") {
meta.scope.val[k] = v; meta.scope.val[k] = v;

View File

@ -41,11 +41,14 @@ export const cssFont = (
` `
color: ${font.color}; color: ${font.color};
`, `,
` font.whitespace === "whitespace-normal" &&
word-break: ${ `
font.whitespace === "whitespace-normal" ? "break-word" : "normal" word-break: break-word;
};
`, `,
font.whitespace === "whitespace-nowrap" &&
`
white-space: nowrap;
`,
font.color && font.color &&
` `
color: ${font.color}; color: ${font.color};