mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2026-01-19 05:48:17 +00:00
chore: 埋点相关优化
This commit is contained in:
parent
32f0264e45
commit
46951ca4f9
@ -184,7 +184,7 @@ export class BoxResizingInstance extends Component<{
|
|||||||
[npm?.package, npm?.componentName].filter((item) => !!item).join('-') ||
|
[npm?.package, npm?.componentName].filter((item) => !!item).join('-') ||
|
||||||
node?.componentMeta?.componentName ||
|
node?.componentMeta?.componentName ||
|
||||||
'';
|
'';
|
||||||
editor.emit('designer.border.resize', {
|
editor?.emit('designer.border.resize', {
|
||||||
selected,
|
selected,
|
||||||
layout: node?.parent?.getPropValue('layout') || '',
|
layout: node?.parent?.getPropValue('layout') || '',
|
||||||
});
|
});
|
||||||
|
|||||||
@ -130,7 +130,7 @@ function createAction(content: ReactNode | ComponentType<any> | ActionContentObj
|
|||||||
[npm?.package, npm?.componentName].filter((item) => !!item).join('-') ||
|
[npm?.package, npm?.componentName].filter((item) => !!item).join('-') ||
|
||||||
node?.componentMeta?.componentName ||
|
node?.componentMeta?.componentName ||
|
||||||
'';
|
'';
|
||||||
editor?.emit('designer.borders.action', {
|
editor?.emit('designer.border.action', {
|
||||||
name: key,
|
name: key,
|
||||||
target,
|
target,
|
||||||
});
|
});
|
||||||
|
|||||||
@ -272,7 +272,7 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp
|
|||||||
[npm?.package, npm?.componentName].filter((item) => !!item).join('-') ||
|
[npm?.package, npm?.componentName].filter((item) => !!item).join('-') ||
|
||||||
node?.componentMeta?.componentName ||
|
node?.componentMeta?.componentName ||
|
||||||
'';
|
'';
|
||||||
editor.emit('designer.builtinSimulator.select', {
|
editor?.emit('designer.builtinSimulator.select', {
|
||||||
selected,
|
selected,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -434,12 +434,12 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp
|
|||||||
}
|
}
|
||||||
const editor = globalContext.get(Editor);
|
const editor = globalContext.get(Editor);
|
||||||
const npm = node?.componentMeta?.npm;
|
const npm = node?.componentMeta?.npm;
|
||||||
const target =
|
const selected =
|
||||||
[npm?.package, npm?.componentName].filter((item) => !!item).join('-') ||
|
[npm?.package, npm?.componentName].filter((item) => !!item).join('-') ||
|
||||||
node?.componentMeta?.componentName ||
|
node?.componentMeta?.componentName ||
|
||||||
'';
|
'';
|
||||||
editor?.emit('desiger.builtinSimulator.contextmenu', {
|
editor?.emit('desiger.builtinSimulator.contextmenu', {
|
||||||
target: target,
|
selected,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,10 +44,10 @@ export class LiveEditing {
|
|||||||
|
|
||||||
const editor = globalContext.get(Editor);
|
const editor = globalContext.get(Editor);
|
||||||
const npm = node?.componentMeta?.npm;
|
const npm = node?.componentMeta?.npm;
|
||||||
const targetInfo =
|
const selected =
|
||||||
[npm?.package, npm?.componentName].filter((item) => !!item).join('-') || node?.componentMeta?.componentName || '';
|
[npm?.package, npm?.componentName].filter((item) => !!item).join('-') || node?.componentMeta?.componentName || '';
|
||||||
editor?.emit('designer.builinSimulator.LiveEditing', {
|
editor?.emit('designer.builinSimulator.LiveEditing', {
|
||||||
target: targetInfo,
|
selected,
|
||||||
});
|
});
|
||||||
|
|
||||||
let setterPropElement = getSetterPropElement(targetElement, rootElement);
|
let setterPropElement = getSetterPropElement(targetElement, rootElement);
|
||||||
|
|||||||
@ -52,8 +52,8 @@ export default class InstanceNodeSelector extends React.Component<IProps, IState
|
|||||||
[npm?.package, npm?.componentName].filter((item) => !!item).join('-') ||
|
[npm?.package, npm?.componentName].filter((item) => !!item).join('-') ||
|
||||||
node?.componentMeta?.componentName ||
|
node?.componentMeta?.componentName ||
|
||||||
'';
|
'';
|
||||||
editor.emit('designer.border.action', {
|
editor?.emit('designer.border.action', {
|
||||||
name: 'select-node',
|
name: 'select',
|
||||||
selected,
|
selected,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -129,7 +129,7 @@ export class Designer {
|
|||||||
'';
|
'';
|
||||||
this.editor?.emit('designer.drag', {
|
this.editor?.emit('designer.drag', {
|
||||||
time: (endTime - startTime).toFixed(2),
|
time: (endTime - startTime).toFixed(2),
|
||||||
target: nodes
|
selected: nodes
|
||||||
?.map((n) => {
|
?.map((n) => {
|
||||||
if (!n) {
|
if (!n) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -58,7 +58,7 @@ export class SettingsPrimaryPane extends Component<{ editor: Editor }> {
|
|||||||
};
|
};
|
||||||
const selected = getName(current);
|
const selected = getName(current);
|
||||||
const target = getName(node);
|
const target = getName(node);
|
||||||
editor.emit('skeleton.settingsPane.Breadcrumb', {
|
editor?.emit('skeleton.settingsPane.Breadcrumb', {
|
||||||
selected,
|
selected,
|
||||||
target,
|
target,
|
||||||
});
|
});
|
||||||
|
|||||||
@ -110,7 +110,7 @@ export class TitledPanelView extends Component<{ panel: Panel; area?: string }>
|
|||||||
}
|
}
|
||||||
const editor = globalContext.get(Editor);
|
const editor = globalContext.get(Editor);
|
||||||
const panelName = area ? `${area}-${panel.name}` : panel.name;
|
const panelName = area ? `${area}-${panel.name}` : panel.name;
|
||||||
editor.emit('skeleton.panel.toggle', {
|
editor?.emit('skeleton.panel.toggle', {
|
||||||
name: panelName || '',
|
name: panelName || '',
|
||||||
status: panel.visible ? 'show' : 'hide',
|
status: panel.visible ? 'show' : 'hide',
|
||||||
});
|
});
|
||||||
@ -163,7 +163,7 @@ export class PanelView extends Component<{ panel: Panel; area?: string }> {
|
|||||||
}
|
}
|
||||||
const editor = globalContext.get(Editor);
|
const editor = globalContext.get(Editor);
|
||||||
const panelName = area ? `${area}-${panel.name}` : panel.name;
|
const panelName = area ? `${area}-${panel.name}` : panel.name;
|
||||||
editor.emit('skeleton.panel.toggle', {
|
editor?.emit('skeleton.panel.toggle', {
|
||||||
name: panelName || '',
|
name: panelName || '',
|
||||||
status: panel.visible ? 'show' : 'hide',
|
status: panel.visible ? 'show' : 'hide',
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user