Skip to content

Commit

Permalink
Merge pull request #1 from Betty985/master
Browse files Browse the repository at this point in the history
工具栏
  • Loading branch information
xlearns authored May 3, 2022
2 parents c0bfcbc + 21cb7a6 commit b73e9c7
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/hooks/useToolBox.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ref } from "vue";
import { usePanel } from "@/hooks/usePanel";
import router from "@/router";
let { current, list } = usePanel();
let { current, list, rootStyle } = usePanel();

let data = ref([
"撤回",
Expand Down Expand Up @@ -29,6 +29,21 @@ export function useToolBox() {
if (!current.value) return;
current.value.x = 0;
break;
case 4:
if (!current.value) return;
current.value.y = 0;
break;
case 5:
if (!current.value) return;
let { width } = rootStyle.value;

current.value.x = width - current.value.w;
break;
case 6:
if (!current.value) return;
let { height } = rootStyle.value;
current.value.y = height - current.value.h;
break;
}
}
return {
Expand Down

0 comments on commit b73e9c7

Please sign in to comment.