Compare commits

...

2 Commits

Author SHA1 Message Date
joylink_fanyuhong
1ac34663fb Merge remote-tracking branch 'origin/develop' into local-test
All checks were successful
CI / Docker-Build (push) Successful in 2m21s
2024-03-27 16:59:18 +08:00
joylink_fanyuhong
4012e3c2f7 psl场景加载调整 2024-03-27 16:57:44 +08:00
2 changed files with 3 additions and 7 deletions

View File

@ -246,7 +246,7 @@ watch(
if (!container) return;
const pslScene = pslStore.getPslScene();
pslScene?.bindDom(container);
await pslScene?.forceReload();
await pslScene?.reload();
if (pslScene) {
pslCanvasWidth.value = pslScene.canvas.width;
pslCanvasHeight.value = pslScene.canvas.height;

View File

@ -12,12 +12,8 @@ export const usePslStore = defineStore('psl', {
getPslScene() {
const lineApp = getLineApp();
if (!lineApp) throw Error('未初始化app');
try {
return lineApp.getScene('psl');
} catch (error) {
const pslScene = initPslScene(lineApp, 'psl');
return pslScene;
}
lineApp.removeScene('psl');
return initPslScene(lineApp, 'psl');
},
setPslParam(pslId: number, pslMapCode: string) {
this.pslId = pslId;