mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 03:01:16 +00:00
fix: fix slot id is automatically generated every time
This commit is contained in:
parent
1f09b639fb
commit
33a4192e2c
@ -401,7 +401,7 @@ export class Prop implements IProp, IPropParent {
|
||||
slotSchema = {
|
||||
componentName: 'Slot',
|
||||
title: value.title || value.props?.slotTitle,
|
||||
id: data.id,
|
||||
id: value.id,
|
||||
name: value.name || value.props?.slotName,
|
||||
params: value.params || value.props?.slotParams,
|
||||
children: value.children,
|
||||
|
||||
@ -518,6 +518,7 @@ describe('Prop 类测试', () => {
|
||||
type: 'JSSlot',
|
||||
value: {
|
||||
componentName: 'Slot',
|
||||
id: 'node_oclei5rv2e2',
|
||||
props: {
|
||||
slotName: "content",
|
||||
slotTitle: "主内容"
|
||||
@ -534,6 +535,7 @@ describe('Prop 类测试', () => {
|
||||
|
||||
expect(slotProp.slotNode?.title).toBe('主内容');
|
||||
expect(slotProp.slotNode?.getExtraProp('name')?.getValue()).toBe('content');
|
||||
expect(slotProp.slotNode?.export()?.id).toBe('node_oclei5rv2e2');
|
||||
|
||||
slotProp.export();
|
||||
|
||||
|
||||
@ -170,7 +170,9 @@ class Renderer extends Component<{
|
||||
this.startTime = Date.now();
|
||||
this.schemaChangedSymbol = false;
|
||||
|
||||
if (!container.autoRender || isRendererDetached()) return null;
|
||||
if (!container.autoRender || isRendererDetached()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const { intl } = createIntl(locale);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user