mirror of
https://github.com/alibaba/lowcode-engine.git
synced 2025-12-12 11:20:11 +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 = {
|
slotSchema = {
|
||||||
componentName: 'Slot',
|
componentName: 'Slot',
|
||||||
title: value.title || value.props?.slotTitle,
|
title: value.title || value.props?.slotTitle,
|
||||||
id: data.id,
|
id: value.id,
|
||||||
name: value.name || value.props?.slotName,
|
name: value.name || value.props?.slotName,
|
||||||
params: value.params || value.props?.slotParams,
|
params: value.params || value.props?.slotParams,
|
||||||
children: value.children,
|
children: value.children,
|
||||||
|
|||||||
@ -518,6 +518,7 @@ describe('Prop 类测试', () => {
|
|||||||
type: 'JSSlot',
|
type: 'JSSlot',
|
||||||
value: {
|
value: {
|
||||||
componentName: 'Slot',
|
componentName: 'Slot',
|
||||||
|
id: 'node_oclei5rv2e2',
|
||||||
props: {
|
props: {
|
||||||
slotName: "content",
|
slotName: "content",
|
||||||
slotTitle: "主内容"
|
slotTitle: "主内容"
|
||||||
@ -534,6 +535,7 @@ describe('Prop 类测试', () => {
|
|||||||
|
|
||||||
expect(slotProp.slotNode?.title).toBe('主内容');
|
expect(slotProp.slotNode?.title).toBe('主内容');
|
||||||
expect(slotProp.slotNode?.getExtraProp('name')?.getValue()).toBe('content');
|
expect(slotProp.slotNode?.getExtraProp('name')?.getValue()).toBe('content');
|
||||||
|
expect(slotProp.slotNode?.export()?.id).toBe('node_oclei5rv2e2');
|
||||||
|
|
||||||
slotProp.export();
|
slotProp.export();
|
||||||
|
|
||||||
|
|||||||
@ -170,7 +170,9 @@ class Renderer extends Component<{
|
|||||||
this.startTime = Date.now();
|
this.startTime = Date.now();
|
||||||
this.schemaChangedSymbol = false;
|
this.schemaChangedSymbol = false;
|
||||||
|
|
||||||
if (!container.autoRender || isRendererDetached()) return null;
|
if (!container.autoRender || isRendererDetached()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
const { intl } = createIntl(locale);
|
const { intl } = createIntl(locale);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user