|
@@ -1102,16 +1102,30 @@ const open = async (flag: boolean = false) => {
|
|
}
|
|
}
|
|
} else if (flag) {
|
|
} else if (flag) {
|
|
const data: any =JSON.parse(await localforage.getItem(localStorageName));
|
|
const data: any =JSON.parse(await localforage.getItem(localStorageName));
|
|
- if(!data.background){
|
|
|
|
- data.background = '#1e2430';
|
|
|
|
- }
|
|
|
|
- if(!data.color){
|
|
|
|
- data.color = '#bdc7db';
|
|
|
|
- }
|
|
|
|
- if(!data.width){data.width= 1920};
|
|
|
|
- if(!data.height){data.height= 1080};
|
|
|
|
- if (data) {
|
|
|
|
- meta2d.open(data);
|
|
|
|
|
|
+ if(!data){
|
|
|
|
+ meta2d.open({
|
|
|
|
+ name: '新建项目',
|
|
|
|
+ pens: [],
|
|
|
|
+ background: '#1e2430',
|
|
|
|
+ color: '#bdc7db',
|
|
|
|
+ width:1920,
|
|
|
|
+ height:1080,
|
|
|
|
+ enableMock: true,
|
|
|
|
+ folder: route.query.folder,
|
|
|
|
+ tags: route.query.tags ? [route.query.tags] : null,
|
|
|
|
+ } as any);
|
|
|
|
+ }else{
|
|
|
|
+ if(!data.background){
|
|
|
|
+ data.background = '#1e2430';
|
|
|
|
+ }
|
|
|
|
+ if(!data.color){
|
|
|
|
+ data.color = '#bdc7db';
|
|
|
|
+ }
|
|
|
|
+ if(!data.width){data.width= 1920};
|
|
|
|
+ if(!data.height){data.height= 1080};
|
|
|
|
+ if (data) {
|
|
|
|
+ meta2d.open(data);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
} else if (!sessionStorage.getItem('opening')) {
|
|
} else if (!sessionStorage.getItem('opening')) {
|
|
meta2d.open({
|
|
meta2d.open({
|