Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

集成到自己的项目中页面一直加载不出来 #604

Open
hcxy1551 opened this issue May 10, 2024 · 4 comments
Open

集成到自己的项目中页面一直加载不出来 #604

hcxy1551 opened this issue May 10, 2024 · 4 comments

Comments

@hcxy1551
Copy link

hcxy1551 commented May 10, 2024

m-editor设置v-model绑定了dsl,
如果dsl的items没有设置type为page就可以加载个空的,
1
dsl:
export default {
type: 'app',
id: '75f0extui9d7yksklx27hff8xg',
name:'test',
items: [
{
type:'text',
id:'text_1',
name: '文本',
text: 'Tmagic editor 营销活动编辑器',
multiple: true,
events: [],
}
],
};

如果设置了page就会一直加载,
dsl:
export default {
type: 'app',
id: '75f0extui9d7yksklx27hff8xg',
name:'test',
items: [
{
type: 'page',
id: 'page_1',
title: '文本',
name: '',
layout: 'absolute',
events:[],
created:{},
items:[
{
type:'text',
id:'text_1',
name: '文本',
text: 'Tmagic editor 营销活动编辑器',
multiple: true,
events: [],
}
]
}
],
};
效果:
1111

我看代码仓库里面组件集componentGroupList也没有配置dsl初始化的组件呐

@jia000
Copy link
Collaborator

jia000 commented May 13, 2024

这是runtime没有加载完成,检查一下runtimeUrl是否正确,看看runtimeUrl对应的请求是否请求成功

@hcxy1551
Copy link
Author

测试了一下页面的内容都渲染出来了,但是还是一直在加载中,后台也没有任何报错
image

@jia000
Copy link
Collaborator

jia000 commented May 22, 2024

是在runtime中的这行代码触发loading关闭的

page && window.magic.onPageElUpdate(page);

可以看看是否调用成功了

在编辑器中,如果想关闭loading也可以调用

editorService.set('stageLoading', false);

onPageElUpdate最终也是调用editorService.set('stageLoading', false);

@jia000
Copy link
Collaborator

jia000 commented May 22, 2024

测试了一下页面的内容都渲染出来了,但是还是一直在加载中,后台也没有任何报错 image

你这个没有page啊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants