修复修改窗口大小对话框手动输入数字时只会应用上一个数字的BUG
This commit is contained in:
parent
66175ed579
commit
1f781e1f7a
|
@ -84,7 +84,6 @@
|
|||
parseInt(val) >= 0 ||
|
||||
$t('the number must be greater than 0'),
|
||||
]"
|
||||
@update:model-value="onXChanged"
|
||||
lazy-rules
|
||||
>
|
||||
<template v-slot:append>
|
||||
|
@ -105,7 +104,6 @@
|
|||
type="number"
|
||||
min="0"
|
||||
v-model="window_rect.y"
|
||||
@update:model-value="onYChanged"
|
||||
:rules="[
|
||||
(val) =>
|
||||
(val != null &&
|
||||
|
@ -136,7 +134,6 @@
|
|||
<q-input
|
||||
type="number"
|
||||
min="1"
|
||||
@update:model-value="onWidthChanged"
|
||||
v-model="window_rect.width"
|
||||
:rules="[
|
||||
(val) =>
|
||||
|
@ -167,7 +164,6 @@
|
|||
<q-input
|
||||
type="number"
|
||||
min="1"
|
||||
@update:model-value="onHeightChanged"
|
||||
v-model="window_rect.height"
|
||||
:rules="[
|
||||
(val) =>
|
||||
|
@ -348,6 +344,32 @@ export default defineComponent({
|
|||
);
|
||||
};
|
||||
|
||||
watch(
|
||||
() => window_rect.x,
|
||||
() => {
|
||||
sendSetWindowGeometryMessage();
|
||||
}
|
||||
);
|
||||
|
||||
watch(
|
||||
() => window_rect.y,
|
||||
() => {
|
||||
sendSetWindowGeometryMessage();
|
||||
}
|
||||
);
|
||||
watch(
|
||||
() => window_rect.width,
|
||||
() => {
|
||||
sendSetWindowGeometryMessage();
|
||||
}
|
||||
);
|
||||
watch(
|
||||
() => window_rect.height,
|
||||
() => {
|
||||
sendSetWindowGeometryMessage();
|
||||
}
|
||||
);
|
||||
|
||||
return {
|
||||
show_dialog,
|
||||
loading,
|
||||
|
@ -487,18 +509,6 @@ export default defineComponent({
|
|||
window_rect.height = back_window_rect.height;
|
||||
sendSetWindowGeometryMessage();
|
||||
},
|
||||
onHeightChanged(value: number) {
|
||||
sendSetWindowGeometryMessage();
|
||||
},
|
||||
onWidthChanged(value: number) {
|
||||
sendSetWindowGeometryMessage();
|
||||
},
|
||||
onXChanged(value: number) {
|
||||
sendSetWindowGeometryMessage();
|
||||
},
|
||||
onYChanged(value: number) {
|
||||
sendSetWindowGeometryMessage();
|
||||
},
|
||||
};
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue