feat: 各应用的设计器隔离

This commit is contained in:
wangxuefeng
2025-03-19 16:11:29 +08:00
parent a4c5f633cf
commit 9a2f29e3e4
11 changed files with 82 additions and 53 deletions

View File

@@ -25,7 +25,7 @@ onMounted(async () => {
await handshake.then((parent) => {
parent.emit('sync-context', 'y-code-designer is ready');
Object.assign(model, parent.model);
// console.log('get parent model', model);
console.log('get parent model', model);
userStore.setToken(model.accessToken);
localStorage.setItem('y-code-access-token', model.accessToken);
request.useRequest((req) => {
@@ -49,9 +49,7 @@ onMounted(async () => {
widgetManager.set('Previewer', {
props: {
path: (block: any) => {
console.log('block', block);
const pathname = location.pathname;
console.log('pathname', pathname);
return `${pathname}#/preview/${block.id}`;
}
}
@@ -79,6 +77,5 @@ onMounted(async () => {
.designer-container {
width: 100%;
height: 100%;
min-height: calc(100vh - 126px);
}
</style>