修复div大小获取失败时发出错误

This commit is contained in:
shefengchun 2023-01-30 14:11:42 +08:00
parent 6765c47ef3
commit 3607edc45a
2 changed files with 13 additions and 1 deletions

View File

@ -323,6 +323,7 @@ export default defineComponent({
}; };
const setpoa = () => { const setpoa = () => {
try {
points[0].x = 0; points[0].x = 0;
points[0].y = 0; points[0].y = 0;
@ -366,6 +367,9 @@ export default defineComponent({
} else { } else {
} }
set_point_x(); set_point_x();
} catch (error) {
}
}; };
watch( watch(
() => four[0], () => four[0],

View File

@ -441,7 +441,8 @@ export default defineComponent({
onMounted(() => { onMounted(() => {
window.onresize = () => { window.onresize = () => {
return (() => { return (() => {
ste_status.value = 1; try {
ste_status.value = 1;
startpostion(); startpostion();
for ( for (
let index = 0; let index = 0;
@ -458,6 +459,9 @@ export default defineComponent({
setTimeout(() => { setTimeout(() => {
ste_status.value = 0; ste_status.value = 0;
}, 100); }, 100);
} catch (error) {
}
})(); })();
}; };
}); });
@ -469,6 +473,7 @@ export default defineComponent({
} }
}; };
const startpostion = () => { const startpostion = () => {
try {
ninepostion.value[0].x = 0; ninepostion.value[0].x = 0;
ninepostion.value[0].y = 0; ninepostion.value[0].y = 0;
@ -514,6 +519,9 @@ export default defineComponent({
} else { } else {
} }
syncpoint(); syncpoint();
} catch (error) {
}
}; };
const use_server_config = () => { const use_server_config = () => {
for (let index = 0; index < defaultninepostion.value.length; index++) { for (let index = 0; index < defaultninepostion.value.length; index++) {