修复参数不带分辨率选择时卡死

This commit is contained in:
shefengchun 2023-02-17 17:30:23 +08:00
parent ff00c6e652
commit 740f175b69
1 changed files with 8 additions and 1 deletions

View File

@ -243,15 +243,17 @@ export default defineComponent({
/**
* 模拟数据完成dom渲染再次获取真实后台数据
*/
let allconfig = JSON.parse("{\"resolution\": [{\"width\": 1024,\"height\": 768}]}");
let allconfig = JSON.parse("{\"resolution\": [{\"width\": 1920,\"height\": 1080}]}");
const options_resolution = computed(() => {
let tmp=[];
if(allconfig.resolution){
for (let index = 0; index < allconfig.resolution.length; index++) {
tmp.push({
label: `${allconfig.resolution[index].width}*${allconfig.resolution[index].height}`,
value: index,
})
}
}
return tmp
})
const child :any = ref(null);
@ -486,11 +488,16 @@ export default defineComponent({
config.value.row = tmp.row;
$store.commit("setfusion_configuration", res?.config);
allconfig = JSON.parse($store.state.fusion_configuration);
if(allconfig.resolution){
for (let index = 0; index < allconfig.resolution.length; index++) {
if(allconfig.resolution.width==allconfig.projector_width&&allconfig.resolution.height==allconfig.projector_height){
now_resolution.value=index
}
}
}else{
allconfig = {resolution: [{width: tmp.projector_width,height: tmp.projector_height}]};
now_resolution.value=0
}
});
get_scenes()
set?.SetBlendingOption("blending_grids_select_ui", "blending")