Skip to content

Commit

Permalink
fix: v-menu交互配置
Browse files Browse the repository at this point in the history
  • Loading branch information
StreakingMan committed May 30, 2022
1 parent 5ff4871 commit 2399b95
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/classes/Runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export class Runtime {
ctrlV: ref(false),
alt: ref(false),
shift: ref(false),
del: ref(false),
};
// 辅助网格显示
public showGrid = ref(true);
Expand Down
2 changes: 1 addition & 1 deletion src/components/config-widgets/Color.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
style="cursor: pointer"
>
<div v-if="!value" class="no-color"></div>
<v-menu activator="parent">
<v-menu activator="parent" :close-on-content-click="false">
<v-color-picker v-model="value" show-swatches></v-color-picker>
</v-menu>
</v-sheet>
Expand Down
2 changes: 1 addition & 1 deletion src/components/core/MaterialConfigPopover.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-menu v-model="visible" anchor="end">
<v-menu v-model="visible" anchor="end" :close-on-content-click="false">
<template #activator="{ props }">
<div
class="activator"
Expand Down
2 changes: 0 additions & 2 deletions src/components/core/MaterialInstance.vue
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,6 @@ export default defineComponent({
itemStartH: 0,
};
// 缩放控制点
const clickingDot = ref<CtrlDotType | null>(null);
const { onMousedown: onDotMousedown } = useMouseDrag({
Expand Down
18 changes: 15 additions & 3 deletions src/components/tools/View.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
<v-btn icon>
<v-icon>mdi-grid</v-icon>
<v-tooltip activator="parent" anchor="bottom">辅助网格</v-tooltip>
<v-menu activator="parent" anchor="bottom">
<v-menu
activator="parent"
anchor="bottom"
:close-on-content-click="false"
>
<v-sheet class="pa-4 rounded print-none" width="200">
<div class="d-flex align-center">
<div class="text-subtitle-2">显示网格</div>
Expand Down Expand Up @@ -38,7 +42,11 @@
<v-btn icon>
<v-icon :style="{ color: paper.background }"> mdi-palette </v-icon>
<v-tooltip activator="parent" anchor="bottom">纸张背景</v-tooltip>
<v-menu activator="parent" anchor="bottom">
<v-menu
activator="parent"
anchor="bottom"
:close-on-content-click="false"
>
<v-sheet class="pa-4 rounded print-none" width="fit-content">
<div class="d-flex align-center">
<div class="text-subtitle-2">背景色</div>
Expand All @@ -55,7 +63,11 @@
<v-btn icon>
<v-icon>mdi-magnify-plus</v-icon>
<v-tooltip activator="parent" anchor="bottom">缩放视图</v-tooltip>
<v-menu activator="parent" anchor="bottom">
<v-menu
activator="parent"
anchor="bottom"
:close-on-content-click="false"
>
<v-sheet class="pa-4 rounded print-none" width="200">
<div class="d-flex align-center">
<div class="text-subtitle-2">比例</div>
Expand Down

0 comments on commit 2399b95

Please sign in to comment.