放大缩放按钮,修复开窗后会选中下面的窗口的BUG

This commit is contained in:
fangxiang 2022-02-12 10:38:40 +08:00
parent e1b1ec4ee7
commit 65886030b9
4 changed files with 33 additions and 28 deletions

View File

@ -1,6 +1,6 @@
{
"name": "media_player_client",
"version": "1.2.1",
"version": "1.2.2",
"description": "A Quasar Framework app",
"productName": "MediaPlayerClient",
"author": "fangxiang <fangxiang@cloudview.work>",

View File

@ -6,6 +6,7 @@
? 'window_selected'
: 'window_normal'
"
@mousedown="onMouseDown"
@click="onClick"
:style="{
background: $props.window.client_color,
@ -277,6 +278,11 @@ export default defineComponent({
is_clock_window,
calc_is_audio_player_window,
onMouseDown(evt: MouseEvent) {
if (evt.ctrlKey) {
ctrl_press_flag = true;
}
},
onClick(evt: MouseEvent) {
if (ctrl_press_flag) {
ctrl_press_flag = false;

View File

@ -26,12 +26,13 @@
$store.state.windows_sort.findIndex((element) => element == item.uuid)
"
:isActive="item.uuid == $store.state.selected_window"
:resizeIconSize="14"
:isGuide="true"
v-for="(item, index) in windows"
:key="index"
style="background: red; position: fixed"
@resizeEndHandler="resizeWindow(item.window_id, $event)"
@moveEndHandler="moveWindow(item.window_id, $event)"
style="position: fixed"
>
<window
@close_this_window="closeWindow"
@ -393,18 +394,18 @@ export default defineComponent({
);
if (window) {
// ,
// $store.commit("setWindowPropertys", [
// {
// window,
// property_name: "x",
// value: (temp.x ?? 0) + __temp__size_a__,
// },
// {
// window,
// property_name: "y",
// value: (temp.y ?? 0) + __temp__size_a__,
// },
// ]);
$store.commit("setWindowPropertys", [
{
window,
property_name: "x",
value: (temp.x ?? 0) + __temp__size_a__,
},
{
window,
property_name: "y",
value: (temp.y ?? 0) + __temp__size_a__,
},
]);
setTimeout(() => {
$store.commit("setWindowPropertys", [
@ -432,18 +433,18 @@ export default defineComponent({
(item) => item.window_id == temp.window_id
);
if (window) {
// $store.commit("setWindowPropertys", [
// {
// window,
// property_name: "width",
// value: (temp.width ?? 0) + __temp__size_a__,
// },
// {
// window,
// property_name: "height",
// value: (temp.width ?? 0) + __temp__size_a__,
// },
// ]);
$store.commit("setWindowPropertys", [
{
window,
property_name: "width",
value: (temp.width ?? 0) + __temp__size_a__,
},
{
window,
property_name: "height",
value: (temp.width ?? 0) + __temp__size_a__,
},
]);
setTimeout(() => {
$store.commit("setWindowPropertys", [
@ -610,7 +611,6 @@ export default defineComponent({
};
const resizeWindow = (window_id: number, evt: any) => {
console.log(evt);
evt.width = evt.width ?? 0;
evt.height = evt.height ?? 0;
evt.left = evt.left ?? 0;

View File

@ -96,7 +96,6 @@ const itemResize = (
style.left = style.back_left;
style.top = style.back_top;
} else {
console.log(style);
emit("resizeEndHandler", {
// 抬起事件回调
el: target,