魔墙:保持显示器宽高不变

This commit is contained in:
miao 2023-03-06 15:33:35 +08:00
parent 67d3799550
commit 7a0842ea24
1 changed files with 15 additions and 14 deletions

View File

@ -2019,8 +2019,8 @@ export default defineComponent({
}, },
closeWindow(item: test_monitor, index: number) { closeWindow(item: test_monitor, index: number) {
current_index.value = -1; current_index.value = -1;
item.cmw = Math.round(item.w / lcm.value); // item.cmw = Math.round(item.w / lcm.value);
item.cmh = Math.round(item.h / lcm.value); // item.cmh = Math.round(item.h / lcm.value);
test_monitor_list.value[item.id] = JSON.parse( test_monitor_list.value[item.id] = JSON.parse(
JSON.stringify(test_monitor_wall.value[index]) JSON.stringify(test_monitor_wall.value[index])
); );
@ -2029,16 +2029,17 @@ export default defineComponent({
test_monitor_list.value[item.id].isHide = false; test_monitor_list.value[item.id].isHide = false;
test_monitor_wall.value[index].isShow = false; test_monitor_wall.value[index].isShow = false;
multiple_select.value = []; multiple_select.value = [];
test_monitor_wall.value.splice(temp_index, 1);
realtime_upload(); realtime_upload();
}, },
closeOtherWindows(item: test_monitor, index: number) { closeOtherWindows(item: test_monitor, index: number) {
current_index.value = index; current_index.value = index;
test_monitor_wall.value.forEach((ele) => { // test_monitor_wall.value.forEach((ele) => {
ele.cmh = Math.round(ele.h / lcm.value); // ele.cmh = Math.round(ele.h / lcm.value);
ele.cmw = Math.round(ele.w / lcm.value); // ele.cmw = Math.round(ele.w / lcm.value);
test_monitor_list.value[ele.id].cmh = Number(JSON.stringify(ele.cmh)); // test_monitor_list.value[ele.id].cmh = Number(JSON.stringify(ele.cmh));
test_monitor_list.value[ele.id].cmw = Number(JSON.stringify(ele.cmw)); // test_monitor_list.value[ele.id].cmw = Number(JSON.stringify(ele.cmw));
}); // });
test_monitor_list.value.forEach((element) => { test_monitor_list.value.forEach((element) => {
element.isHide = false; element.isHide = false;
}); });
@ -2052,12 +2053,12 @@ export default defineComponent({
closeAllWindows() { closeAllWindows() {
sort_index.value = []; sort_index.value = [];
current_index.value = -1; current_index.value = -1;
test_monitor_wall.value.forEach((ele) => { // test_monitor_wall.value.forEach((ele) => {
ele.cmh = Math.round(ele.h / lcm.value); // ele.cmh = Math.round(ele.h / lcm.value);
ele.cmw = Math.round(ele.w / lcm.value); // ele.cmw = Math.round(ele.w / lcm.value);
test_monitor_list.value[ele.id].cmh = Number(JSON.stringify(ele.cmh)); // test_monitor_list.value[ele.id].cmh = Number(JSON.stringify(ele.cmh));
test_monitor_list.value[ele.id].cmw = Number(JSON.stringify(ele.cmw)); // test_monitor_list.value[ele.id].cmw = Number(JSON.stringify(ele.cmw));
}); // });
test_monitor_list.value.forEach((element) => { test_monitor_list.value.forEach((element) => {
element.isHide = false; element.isHide = false;
}); });