wip fix
This commit is contained in:
parent
36459857d9
commit
22dc135947
File diff suppressed because one or more lines are too long
|
|
@ -13,7 +13,6 @@ export const edActionCopy = async (p: PG, item: IContent) => {
|
|||
const walk = (_item: IContent) => {
|
||||
let item = _item;
|
||||
|
||||
|
||||
if (item.type !== "text") {
|
||||
if (item.type === "item" && item.component?.props) {
|
||||
for (const [k, v] of Object.entries(item.component.props)) {
|
||||
|
|
@ -27,7 +26,6 @@ export const edActionCopy = async (p: PG, item: IContent) => {
|
|||
if (child && Object.keys(child).length <= 2) {
|
||||
const meta = p.page.meta[child.id];
|
||||
if (meta) {
|
||||
console.log(meta.item);
|
||||
const new_child = deepClone(meta.item);
|
||||
item.childs[key as any] = new_child;
|
||||
walk(new_child);
|
||||
|
|
@ -36,7 +34,6 @@ export const edActionCopy = async (p: PG, item: IContent) => {
|
|||
}
|
||||
}
|
||||
};
|
||||
|
||||
walk(new_item);
|
||||
|
||||
if (perm.state !== "granted") {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,10 @@ export const edActionCut = async (p: PG, item: IContent) => {
|
|||
};
|
||||
walk(new_item);
|
||||
|
||||
let str = `prasi-clipboard:` + JSON.stringify(item);
|
||||
if (perm.state !== "granted") {
|
||||
await navigator.clipboard.read();
|
||||
}
|
||||
let str = `prasi-clipboard:` + JSON.stringify(new_item);
|
||||
navigator.clipboard.writeText(str);
|
||||
|
||||
const mitem = getMetaById(p, item.id)?.mitem;
|
||||
|
|
|
|||
|
|
@ -66,6 +66,10 @@ export const createViPassProp = (
|
|||
}
|
||||
}
|
||||
|
||||
if (meta.item.name === "nav_menu") {
|
||||
console.log(cmeta);
|
||||
}
|
||||
|
||||
return (
|
||||
<ViRender
|
||||
key={item.id}
|
||||
|
|
|
|||
Loading…
Reference in New Issue