修复关窗时选中状态会转移到下一个div的BUG

This commit is contained in:
fangxiang 2022-02-11 13:54:47 +08:00
parent 3c3a31571a
commit bfc271db2d
1 changed files with 13 additions and 5 deletions

View File

@ -52,6 +52,7 @@
</q-item-section> </q-item-section>
</q-item> </q-item>
<q-item <q-item
v-if="false"
clickable clickable
v-close-popup v-close-popup
:disable="$props.disable" :disable="$props.disable"
@ -265,6 +266,7 @@
background: gray; background: gray;
width: 32px; width: 32px;
height: 32px; height: 32px;
z-index: 999;
} }
.absolute_up { .absolute_up {
@ -421,11 +423,6 @@ export default defineComponent({
return signal_source.value.window_type == "EwindowType::Clock"; return signal_source.value.window_type == "EwindowType::Clock";
}); });
reload_signal_source();
watch(props, (a, b) => {
reload_signal_source();
});
let selected = ref(false); let selected = ref(false);
let can_move = ref(true); let can_move = ref(true);
let can_resize = ref(true); let can_resize = ref(true);
@ -458,6 +455,16 @@ export default defineComponent({
move_flag = false; move_flag = false;
}; };
reload_signal_source();
watch(
() => props.window,
(a, b) => {
reload_signal_source();
selected.value = false;
cleanMouseDownFlag();
}
);
const flags = new _Flags(); const flags = new _Flags();
let ctrl_press_flag = false; let ctrl_press_flag = false;
@ -547,6 +554,7 @@ export default defineComponent({
if (dir & flags.right_flag) { if (dir & flags.right_flag) {
width_offset += h; width_offset += h;
} }
emit( emit(
"reset_geometry_offset", "reset_geometry_offset",
props.window, props.window,